summaryrefslogtreecommitdiff
path: root/src/items/database/databaserelationshipproperties.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/items/database/databaserelationshipproperties.cpp')
-rw-r--r--src/items/database/databaserelationshipproperties.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/items/database/databaserelationshipproperties.cpp b/src/items/database/databaserelationshipproperties.cpp
new file mode 100644
index 0000000..cb3866d
--- /dev/null
+++ b/src/items/database/databaserelationshipproperties.cpp
@@ -0,0 +1,60 @@
+// Copyright (C) 2008 Lukas Lalinsky
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+#include <QCheckBox>
+#include <QGridLayout>
+#include <QLabel>
+#include <QLineEdit>
+#include "databaserelationshipproperties.h"
+
+class DatabaseRelationshipProperties::PrivateData
+{
+public:
+ PrivateData()
+ {}
+
+ QWidget *nameEdit;
+ QCheckBox *generateNameCheckBox;
+};
+
+DatabaseRelationshipProperties::DatabaseRelationshipProperties(QWidget *parent)
+ : DiagramItemProperties(parent), d(new PrivateData)
+{
+ addPage(tr("&Relationship"), createRelationshipPage());
+}
+
+QWidget *
+DatabaseRelationshipProperties::createRelationshipPage()
+{
+ QWidget *page = new QWidget(this);
+ QGridLayout *layout = new QGridLayout(page);
+
+ d->nameEdit = new QLineEdit(page);
+ layout->addWidget(new QLabel(tr("Name:"), page), 0, 0);
+ layout->addWidget(d->nameEdit, 0, 1);
+ d->generateNameCheckBox = new QCheckBox(tr("Generated"), page);
+ connect(d->generateNameCheckBox, SIGNAL(toggled(bool)), d->nameEdit, SLOT(setDisabled(bool)));
+ d->generateNameCheckBox->setChecked(true);
+ layout->addWidget(d->generateNameCheckBox, 0, 2);
+ layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding), 1, 0, 1, 3);
+
+ return page;
+}
+
+void
+DatabaseRelationshipProperties::switchCurrentItem(DiagramItem *oldItem, DiagramItem *newItem)
+{
+}