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

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- File List
- File Members

umlforeignkeyconstraintdialog.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2003-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef UMLFOREIGNKEYCONSTRAINTDIALOG_H
7#define UMLFOREIGNKEYCONSTRAINTDIALOG_H
8
9//app includes
10#include "multipagedialogbase.h"
11#include "umlentityattributelist.h"
12
13//kde includes
14
15//qt includes
16#include <QList>
17
18 class KComboBox;
19 class QLineEdit;
20 class UMLDoc;
21 class UMLForeignKeyConstraint;
22 class QGroupBox;
23 class QLabel;
24 class QPushButton;
25 class QTreeWidget;
26
27 typedef QPair<UMLEntityAttribute*, UMLEntityAttribute*> EntityAttributePair;
28 typedef QList<EntityAttributePair> EntityAttributePairList;
29
37 class UMLForeignKeyConstraintDialog : public MultiPageDialogBase
38{
39 Q_OBJECT
40 public:
41 UMLForeignKeyConstraintDialog(QWidget* parent, UMLForeignKeyConstraint* pForeignKeyConstraint);
42 ~UMLForeignKeyConstraintDialog();
43
44 private:
45 bool apply();
46
47 void setupGeneralPage();
48 void setupColumnPage();
49
50 void refillReferencedAttributeCB();
51 void refillLocalAttributeCB();
52
53 UMLDoc* m_doc;
54 UMLForeignKeyConstraint* m_pForeignKeyConstraint;
55
56 struct GeneralWidgets {
57
58 QGroupBox* generalGB;
59 QGroupBox* actionGB;
60
61 QLabel* referencedEntityL;
62 QLabel* nameL;
63
64 QLineEdit* nameT;
65
66 KComboBox* referencedEntityCB;
67
68 QLabel* onUpdateL;
69 QLabel* onDeleteL;
70 KComboBox* updateActionCB;
71 KComboBox* deleteActionCB;
72 }; // end general widgets
73
74 struct ColumnWidgets {
75
76 QTreeWidget* mappingTW;
77
78 KComboBox* localColumnCB;
79 KComboBox* referencedColumnCB;
80
81 QLabel* localColumnL;
82 QLabel* referencedColumnL;
83
84 QPushButton* addPB, *removePB;
85 }; // end column widgets
86
87 // these attributes store the local cache
88
89 UMLEntityAttributeList m_pLocalAttributeList;
90 UMLEntityAttributeList m_pReferencedAttributeList;
91
92 EntityAttributePairList m_pAttributeMapList;
93
98 int m_pReferencedEntityIndex;
99 // end of local cache
100
101 GeneralWidgets m_GeneralWidgets;
102 ColumnWidgets m_ColumnWidgets;
103
104 KPageWidgetItem *pageGeneral, *pageColumn;
105
106 public slots:
107 void slotResetWidgetState();
108 void slotApply();
109 void slotOk();
110 void slotAddPair();
111 void slotDeletePair();
112 void slotReferencedEntityChanged(int index);
113};
114
115#endif
MultiPageDialogBase
Definition multipagedialogbase.h:47
UMLDoc
Definition umldoc.h:63
UMLEntityAttributeList
Definition umlentityattributelist.h:20
UMLForeignKeyConstraintDialog
A dialog page to display foreignkey constraint properties.
Definition umlforeignkeyconstraintdialog.h:38
UMLForeignKeyConstraintDialog::slotResetWidgetState
void slotResetWidgetState()
Definition umlforeignkeyconstraintdialog.cpp:450
UMLForeignKeyConstraintDialog::refillReferencedAttributeCB
void refillReferencedAttributeCB()
Definition umlforeignkeyconstraintdialog.cpp:409
UMLForeignKeyConstraintDialog::m_pReferencedAttributeList
UMLEntityAttributeList m_pReferencedAttributeList
Definition umlforeignkeyconstraintdialog.h:90
UMLForeignKeyConstraintDialog::UMLForeignKeyConstraintDialog
UMLForeignKeyConstraintDialog(QWidget *parent, UMLForeignKeyConstraint *pForeignKeyConstraint)
Definition umlforeignkeyconstraintdialog.cpp:49
UMLForeignKeyConstraintDialog::m_pForeignKeyConstraint
UMLForeignKeyConstraint * m_pForeignKeyConstraint
Definition umlforeignkeyconstraintdialog.h:54
UMLForeignKeyConstraintDialog::m_doc
UMLDoc * m_doc
the UMLDocument where all objects live
Definition umlforeignkeyconstraintdialog.h:53
UMLForeignKeyConstraintDialog::setupGeneralPage
void setupGeneralPage()
Definition umlforeignkeyconstraintdialog.cpp:197
UMLForeignKeyConstraintDialog::refillLocalAttributeCB
void refillLocalAttributeCB()
Definition umlforeignkeyconstraintdialog.cpp:431
UMLForeignKeyConstraintDialog::apply
bool apply()
Definition umlforeignkeyconstraintdialog.cpp:150
UMLForeignKeyConstraintDialog::slotReferencedEntityChanged
void slotReferencedEntityChanged(int index)
Definition umlforeignkeyconstraintdialog.cpp:386
UMLForeignKeyConstraintDialog::slotDeletePair
void slotDeletePair()
Definition umlforeignkeyconstraintdialog.cpp:112
UMLForeignKeyConstraintDialog::m_pAttributeMapList
EntityAttributePairList m_pAttributeMapList
Definition umlforeignkeyconstraintdialog.h:92
UMLForeignKeyConstraintDialog::setupColumnPage
void setupColumnPage()
Definition umlforeignkeyconstraintdialog.cpp:284
UMLForeignKeyConstraintDialog::m_ColumnWidgets
ColumnWidgets m_ColumnWidgets
Definition umlforeignkeyconstraintdialog.h:102
UMLForeignKeyConstraintDialog::pageColumn
KPageWidgetItem * pageColumn
Definition umlforeignkeyconstraintdialog.h:104
UMLForeignKeyConstraintDialog::slotAddPair
void slotAddPair()
Definition umlforeignkeyconstraintdialog.cpp:72
UMLForeignKeyConstraintDialog::slotApply
void slotApply()
Definition umlforeignkeyconstraintdialog.cpp:371
UMLForeignKeyConstraintDialog::slotOk
void slotOk()
Definition umlforeignkeyconstraintdialog.cpp:379
UMLForeignKeyConstraintDialog::~UMLForeignKeyConstraintDialog
~UMLForeignKeyConstraintDialog()
Definition umlforeignkeyconstraintdialog.cpp:65
UMLForeignKeyConstraintDialog::m_pLocalAttributeList
UMLEntityAttributeList m_pLocalAttributeList
Definition umlforeignkeyconstraintdialog.h:89
UMLForeignKeyConstraintDialog::m_pReferencedEntityIndex
int m_pReferencedEntityIndex
Definition umlforeignkeyconstraintdialog.h:98
UMLForeignKeyConstraintDialog::m_GeneralWidgets
GeneralWidgets m_GeneralWidgets
Definition umlforeignkeyconstraintdialog.h:101
UMLForeignKeyConstraintDialog::pageGeneral
KPageWidgetItem * pageGeneral
Definition umlforeignkeyconstraintdialog.h:104
UMLForeignKeyConstraint
Sets up Foreign Key entity constraint information.
Definition foreignkeyconstraint.h:28
multipagedialogbase.h
UMLForeignKeyConstraintDialog::ColumnWidgets
Definition umlforeignkeyconstraintdialog.h:74
UMLForeignKeyConstraintDialog::ColumnWidgets::referencedColumnL
QLabel * referencedColumnL
Definition umlforeignkeyconstraintdialog.h:82
UMLForeignKeyConstraintDialog::ColumnWidgets::removePB
QPushButton * removePB
Definition umlforeignkeyconstraintdialog.h:84
UMLForeignKeyConstraintDialog::ColumnWidgets::mappingTW
QTreeWidget * mappingTW
Definition umlforeignkeyconstraintdialog.h:76
UMLForeignKeyConstraintDialog::ColumnWidgets::referencedColumnCB
KComboBox * referencedColumnCB
Definition umlforeignkeyconstraintdialog.h:79
UMLForeignKeyConstraintDialog::ColumnWidgets::addPB
QPushButton * addPB
Definition umlforeignkeyconstraintdialog.h:84
UMLForeignKeyConstraintDialog::ColumnWidgets::localColumnL
QLabel * localColumnL
Definition umlforeignkeyconstraintdialog.h:81
UMLForeignKeyConstraintDialog::ColumnWidgets::localColumnCB
KComboBox * localColumnCB
Definition umlforeignkeyconstraintdialog.h:78
UMLForeignKeyConstraintDialog::GeneralWidgets
Definition umlforeignkeyconstraintdialog.h:56
UMLForeignKeyConstraintDialog::GeneralWidgets::onUpdateL
QLabel * onUpdateL
Definition umlforeignkeyconstraintdialog.h:68
UMLForeignKeyConstraintDialog::GeneralWidgets::nameT
QLineEdit * nameT
Definition umlforeignkeyconstraintdialog.h:64
UMLForeignKeyConstraintDialog::GeneralWidgets::actionGB
QGroupBox * actionGB
Definition umlforeignkeyconstraintdialog.h:59
UMLForeignKeyConstraintDialog::GeneralWidgets::onDeleteL
QLabel * onDeleteL
Definition umlforeignkeyconstraintdialog.h:69
UMLForeignKeyConstraintDialog::GeneralWidgets::updateActionCB
KComboBox * updateActionCB
Definition umlforeignkeyconstraintdialog.h:70
UMLForeignKeyConstraintDialog::GeneralWidgets::referencedEntityL
QLabel * referencedEntityL
Definition umlforeignkeyconstraintdialog.h:61
UMLForeignKeyConstraintDialog::GeneralWidgets::generalGB
QGroupBox * generalGB
Definition umlforeignkeyconstraintdialog.h:58
UMLForeignKeyConstraintDialog::GeneralWidgets::referencedEntityCB
KComboBox * referencedEntityCB
Definition umlforeignkeyconstraintdialog.h:66
UMLForeignKeyConstraintDialog::GeneralWidgets::deleteActionCB
KComboBox * deleteActionCB
Definition umlforeignkeyconstraintdialog.h:71
UMLForeignKeyConstraintDialog::GeneralWidgets::nameL
QLabel * nameL
Definition umlforeignkeyconstraintdialog.h:62
umlentityattributelist.h
EntityAttributePairList
QList< EntityAttributePair > EntityAttributePairList
Definition umlforeignkeyconstraintdialog.h:28
EntityAttributePair
QPair< UMLEntityAttribute *, UMLEntityAttribute * > EntityAttributePair
Definition umlforeignkeyconstraintdialog.h:27