umbrello: umbrello/dialogs/pages/constraintlistpage.h Source File

umbrello 2.32.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

constraintlistpage.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2003-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef CONSTRAINTLISTPAGE_H
12 #define CONSTRAINTLISTPAGE_H
13
14 //app includes
15 #include "umlclassifierlistitemlist.h"
16 #include "classifierlistpage.h"
17
18 //qt includes
19 #include <QWidget>
20
21 #if QT_VERSION < 0x050000
22 class KAction;
23 class KMenu;
24 #else
25 class QAction;
26 class QMenu;
27 #endif
28
36 class ConstraintListPage : public ClassifierListPage
37 {
38 Q_OBJECT
39 public:
40
41 ConstraintListPage(QWidget* parent, UMLClassifier* classifier,
42 UMLDoc* doc, UMLObject::ObjectType type);
43 virtual ~ConstraintListPage();
44
45 private:
46
47 #if QT_VERSION >= 0x050000
48 QAction* newUniqueConstraintAction;
49 QAction* newPrimaryKeyConstraintAction;
50 QAction* newForeignKeyConstraintAction;
51 QAction* newCheckConstraintAction;
52 #else
53 KAction* newUniqueConstraintAction;
54 KAction* newPrimaryKeyConstraintAction;
55 KAction* newForeignKeyConstraintAction;
56 KAction* newCheckConstraintAction;
57 #endif
58 void setupActions();
59
60 private slots:
61
62 void slotNewUniqueConstraint();
63 void slotNewPrimaryKeyConstraint();
64 void slotNewForeignKeyConstraint();
65 void slotNewCheckConstraint();
66 virtual UMLClassifierListItemList getItemList();
67
68 protected:
69
70 bool greaterThan(UMLObject::ObjectType ct1, UMLObject::ObjectType ct2);
71
72 #if QT_VERSION >= 0x050000
73 QMenu* buttonMenu;
74 #else
75 KMenu* buttonMenu;
76 #endif
77
78 };
79
80 #endif
ClassifierListPage
A dialog page to display classifier properties.
Definition: classifierlistpage.h:40
ConstraintListPage
An extension to the classifier list dialog page to display constraint properties.
Definition: constraintlistpage.h:37
ConstraintListPage::slotNewForeignKeyConstraint
void slotNewForeignKeyConstraint()
Definition: constraintlistpage.cpp:150
ConstraintListPage::ConstraintListPage
ConstraintListPage(QWidget *parent, UMLClassifier *classifier, UMLDoc *doc, UMLObject::ObjectType type)
Definition: constraintlistpage.cpp:53
ConstraintListPage::buttonMenu
KMenu * buttonMenu
Definition: constraintlistpage.h:75
ConstraintListPage::slotNewPrimaryKeyConstraint
void slotNewPrimaryKeyConstraint()
Definition: constraintlistpage.cpp:126
ConstraintListPage::setupActions
void setupActions()
Definition: constraintlistpage.cpp:82
ConstraintListPage::newCheckConstraintAction
KAction * newCheckConstraintAction
Definition: constraintlistpage.h:56
ConstraintListPage::slotNewUniqueConstraint
void slotNewUniqueConstraint()
Definition: constraintlistpage.cpp:117
ConstraintListPage::getItemList
virtual UMLClassifierListItemList getItemList()
Definition: constraintlistpage.cpp:272
ConstraintListPage::newForeignKeyConstraintAction
KAction * newForeignKeyConstraintAction
Definition: constraintlistpage.h:55
ConstraintListPage::slotNewCheckConstraint
void slotNewCheckConstraint()
Definition: constraintlistpage.cpp:159
ConstraintListPage::newPrimaryKeyConstraintAction
KAction * newPrimaryKeyConstraintAction
Definition: constraintlistpage.h:54
ConstraintListPage::~ConstraintListPage
virtual ~ConstraintListPage()
Definition: constraintlistpage.cpp:78
ConstraintListPage::newUniqueConstraintAction
KAction * newUniqueConstraintAction
Definition: constraintlistpage.h:53
ConstraintListPage::greaterThan
bool greaterThan(UMLObject::ObjectType ct1, UMLObject::ObjectType ct2)
Definition: constraintlistpage.cpp:242
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:27
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLDoc
Definition: umldoc.h:75
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:80
classifierlistpage.h
umlclassifierlistitemlist.h