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

umbrello 2.31.0 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
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:34
template.h
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:79
UMLObject::ot_EntityConstraint
@ ot_EntityConstraint
Definition: umlobject.h:104
UMLObject::ot_CheckConstraint
@ ot_CheckConstraint
Definition: umlobject.h:107
ClassifierListPage::m_pLastObjectCreated
UMLClassifierListItem * m_pLastObjectCreated
Definition: classifierlistpage.h:96
entity.h
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:998
UMLObject::ot_ForeignKeyConstraint
@ ot_ForeignKeyConstraint
Definition: umlobject.h:106
operation.h
object_factory.h
ClassifierListPage::m_pNewClassifierListItemButton
QPushButton * m_pNewClassifierListItemButton
Definition: classifierlistpage.h:98
ConstraintListPage::buttonMenu
KMenu * buttonMenu
Definition: constraintlistpage.h:75
ClassifierListPage::m_itemType
UMLObject::ObjectType m_itemType
Definition: classifierlistpage.h:94
UMLObject::asUMLEntity
UMLEntity * asUMLEntity()
Definition: umlobject.cpp:1312
ClassifierListPage
A dialog page to display classifier properties.
Definition: classifierlistpage.h:39
umlclassifierlistitemlist.h
ConstraintListPage
An extension to the classifier list dialog page to display constraint properties.
Definition: constraintlistpage.h:36
ClassifierListPage::hideArrowButtons
void hideArrowButtons(bool hide)
Definition: classifierlistpage.cpp:916
classifierlistitem.h
entityattribute.h
attribute.h
ConstraintListPage::ConstraintListPage
ConstraintListPage(QWidget *parent, UMLClassifier *classifier, UMLDoc *doc, UMLObject::ObjectType type)
Definition: constraintlistpage.cpp:53
ClassifierListPage::slotNewListItem
void slotNewListItem()
Definition: classifierlistpage.cpp:759
ConstraintListPage::setupActions
void setupActions()
Definition: constraintlistpage.cpp:82
i18n
#define i18n
Definition: main.cpp:39
UMLEntity::setAsPrimaryKey
bool setAsPrimaryKey(UMLUniqueConstraint *uconstr)
Definition: entity.cpp:512
UMLObject::ot_UniqueConstraint
@ ot_UniqueConstraint
Definition: umlobject.h:105
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
UMLDoc
Definition: umldoc.h:74
ConstraintListPage::slotNewForeignKeyConstraint
void slotNewForeignKeyConstraint()
Definition: constraintlistpage.cpp:150
classifierlistpage.h
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:26
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLObject::asUMLUniqueConstraint
UMLUniqueConstraint * asUMLUniqueConstraint()
Definition: umlobject.cpp:1329
uniqueconstraint.h
enumliteral.h
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:39
ConstraintListPage::newUniqueConstraintAction
KAction * newUniqueConstraintAction
Definition: constraintlistpage.h:53
debug_utils.h
constraintlistpage.h
ConstraintListPage::newCheckConstraintAction
KAction * newCheckConstraintAction
Definition: constraintlistpage.h:56
ConstraintListPage::getItemList
virtual UMLClassifierListItemList getItemList()
Definition: constraintlistpage.cpp:272
ClassifierListPage::m_pClassifier
UMLClassifier * m_pClassifier
Definition: classifierlistpage.h:95
ConstraintListPage::newForeignKeyConstraintAction
KAction * newForeignKeyConstraintAction
Definition: constraintlistpage.h:55
ConstraintListPage::slotNewCheckConstraint
void slotNewCheckConstraint()
Definition: constraintlistpage.cpp:159
ClassifierListPage::m_bSigWaiting
bool m_bSigWaiting
Definition: classifierlistpage.h:102
ClassifierListPage::reloadItemListBox
void reloadItemListBox()
Definition: classifierlistpage.cpp:261
ConstraintListPage::~ConstraintListPage
virtual ~ConstraintListPage()
Definition: constraintlistpage.cpp:78
ConstraintListPage::greaterThan
bool greaterThan(UMLObject::ObjectType ct1, UMLObject::ObjectType ct2)
Definition: constraintlistpage.cpp:242
umldoc.h
ConstraintListPage::newPrimaryKeyConstraintAction
KAction * newPrimaryKeyConstraintAction
Definition: constraintlistpage.h:54
ConstraintListPage::slotNewPrimaryKeyConstraint
void slotNewPrimaryKeyConstraint()
Definition: constraintlistpage.cpp:126
ConstraintListPage::slotNewUniqueConstraint
void slotNewUniqueConstraint()
Definition: constraintlistpage.cpp:117
enum.h