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

umbrello 2.31.1 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
UMLEntity
Non-graphical Information for an Entity.
Definition: entity.h:35
template.h
UMLObject::asUMLEnumLiteral
UMLEnumLiteral * asUMLEnumLiteral()
Definition: umlobject.cpp:1316
UMLClassifier::takeItem
int takeItem(UMLClassifierListItem *item)
Definition: classifier.cpp:1168
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:80
UMLObject::ot_EntityConstraint
@ ot_EntityConstraint
Definition: umlobject.h:104
DialogsPopupMenu::tt_New_EntityAttribute
@ tt_New_EntityAttribute
Definition: dialogspopupmenu.h:48
ClassifierListPage::setupDocumentationGroup
void setupDocumentationGroup(int margin)
Definition: classifierlistpage.cpp:234
ListPopupMenu::mt_Properties
@ mt_Properties
Definition: listpopupmenu.h:182
ListPopupMenu::mt_New_Template
@ mt_New_Template
Definition: listpopupmenu.h:141
UMLObject::asUMLOperation
UMLOperation * asUMLOperation()
Definition: umlobject.cpp:1323
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
UMLObject::asUMLClassifierListItem
UMLClassifierListItem * asUMLClassifierListItem()
Definition: umlobject.cpp:1309
DialogsPopupMenu::tt_New_Template
@ tt_New_Template
Definition: dialogspopupmenu.h:53
ClassifierListPage::m_pLastObjectCreated
UMLClassifierListItem * m_pLastObjectCreated
Definition: classifierlistpage.h:96
DialogsPopupMenu
Definition: dialogspopupmenu.h:17
entity.h
ClassifierListPage::m_pPropertiesButton
QPushButton * m_pPropertiesButton
Definition: classifierlistpage.h:100
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:998
UMLObject::asUMLAttribute
UMLAttribute * asUMLAttribute()
Definition: umlobject.cpp:1304
UMLDoc::removeUMLObject
void removeUMLObject(UMLObject *umlobject, bool deleteObject=false)
Definition: umldoc.cpp:1881
ClassifierListPage::slotRightButtonPressed
void slotRightButtonPressed(const QPoint &p)
Definition: classifierlistpage.cpp:448
DialogsPopupMenu::tt_InstanceAttribute_Selected
@ tt_InstanceAttribute_Selected
Definition: dialogspopupmenu.h:45
operation.h
ClassifierListPage::slotActivateItem
void slotActivateItem(QListWidgetItem *item)
Definition: classifierlistpage.cpp:336
UMLObject::showPropertiesDialog
virtual bool showPropertiesDialog(QWidget *parent=0)
Definition: umlobject.cpp:145
ClassifierListPage::m_pItemListGB
QGroupBox * m_pItemListGB
Definition: classifierlistpage.h:75
DialogsPopupMenu::tt_EntityAttribute_Selected
@ tt_EntityAttribute_Selected
Definition: dialogspopupmenu.h:43
ClassifierListPage::m_pOldListItem
UMLClassifierListItem * m_pOldListItem
Definition: classifierlistpage.h:86
ClassifierListPage::slotDoubleClick
void slotDoubleClick(QListWidgetItem *item)
Definition: classifierlistpage.cpp:698
ClassifierListPage::slotUpClicked
void slotUpClicked()
Definition: classifierlistpage.cpp:591
UMLObject::ot_Attribute
@ ot_Attribute
Definition: umlobject.h:92
CodeTextEdit
Definition: codetextedit.h:40
object_factory.h
UMLEnumLiteral
Sets up attribute information.
Definition: enumliteral.h:26
Uml::SignatureType::SigNoVis
@ SigNoVis
Definition: basictypes.h:182
ListPopupMenu::mt_New_EnumLiteral
@ mt_New_EnumLiteral
Definition: listpopupmenu.h:137
ClassifierListPage::m_pNewClassifierListItemButton
QPushButton * m_pNewClassifierListItemButton
Definition: classifierlistpage.h:98
ClassifierListPage::slotMenuSelection
void slotMenuSelection(QAction *action)
Definition: classifierlistpage.cpp:493
UMLClassifierListItemListIt
QListIterator< UMLClassifierListItem * > UMLClassifierListItemListIt
Definition: umlclassifierlistitemlist.h:17
ClassifierListPage::m_pItemListLB
QListWidget * m_pItemListLB
Definition: classifierlistpage.h:78
Object_Factory::createChildObject
UMLClassifierListItem * createChildObject(UMLClassifier *parent, UMLObject::ObjectType type, const QString &name)
Definition: object_factory.cpp:308
ClassifierListPage::m_itemType
UMLObject::ObjectType m_itemType
Definition: classifierlistpage.h:94
ClassifierListPage::ClassifierListPage
ClassifierListPage(QWidget *parent, UMLClassifier *classifier, UMLDoc *doc, UMLObject::ObjectType type)
Definition: classifierlistpage.cpp:54
UMLDoc::renameChildUMLObject
void renameChildUMLObject(UMLObject *o)
Definition: umldoc.cpp:1738
ClassifierListPage::takeItem
bool takeItem(UMLClassifierListItem *listitem, bool seekPeerBefore, int &peerIndex)
Definition: classifierlistpage.cpp:883
ClassifierListPage::setupActionButtons
void setupActionButtons(const QString &itemType, QVBoxLayout *parentLayout)
Definition: classifierlistpage.cpp:209
ClassifierListPage::slotTopClicked
void slotTopClicked()
Definition: classifierlistpage.cpp:557
dialogpagebase.h
codetextedit.h
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
ClassifierListPage::slotBottomClicked
void slotBottomClicked()
Definition: classifierlistpage.cpp:664
UMLObject::asUMLEntityAttribute
UMLEntityAttribute * asUMLEntityAttribute()
Definition: umlobject.cpp:1313
UMLObject::ot_InstanceAttribute
@ ot_InstanceAttribute
Definition: umlobject.h:110
UMLObject::asUMLEnum
UMLEnum * asUMLEnum()
Definition: umlobject.cpp:1315
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
ListPopupMenu::mt_New_InstanceAttribute
@ mt_New_InstanceAttribute
Definition: listpopupmenu.h:138
ClassifierListPage::printItemList
void printItemList(const QString &prologue)
Definition: classifierlistpage.cpp:538
UMLObject::ot_EnumLiteral
@ ot_EnumLiteral
Definition: umlobject.h:94
UMLObject::asUMLEntity
UMLEntity * asUMLEntity()
Definition: umlobject.cpp:1312
ClassifierListPage
A dialog page to display classifier properties.
Definition: classifierlistpage.h:40
umlclassifierlistitemlist.h
ClassifierListPage::getItemList
virtual UMLClassifierListItemList getItemList()
Definition: classifierlistpage.cpp:794
DialogsPopupMenu::tt_Template_Selected
@ tt_Template_Selected
Definition: dialogspopupmenu.h:56
ClassifierListPage::m_doc
UMLDoc * m_doc
Definition: classifierlistpage.h:85
ClassifierListPage::slotListItemModified
void slotListItemModified()
Definition: classifierlistpage.cpp:434
ClassifierListPage::hideArrowButtons
void hideArrowButtons(bool hide)
Definition: classifierlistpage.cpp:916
DialogsPopupMenu::tt_Attribute_Selected
@ tt_Attribute_Selected
Definition: dialogspopupmenu.h:42
UMLOperation::setSourceCode
void setSourceCode(const QString &code)
Definition: operation.cpp:499
classifierlistitem.h
entityattribute.h
ClassifierListPage::m_pDownArrowB
QToolButton * m_pDownArrowB
Definition: classifierlistpage.h:82
attribute.h
DialogsPopupMenu::tt_New_EnumLiteral
@ tt_New_EnumLiteral
Definition: dialogspopupmenu.h:49
a
QString a
Definition: petalnode.cpp:18
UMLClassifier::addOperation
bool addOperation(UMLOperation *op, int position=-1)
Definition: classifier.cpp:310
uWarning
#define uWarning()
Definition: debug_utils.h:124
ClassifierListPage::slotNewListItem
void slotNewListItem()
Definition: classifierlistpage.cpp:759
ClassifierListPage::m_pCodeTE
CodeTextEdit * m_pCodeTE
Definition: classifierlistpage.h:77
ListPopupMenu::MenuType
MenuType
< This type hosts all possible menu entry types
Definition: listpopupmenu.h:44
DialogPageBase
Definition: dialogpagebase.h:25
i18n
#define i18n
Definition: main.cpp:39
ClassifierListPage::setupPage
void setupPage()
Definition: classifierlistpage.cpp:76
DialogsPopupMenu::tt_New_InstanceAttribute
@ tt_New_InstanceAttribute
Definition: dialogspopupmenu.h:50
ListPopupMenu::toString
static QString toString(MenuType menu)
Definition: listpopupmenu.cpp:609
ClassifierListPage::m_docGB
QGroupBox * m_docGB
Definition: classifierlistpage.h:74
UMLObject::ot_EntityAttribute
@ ot_EntityAttribute
Definition: umlobject.h:102
basictypes.h
uDebug
#define uDebug()
Definition: debug_utils.h:122
ClassifierListPage::slotDownClicked
void slotDownClicked()
Definition: classifierlistpage.cpp:628
UMLClassifierListItem::toString
virtual QString toString(Uml::SignatureType::Enum sig=Uml::SignatureType::NoSig, bool withStereotype=false)
Definition: classifierlistitem.cpp:90
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
UMLObject::doc
QString doc() const
Definition: umlobject.cpp:435
UMLDoc
Definition: umldoc.h:75
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
ClassifierListPage::addClassifier
bool addClassifier(UMLClassifierListItem *classifier, int position=-1)
Definition: classifierlistpage.cpp:806
DialogsPopupMenu::tt_Operation_Selected
@ tt_Operation_Selected
Definition: dialogspopupmenu.h:54
UMLCanvasObject::subordinates
UMLObjectList & subordinates() const
Definition: umlcanvasobject.h:88
classifierlistpage.h
DialogsPopupMenu::tt_New_Attribute
@ tt_New_Attribute
Definition: dialogspopupmenu.h:47
ClassifierListPage::m_pDeleteListItemButton
QPushButton * m_pDeleteListItemButton
Definition: classifierlistpage.h:99
UMLObject::setDoc
void setDoc(const QString &d)
Definition: umlobject.cpp:455
DialogsPopupMenu::TriggerType
TriggerType
< This type hosts all possible menu types.
Definition: dialogspopupmenu.h:30
ListPopupMenu::mt_Delete
@ mt_Delete
Definition: listpopupmenu.h:186
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:27
ClassifierListPage::apply
void apply()
Definition: classifierlistpage.cpp:395
UMLObject::asUMLTemplate
UMLTemplate * asUMLTemplate()
Definition: umlobject.cpp:1328
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLOperation
Definition: operation.h:25
ClassifierListPage::m_docTE
KTextEdit * m_docTE
Definition: classifierlistpage.h:76
enumliteral.h
ClassifierListPage::deleteMenu
void deleteMenu()
ClassifierListPage::enableWidgets
void enableWidgets(bool state)
Definition: classifierlistpage.cpp:280
DialogsPopupMenu::tt_Undefined
@ tt_Undefined
Definition: dialogspopupmenu.h:57
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
debug_utils.h
dialogspopupmenu.h
UMLEntity::addEntityAttribute
UMLObject * addEntityAttribute(const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: entity.cpp:305
ListPopupMenu::typeFromAction
static MenuType typeFromAction(QAction *action)
Definition: listpopupmenu.cpp:407
umlobject.h
DialogsPopupMenu::tt_EnumLiteral_Selected
@ tt_EnumLiteral_Selected
Definition: dialogspopupmenu.h:44
ClassifierListPage::slotProperties
void slotProperties()
Definition: classifierlistpage.cpp:750
UMLObject::ot_Template
@ ot_Template
Definition: umlobject.h:95
ClassifierListPage::m_pClassifier
UMLClassifier * m_pClassifier
Definition: classifierlistpage.h:95
ListPopupMenu::mt_Rename
@ mt_Rename
Definition: listpopupmenu.h:183
ClassifierListPage::setupListGroup
void setupListGroup(int margin)
Definition: classifierlistpage.cpp:112
ClassifierListPage::m_pUpArrowB
QToolButton * m_pUpArrowB
Definition: classifierlistpage.h:81
UMLEnum::addEnumLiteral
UMLObject * addEnumLiteral(const QString &name, Uml::ID::Type id=Uml::ID::None, const QString &value=QString())
Definition: enum.cpp:132
DialogsPopupMenu::tt_New_Operation
@ tt_New_Operation
Definition: dialogspopupmenu.h:51
UMLTemplate
Sets up template information.
Definition: template.h:27
UMLObject::ot_Operation
@ ot_Operation
Definition: umlobject.h:93
ListPopupMenu::mt_New_Attribute
@ mt_New_Attribute
Definition: listpopupmenu.h:135
ClassifierListPage::setupMoveButtons
void setupMoveButtons(QHBoxLayout *parentLayout)
Definition: classifierlistpage.cpp:174
ClassifierListPage::m_bSigWaiting
bool m_bSigWaiting
Definition: classifierlistpage.h:102
UMLEntityAttribute
Sets up entityattribute information.
Definition: entityattribute.h:26
ClassifierListPage::slotListItemCreated
void slotListItemCreated(UMLObject *object)
Definition: classifierlistpage.cpp:402
ClassifierListPage::saveCurrentItemDocumentation
void saveCurrentItemDocumentation()
Definition: classifierlistpage.cpp:773
ClassifierListPage::~ClassifierListPage
virtual ~ClassifierListPage()
Definition: classifierlistpage.cpp:69
UMLObjectList
Definition: umlobjectlist.h:29
ClassifierListPage::reloadItemListBox
void reloadItemListBox()
Definition: classifierlistpage.cpp:261
ClassifierListPage::m_pTopArrowB
QToolButton * m_pTopArrowB
Definition: classifierlistpage.h:80
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLEnum
Non-graphical Information for an Enum.
Definition: enum.h:29
ClassifierListPage::slotDelete
void slotDelete()
Definition: classifierlistpage.cpp:728
ListPopupMenu::mt_New_EntityAttribute
@ mt_New_EntityAttribute
Definition: listpopupmenu.h:136
umldoc.h
ListPopupMenu::mt_New_Operation
@ mt_New_Operation
Definition: listpopupmenu.h:139
UMLClassifier::addTemplate
UMLTemplate * addTemplate(const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: classifier.cpp:1024
UMLOperation::getSourceCode
QString getSourceCode() const
Definition: operation.cpp:507
UMLClassifier::addAttribute
UMLAttribute * addAttribute(const QString &name, Uml::ID::Type id=Uml::ID::None)
Definition: classifier.cpp:810
enum.h
ClassifierListPage::m_pBottomArrowB
QToolButton * m_pBottomArrowB
Definition: classifierlistpage.h:83