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

classoptionspage.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) 2002-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11
12 #ifndef CLASSOPTIONSPAGE_H
13 #define CLASSOPTIONSPAGE_H
14
15 #include "optionstate.h"
16
17 #include <QWidget>
18
19 class ClassifierWidget;
20 class EntityWidget;
21 class UMLScene;
22 class KComboBox;
23 class QCheckBox;
24 class QGroupBox;
25 class QLabel;
26
39 class ClassOptionsPage : public QWidget
40 {
41 public:
42 ClassOptionsPage(QWidget* pParent, ClassifierWidget* pWidget);
43 ClassOptionsPage(QWidget* pParent, UMLScene *scene);
44 ClassOptionsPage(QWidget* pParent, Settings::OptionState *options, bool isDiagram=true);
45 ClassOptionsPage(QWidget* pParent, EntityWidget* widget);
46 virtual ~ClassOptionsPage();
47
48 void setDefaults();
49 void apply();
50
51 void setWidget(ClassifierWidget * pWidget);
52
53 protected:
54 void init();
55
56 void setupPage();
57 void setupPageFromScene();
58 void setupClassPageOption();
59 void setupPageFromEntityWidget();
60
61 void applyWidget();
62 void applyOptionState();
63 void applyScene();
64 void applyEntityWidget();
65
66 void insertAttribScope(const QString& type, int index = -1);
67 void insertOperationScope(const QString& type, int index = -1);
68
69 //GUI widgets
70 QGroupBox * m_visibilityGB;
71 QCheckBox * m_showVisibilityCB, * m_showAttSigCB;
72 QCheckBox * m_showOpSigCB, * m_showAttsCB, * m_showOpsCB;
73 QCheckBox * m_showStereotypeCB, * m_showPackageCB, * m_showPublicOnlyCB;
74 QCheckBox * m_showAttribAssocsCB;
75 QCheckBox * m_showDocumentationCB;
76 QCheckBox * m_drawAsCircleCB;
77
78 QGroupBox * m_scopeGB;
79 QLabel * m_attributeLabel;
80 QLabel * m_operationLabel;
81 KComboBox * m_attribScopeCB;
82 KComboBox * m_operationScopeCB;
83
84 ClassifierWidget* m_pWidget;
85 EntityWidget* m_entityWidget;
86 UMLScene* m_scene;
87 Settings::OptionState *m_options;
88 bool m_isDiagram;
89 };
90 #endif
ClassifierWidget::operationSignature
Uml::SignatureType::Enum operationSignature() const
Definition: classifierwidget.cpp:383
Settings::ClassState::showVisibility
bool showVisibility
Definition: optionstate.h:121
ClassOptionsPage::applyEntityWidget
void applyEntityWidget()
Definition: classoptionspage.cpp:417
ClassifierWidget::ShowOperations
@ ShowOperations
Definition: classifierwidget.h:44
Settings::ClassState::showAttribAssocs
bool showAttribAssocs
Definition: optionstate.h:128
ClassOptionsPage::m_attribScopeCB
KComboBox * m_attribScopeCB
Definition: classoptionspage.h:81
ClassifierWidget::ShowStereotype
@ ShowStereotype
Definition: classifierwidget.h:43
Settings::ClassState::showAttSig
bool showAttSig
Definition: optionstate.h:125
Uml::SignatureType::NoSigNoVis
@ NoSigNoVis
Definition: basictypes.h:166
Settings::ClassState::showPackage
bool showPackage
Definition: optionstate.h:127
ClassOptionsPage::m_showPackageCB
QCheckBox * m_showPackageCB
Definition: classoptionspage.h:73
umlview.h
Settings::ClassState::showDocumentation
bool showDocumentation
Definition: optionstate.h:129
ClassifierWidget::ShowAttributes
@ ShowAttributes
Definition: classifierwidget.h:48
ClassOptionsPage::m_showAttSigCB
QCheckBox * m_showAttSigCB
Definition: classoptionspage.h:71
ClassifierWidget::ShowPublicOnly
@ ShowPublicOnly
Definition: classifierwidget.h:45
ClassOptionsPage::insertOperationScope
void insertOperationScope(const QString &type, int index=-1)
Definition: classoptionspage.cpp:454
ClassOptionsPage::setupPageFromScene
void setupPageFromScene()
Definition: classoptionspage.cpp:215
Settings::ClassState::defaultOperationScope
Uml::Visibility::Enum defaultOperationScope
Definition: optionstate.h:132
ClassOptionsPage::m_operationLabel
QLabel * m_operationLabel
Definition: classoptionspage.h:80
ClassOptionsPage::setDefaults
void setDefaults()
Definition: classoptionspage.cpp:95
ClassOptionsPage::apply
void apply()
Definition: classoptionspage.cpp:115
Settings::ClassState::showPublicOnly
bool showPublicOnly
Definition: optionstate.h:130
classoptionspage.h
ClassifierWidget::ShowAttributeSignature
@ ShowAttributeSignature
only in setter
Definition: classifierwidget.h:51
classifierwidget.h
ClassOptionsPage::init
void init()
Definition: classoptionspage.cpp:427
ClassOptionsPage::applyScene
void applyScene()
Definition: classoptionspage.cpp:407
ClassOptionsPage
A dialog page to display the class related options.
Definition: classoptionspage.h:40
UMLScene::showOpSig
bool showOpSig() const
Definition: umlscene.cpp:3664
Settings::ClassState::defaultAttributeScope
Uml::Visibility::Enum defaultAttributeScope
Definition: optionstate.h:131
entitywidget.h
ClassifierWidget::ShowDocumentation
@ ShowDocumentation
Definition: classifierwidget.h:53
ClassOptionsPage::m_drawAsCircleCB
QCheckBox * m_drawAsCircleCB
Definition: classoptionspage.h:76
ClassOptionsPage::setupPage
void setupPage()
Definition: classoptionspage.cpp:139
ClassOptionsPage::m_showStereotypeCB
QCheckBox * m_showStereotypeCB
Definition: classoptionspage.h:73
ClassOptionsPage::setupPageFromEntityWidget
void setupPageFromEntityWidget()
Definition: classoptionspage.cpp:330
ClassOptionsPage::applyWidget
void applyWidget()
Definition: classoptionspage.cpp:356
UMLWidget::showStereotype
bool showStereotype() const
Definition: umlwidget.cpp:2030
ClassOptionsPage::m_operationScopeCB
KComboBox * m_operationScopeCB
Definition: classoptionspage.h:82
optionstate.h
ClassOptionsPage::m_showPublicOnlyCB
QCheckBox * m_showPublicOnlyCB
Definition: classoptionspage.h:73
UMLScene::setShowOpSig
void setShowOpSig(bool bShowOpSig)
Definition: umlscene.cpp:3672
ClassifierWidget::ShowPackage
@ ShowPackage
Definition: classifierwidget.h:47
ClassOptionsPage::m_entityWidget
EntityWidget * m_entityWidget
The entity widget to represent in the dialog page.
Definition: classoptionspage.h:85
ClassOptionsPage::m_scene
UMLScene * m_scene
The scene to represent in the dialog page.
Definition: classoptionspage.h:86
ClassOptionsPage::m_showAttsCB
QCheckBox * m_showAttsCB
Definition: classoptionspage.h:72
ClassOptionsPage::m_showVisibilityCB
QCheckBox * m_showVisibilityCB
Definition: classoptionspage.h:71
ClassifierWidget::setVisualProperty
void setVisualProperty(VisualProperty property, bool enable=true)
Definition: classifierwidget.cpp:208
ClassOptionsPage::m_options
Settings::OptionState * m_options
The OptionState structure to represent in the dialog page.
Definition: classoptionspage.h:87
ClassOptionsPage::m_showAttribAssocsCB
QCheckBox * m_showAttribAssocsCB
Definition: classoptionspage.h:74
ClassOptionsPage::insertAttribScope
void insertAttribScope(const QString &type, int index=-1)
Definition: classoptionspage.cpp:445
ClassifierWidget::visualProperty
bool visualProperty(VisualProperty property) const
Definition: classifierwidget.cpp:182
i18n
#define i18n
Definition: main.cpp:39
Settings::ClassState::showOpSig
bool showOpSig
Definition: optionstate.h:126
ClassifierWidget
Common implementation for class widget and interface widget.
Definition: classifierwidget.h:33
WidgetBase::wt_Class
@ wt_Class
Definition: widgetbase.h:116
ClassOptionsPage::ClassOptionsPage
ClassOptionsPage(QWidget *pParent, ClassifierWidget *pWidget)
Definition: classoptionspage.cpp:35
ClassifierWidget::attributeSignature
Uml::SignatureType::Enum attributeSignature() const
Definition: classifierwidget.cpp:361
Uml::SignatureType::Enum
Enum
Definition: basictypes.h:162
ClassOptionsPage::applyOptionState
void applyOptionState()
Definition: classoptionspage.cpp:380
Settings::ClassState::showOps
bool showOps
Definition: optionstate.h:123
Settings::ClassState::showStereoType
bool showStereoType
Definition: optionstate.h:124
ClassOptionsPage::m_showOpSigCB
QCheckBox * m_showOpSigCB
Definition: classoptionspage.h:72
Uml::Visibility::fromInt
Enum fromInt(int item)
Definition: basictypes.cpp:152
ClassifierWidget::DrawAsCircle
@ DrawAsCircle
Definition: classifierwidget.h:49
Settings::OptionState
Definition: optionstate.h:314
ClassOptionsPage::m_visibilityGB
QGroupBox * m_visibilityGB
Definition: classoptionspage.h:70
Settings::OptionState::classState
ClassState classState
Definition: optionstate.h:329
widgetbase.h
umlscene.h
WidgetBase::wt_Interface
@ wt_Interface
Definition: widgetbase.h:117
EntityWidget
A graphical version of an entity.
Definition: entitywidget.h:30
ClassifierWidget::ShowOperationSignature
@ ShowOperationSignature
only in setter
Definition: classifierwidget.h:50
ClassOptionsPage::~ClassOptionsPage
virtual ~ClassOptionsPage()
Definition: classoptionspage.cpp:91
UMLScene::optionState
Settings::OptionState & optionState()
Definition: umlscene.cpp:571
UMLWidget::setShowStereotype
virtual void setShowStereotype(bool flag)
Definition: umlwidget.cpp:2018
WidgetBase::WidgetType
WidgetType
Definition: widgetbase.h:111
UMLScene
Definition: umlscene.h:69
Uml::SignatureType::NoSig
@ NoSig
Definition: basictypes.h:163
ClassOptionsPage::m_isDiagram
bool m_isDiagram
Flag indicating that page is for diagram property dialog.
Definition: classoptionspage.h:88
EntityWidget::setShowAttributeSignature
void setShowAttributeSignature(bool flag)
Definition: entitywidget.cpp:282
ClassOptionsPage::m_showOpsCB
QCheckBox * m_showOpsCB
Definition: classoptionspage.h:72
ClassifierWidget::ShowVisibility
@ ShowVisibility
Definition: classifierwidget.h:46
UMLScene::setClassWidgetOptions
void setClassWidgetOptions(ClassOptionsPage *page)
Definition: umlscene.cpp:3441
ClassOptionsPage::m_showDocumentationCB
QCheckBox * m_showDocumentationCB
Definition: classoptionspage.h:75
Settings::ClassState::showAtts
bool showAtts
Definition: optionstate.h:122
EntityWidget::showAttributeSignature
bool showAttributeSignature() const
Definition: entitywidget.cpp:294
ClassOptionsPage::m_scopeGB
QGroupBox * m_scopeGB
Definition: classoptionspage.h:78
ClassOptionsPage::setWidget
void setWidget(ClassifierWidget *pWidget)
Definition: classoptionspage.cpp:131
WidgetBase::baseType
WidgetType baseType() const
Definition: widgetbase.cpp:115
UMLScene::isClassDiagram
bool isClassDiagram()
Definition: umlscene.h:316
ClassOptionsPage::m_pWidget
ClassifierWidget * m_pWidget
The classifier widget to represent in the dialog page.
Definition: classoptionspage.h:84
ClassOptionsPage::m_attributeLabel
QLabel * m_attributeLabel
Definition: classoptionspage.h:79
ClassOptionsPage::setupClassPageOption
void setupClassPageOption()
Definition: classoptionspage.cpp:237