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

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

classifierlistpage.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 CLASSIFIERLISTPAGE_H
12 #define CLASSIFIERLISTPAGE_H
13
14 //app includes
15 #include "dialogpagebase.h"
16 #include "umlclassifierlistitemlist.h"
17 #include "umlobject.h"
18
19 class CodeTextEdit;
20 class UMLClassifier;
21 class UMLDoc;
22 class KTextEdit;
23 class QGroupBox;
24 class QHBoxLayout;
25 class QListWidget;
26 class QListWidgetItem;
27 class QPushButton;
28 class QToolButton;
29 class QVBoxLayout;
30
39 class ClassifierListPage : public DialogPageBase
40 {
41 Q_OBJECT
42 public:
43
44 ClassifierListPage(QWidget* parent,
45 UMLClassifier* classifier, UMLDoc* doc, UMLObject::ObjectType type);
46 virtual ~ClassifierListPage();
47
48 void apply();
49
50 private:
51
52 void setupPage();
53
54 void setupListGroup(int margin);
55 void setupDocumentationGroup(int margin);
56 void setupMoveButtons(QHBoxLayout* parentLayout);
57 void setupActionButtons(const QString& itemType, QVBoxLayout* parentLayout);
58
59 void enableWidgets(bool state);
60
61 void saveCurrentItemDocumentation();
62
63 virtual UMLClassifierListItemList getItemList();
64
65 bool addClassifier(UMLClassifierListItem* classifier, int position = -1);
66
67 bool takeItem(UMLClassifierListItem* listitem,
68 bool seekPeerBefore, int &peerIndex);
69
70 void deleteMenu();
71
72 void printItemList(const QString &prologue);
73
74 QGroupBox* m_docGB;
75 QGroupBox* m_pItemListGB;
76 KTextEdit* m_docTE;
77 CodeTextEdit* m_pCodeTE;
78 QListWidget* m_pItemListLB;
79
80 QToolButton* m_pTopArrowB;
81 QToolButton* m_pUpArrowB;
82 QToolButton* m_pDownArrowB;
83 QToolButton* m_pBottomArrowB;
84
85 UMLDoc* m_doc;
86 UMLClassifierListItem* m_pOldListItem;
87
88 protected:
89
90 void reloadItemListBox();
91
92 void hideArrowButtons(bool hide);
93
94 UMLObject::ObjectType m_itemType;
95 UMLClassifier* m_pClassifier;
96 UMLClassifierListItem* m_pLastObjectCreated;
97
98 QPushButton* m_pNewClassifierListItemButton;
99 QPushButton* m_pDeleteListItemButton;
100 QPushButton* m_pPropertiesButton;
101
102 bool m_bSigWaiting;
103
104 protected slots:
105
106 void slotActivateItem(QListWidgetItem* item);
107
108 void slotMenuSelection(QAction* action);
109
110 void slotListItemCreated(UMLObject* object);
111 void slotListItemModified();
112 void slotRightButtonPressed(const QPoint& p);
113
114 void slotDoubleClick(QListWidgetItem* item);
115
116 void slotTopClicked();
117 void slotUpClicked();
118 void slotDownClicked();
119 void slotBottomClicked();
120
121 void slotNewListItem();
122
123 void slotDelete();
124
125 void slotProperties();
126 };
127
128 #endif
ClassifierListPage
A dialog page to display classifier properties.
Definition: classifierlistpage.h:40
ClassifierListPage::m_pNewClassifierListItemButton
QPushButton * m_pNewClassifierListItemButton
Definition: classifierlistpage.h:98
ClassifierListPage::apply
void apply()
Definition: classifierlistpage.cpp:395
ClassifierListPage::m_itemType
UMLObject::ObjectType m_itemType
Definition: classifierlistpage.h:94
ClassifierListPage::takeItem
bool takeItem(UMLClassifierListItem *listitem, bool seekPeerBefore, int &peerIndex)
Definition: classifierlistpage.cpp:883
ClassifierListPage::setupPage
void setupPage()
Definition: classifierlistpage.cpp:76
ClassifierListPage::setupMoveButtons
void setupMoveButtons(QHBoxLayout *parentLayout)
Definition: classifierlistpage.cpp:174
ClassifierListPage::deleteMenu
void deleteMenu()
ClassifierListPage::slotTopClicked
void slotTopClicked()
Definition: classifierlistpage.cpp:557
ClassifierListPage::m_pDownArrowB
QToolButton * m_pDownArrowB
Definition: classifierlistpage.h:82
ClassifierListPage::m_pOldListItem
UMLClassifierListItem * m_pOldListItem
Definition: classifierlistpage.h:86
ClassifierListPage::m_pDeleteListItemButton
QPushButton * m_pDeleteListItemButton
Definition: classifierlistpage.h:99
ClassifierListPage::setupListGroup
void setupListGroup(int margin)
Definition: classifierlistpage.cpp:112
ClassifierListPage::m_pItemListLB
QListWidget * m_pItemListLB
Definition: classifierlistpage.h:78
ClassifierListPage::slotProperties
void slotProperties()
Definition: classifierlistpage.cpp:750
ClassifierListPage::ClassifierListPage
ClassifierListPage(QWidget *parent, UMLClassifier *classifier, UMLDoc *doc, UMLObject::ObjectType type)
Definition: classifierlistpage.cpp:54
ClassifierListPage::saveCurrentItemDocumentation
void saveCurrentItemDocumentation()
Definition: classifierlistpage.cpp:773
ClassifierListPage::slotRightButtonPressed
void slotRightButtonPressed(const QPoint &p)
Definition: classifierlistpage.cpp:448
ClassifierListPage::m_pBottomArrowB
QToolButton * m_pBottomArrowB
Definition: classifierlistpage.h:83
ClassifierListPage::slotNewListItem
void slotNewListItem()
Definition: classifierlistpage.cpp:759
ClassifierListPage::slotDoubleClick
void slotDoubleClick(QListWidgetItem *item)
Definition: classifierlistpage.cpp:698
ClassifierListPage::~ClassifierListPage
virtual ~ClassifierListPage()
Definition: classifierlistpage.cpp:69
ClassifierListPage::m_doc
UMLDoc * m_doc
Definition: classifierlistpage.h:85
ClassifierListPage::m_pPropertiesButton
QPushButton * m_pPropertiesButton
Definition: classifierlistpage.h:100
ClassifierListPage::slotDownClicked
void slotDownClicked()
Definition: classifierlistpage.cpp:628
ClassifierListPage::m_docTE
KTextEdit * m_docTE
Definition: classifierlistpage.h:76
ClassifierListPage::enableWidgets
void enableWidgets(bool state)
Definition: classifierlistpage.cpp:280
ClassifierListPage::m_pTopArrowB
QToolButton * m_pTopArrowB
Definition: classifierlistpage.h:80
ClassifierListPage::printItemList
void printItemList(const QString &prologue)
Definition: classifierlistpage.cpp:538
ClassifierListPage::slotListItemCreated
void slotListItemCreated(UMLObject *object)
Definition: classifierlistpage.cpp:402
ClassifierListPage::getItemList
virtual UMLClassifierListItemList getItemList()
Definition: classifierlistpage.cpp:794
ClassifierListPage::m_bSigWaiting
bool m_bSigWaiting
Definition: classifierlistpage.h:102
ClassifierListPage::slotActivateItem
void slotActivateItem(QListWidgetItem *item)
Definition: classifierlistpage.cpp:336
ClassifierListPage::reloadItemListBox
void reloadItemListBox()
Definition: classifierlistpage.cpp:261
ClassifierListPage::slotListItemModified
void slotListItemModified()
Definition: classifierlistpage.cpp:434
ClassifierListPage::m_pClassifier
UMLClassifier * m_pClassifier
Definition: classifierlistpage.h:95
ClassifierListPage::hideArrowButtons
void hideArrowButtons(bool hide)
Definition: classifierlistpage.cpp:916
ClassifierListPage::m_pLastObjectCreated
UMLClassifierListItem * m_pLastObjectCreated
Definition: classifierlistpage.h:96
ClassifierListPage::slotUpClicked
void slotUpClicked()
Definition: classifierlistpage.cpp:591
ClassifierListPage::slotDelete
void slotDelete()
Definition: classifierlistpage.cpp:728
ClassifierListPage::addClassifier
bool addClassifier(UMLClassifierListItem *classifier, int position=-1)
Definition: classifierlistpage.cpp:806
ClassifierListPage::m_pUpArrowB
QToolButton * m_pUpArrowB
Definition: classifierlistpage.h:81
ClassifierListPage::setupDocumentationGroup
void setupDocumentationGroup(int margin)
Definition: classifierlistpage.cpp:234
ClassifierListPage::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: classifierlistpage.cpp:493
ClassifierListPage::m_pCodeTE
CodeTextEdit * m_pCodeTE
Definition: classifierlistpage.h:77
ClassifierListPage::m_docGB
QGroupBox * m_docGB
Definition: classifierlistpage.h:74
ClassifierListPage::m_pItemListGB
QGroupBox * m_pItemListGB
Definition: classifierlistpage.h:75
ClassifierListPage::setupActionButtons
void setupActionButtons(const QString &itemType, QVBoxLayout *parentLayout)
Definition: classifierlistpage.cpp:209
ClassifierListPage::slotBottomClicked
void slotBottomClicked()
Definition: classifierlistpage.cpp:664
CodeTextEdit
Definition: codetextedit.h:40
DialogPageBase
Definition: dialogpagebase.h:25
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:27
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLDoc
Definition: umldoc.h:75
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:80
dialogpagebase.h
umlclassifierlistitemlist.h
umlobject.h