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

multipagedialogbase.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) 2012-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef MULTIPAGEDIALOGBASE_H
12 #define MULTIPAGEDIALOGBASE_H
13
14 #include "icon_utils.h"
15
16 #include <kpagewidget.h>
17
18 // qt class includes
19 #include <QDialog>
20 #include <QWidget>
21
22 //forward declarations
23 class AssociationWidget;
24 class AssociationGeneralPage;
25 class AssociationRolePage;
26 class KFontChooser;
27 class KPageDialog;
28 class QAbstractButton;
29 class QFrame;
30 class NotePage;
31 class NoteWidget;
32 class MessageWidget;
33 class UMLWidget;
34 class SelectOperationPage;
35 class UMLWidgetStylePage;
36 class WidgetBase;
37 class UMLScene;
38 namespace Settings { class OptionState; }
39
51 class MultiPageDialogBase : public QWidget
52 {
53 Q_OBJECT
54
55 public:
57 typedef enum {
58 AutoLayoutPage,
59 ClassPage,
60 CodeImportPage,
61 CodeGenerationPage,
62 CodeViewerPage,
63 FontPage,
64 GeneralPage,
65 UserInterfacePage,
66 } PageType;
67
68 explicit MultiPageDialogBase(QWidget *parent, bool withDefaultButton=false);
69 virtual ~MultiPageDialogBase();
70
71 void apply();
72
73 void setCaption(const QString &caption);
74 void accept();
75 void reject();
76 KPageWidgetItem *currentPage();
77 void addPage(KPageWidgetItem *page);
78 void setCurrentPage(KPageWidgetItem *page);
79 static int spacingHint();
80 int exec();
81
82 virtual bool isModified();
83
84 signals:
85 void okClicked();
86 void applyClicked();
87 void defaultClicked();
88
89 protected slots:
90 void slotEnableButtonOk(bool state);
91
92 private slots:
93 void slotOkClicked();
94 void slotApplyClicked();
95 void slotDefaultClicked();
96 #if QT_VERSION >= 0x050000
97 void slotHelpClicked();
98 void slotButtonClicked(QAbstractButton *button);
99 #endif
100 protected:
101 AssociationGeneralPage *m_pAssocGeneralPage;
102 NotePage *m_notePage;
103 SelectOperationPage *m_operationGeneralPage;
104 AssociationRolePage *m_pRolePage;
105 KFontChooser *m_fontChooser;
106 UMLWidgetStylePage *m_pStylePage;
107 KPageWidgetItem *m_pageItem;
108 KPageDialog *m_pageDialog;
109 KPageWidget *m_pageWidget;
110 bool m_useDialog;
111 bool m_isModified;
112 virtual void keyPressEvent(QKeyEvent *event);
113
114 QFrame* createPage(const QString& name, const QString& header, Icon_Utils::IconType icon);
115 KPageWidgetItem *createPage(const QString &name, const QString &header, Icon_Utils::IconType icon, QWidget *widget);
116
117 void setupGeneralPage(AssociationWidget *widget);
118 void applyGeneralPage(AssociationWidget *widget);
119
120 void setupGeneralPage(NoteWidget *widget);
121 KPageWidgetItem *setupGeneralPage(MessageWidget *widget);
122 void applyGeneralPage(MessageWidget *widget);
123
124 KPageWidgetItem *setupFontPage(const QFont &font);
125 KPageWidgetItem *setupFontPage(UMLWidget *widget);
126 KPageWidgetItem *setupFontPage(AssociationWidget *widget);
127 void resetFontPage(QWidget *widget);
128 void applyFontPage(AssociationWidget *widget);
129 void applyFontPage(Settings::OptionState *state);
130 void applyFontPage(UMLScene *scene);
131 void applyFontPage(UMLWidget *widget);
132
133 KPageWidgetItem *setupStylePage(WidgetBase *widget);
134 KPageWidgetItem *setupStylePage(AssociationWidget *widget);
135 void applyStylePage();
136
137 KPageWidgetItem *setupAssociationRolePage(AssociationWidget *widget);
138 void applyAssociationRolePage();
139 };
140
141 #endif
MultiPageDialogBase::slotOkClicked
void slotOkClicked()
Definition: multipagedialogbase.cpp:245
Settings::OptionState::uiState
UIState uiState
Definition: optionstate.h:328
Icon_Utils::DesktopIcon
QPixmap DesktopIcon(IconType type)
Definition: icon_utils.cpp:97
MultiPageDialogBase::m_fontChooser
KFontChooser * m_fontChooser
Definition: multipagedialogbase.h:105
AssociationRolePage
Display properties on a UMLObject.
Definition: associationrolepage.h:35
DEBUG_REGISTER
#define DEBUG_REGISTER(src)
Definition: debug_utils.h:131
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition: associationwidget.h:52
MultiPageDialogBase::setupStylePage
KPageWidgetItem * setupStylePage(WidgetBase *widget)
Definition: multipagedialogbase.cpp:477
NotePage
Definition: notepage.h:24
Settings::UIState::font
QFont font
Definition: optionstate.h:92
UMLWidget::setFont
virtual void setFont(const QFont &font)
Definition: umlwidget.cpp:1955
MultiPageDialogBase::m_pAssocGeneralPage
AssociationGeneralPage * m_pAssocGeneralPage
Definition: multipagedialogbase.h:101
MultiPageDialogBase::applyStylePage
void applyStylePage()
Definition: multipagedialogbase.cpp:498
UMLWidget
The base class for graphical UML objects.
Definition: umlwidget.h:41
MultiPageDialogBase::UserInterfacePage
@ UserInterfacePage
Definition: multipagedialogbase.h:65
UMLWidgetStylePage
Definition: umlwidgetstylepage.h:38
MultiPageDialogBase::setCurrentPage
void setCurrentPage(KPageWidgetItem *page)
Definition: multipagedialogbase.cpp:206
UMLScene::activeView
UMLView * activeView() const
Definition: umlscene.cpp:348
MultiPageDialogBase::addPage
void addPage(KPageWidgetItem *page)
Definition: multipagedialogbase.cpp:193
MultiPageDialogBase::slotEnableButtonOk
void slotEnableButtonOk(bool state)
Definition: multipagedialogbase.cpp:126
WidgetBase::umlScene
UMLScene * umlScene() const
Definition: widgetbase.cpp:162
AssociationRolePage::apply
void apply()
Definition: associationrolepage.cpp:244
multipagedialogbase.h
MultiPageDialogBase::slotApplyClicked
void slotApplyClicked()
Definition: multipagedialogbase.cpp:253
UMLScene::setFont
void setFont(QFont font, bool changeAllWidgets=false)
Definition: umlscene.cpp:3427
MultiPageDialogBase::FontPage
@ FontPage
Definition: multipagedialogbase.h:63
MultiPageDialogBase::m_useDialog
bool m_useDialog
Definition: multipagedialogbase.h:110
MultiPageDialogBase::accept
void accept()
Definition: multipagedialogbase.cpp:173
SelectOperationPage::apply
bool apply()
Definition: selectoperationpage.cpp:301
MultiPageDialogBase::~MultiPageDialogBase
virtual ~MultiPageDialogBase()
Definition: multipagedialogbase.cpp:120
UMLWidgetStylePage::apply
void apply()
Definition: umlwidgetstylepage.cpp:287
MultiPageDialogBase::resetFontPage
void resetFontPage(QWidget *widget)
Definition: multipagedialogbase.cpp:431
MultiPageDialogBase::CodeImportPage
@ CodeImportPage
Definition: multipagedialogbase.h:60
MultiPageDialogBase::createPage
QFrame * createPage(const QString &name, const QString &header, Icon_Utils::IconType icon)
Definition: multipagedialogbase.cpp:325
MultiPageDialogBase::isModified
virtual bool isModified()
Definition: multipagedialogbase.cpp:237
MultiPageDialogBase::applyClicked
void applyClicked()
Definition: moc_multipagedialogbase.cpp:192
MultiPageDialogBase::applyFontPage
void applyFontPage(AssociationWidget *widget)
Definition: multipagedialogbase.cpp:441
SelectOperationPage
A dialog page to select an operation.
Definition: selectoperationpage.h:36
MultiPageDialogBase::CodeViewerPage
@ CodeViewerPage
Definition: multipagedialogbase.h:62
AssociationGeneralPage::apply
void apply()
Definition: associationgeneralpage.cpp:211
WidgetBase::font
virtual QFont font() const
Definition: widgetbase.cpp:543
MultiPageDialogBase::m_operationGeneralPage
SelectOperationPage * m_operationGeneralPage
Definition: multipagedialogbase.h:103
MultiPageDialogBase::m_pStylePage
UMLWidgetStylePage * m_pStylePage
Definition: multipagedialogbase.h:106
MultiPageDialogBase::m_notePage
NotePage * m_notePage
Definition: multipagedialogbase.h:102
MultiPageDialogBase::okClicked
void okClicked()
Definition: moc_multipagedialogbase.cpp:186
umlwidget.h
MultiPageDialogBase::setupAssociationRolePage
KPageWidgetItem * setupAssociationRolePage(AssociationWidget *widget)
Definition: multipagedialogbase.cpp:508
MultiPageDialogBase
Definition: multipagedialogbase.h:52
MultiPageDialogBase::applyAssociationRolePage
void applyAssociationRolePage()
Definition: multipagedialogbase.cpp:518
i18n
#define i18n
Definition: main.cpp:39
messagewidget.h
Icon_Utils::it_Properties_Roles
@ it_Properties_Roles
Definition: icon_utils.h:77
MultiPageDialogBase::slotDefaultClicked
void slotDefaultClicked()
Definition: multipagedialogbase.cpp:261
MultiPageDialogBase::m_pageWidget
KPageWidget * m_pageWidget
Definition: multipagedialogbase.h:109
MultiPageDialogBase::ClassPage
@ ClassPage
Definition: multipagedialogbase.h:59
MultiPageDialogBase::MultiPageDialogBase
MultiPageDialogBase(QWidget *parent, bool withDefaultButton=false)
Definition: multipagedialogbase.cpp:85
MultiPageDialogBase::setupFontPage
KPageWidgetItem * setupFontPage(const QFont &font)
Definition: multipagedialogbase.cpp:400
MultiPageDialogBase::applyGeneralPage
void applyGeneralPage(AssociationWidget *widget)
associationgeneralpage.h
MyProject\connect
connect()
Definition: namespaces-multiple.php:5
AssociationGeneralPage
Display properties on a UMLObject.
Definition: associationgeneralpage.h:40
MultiPageDialogBase::setupGeneralPage
void setupGeneralPage(AssociationWidget *widget)
Definition: multipagedialogbase.cpp:364
associationrolepage.h
NoteWidget
Displays a note box.
Definition: notewidget.h:31
notepage.h
MultiPageDialogBase::apply
void apply()
Definition: multipagedialogbase.cpp:140
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition: widgetbase.h:105
MultiPageDialogBase::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Definition: multipagedialogbase.cpp:308
Icon_Utils::it_Properties_General
@ it_Properties_General
Definition: icon_utils.h:64
selectoperationpage.h
associationwidget.h
Settings
Definition: codeviewerstate.cpp:15
Settings::OptionState
Definition: optionstate.h:314
MultiPageDialogBase::AutoLayoutPage
@ AutoLayoutPage
Definition: multipagedialogbase.h:58
DEBUG
#define DEBUG(src)
Definition: debug_utils.h:129
Icon_Utils::IconType
IconType
Definition: icon_utils.h:47
MultiPageDialogBase::m_pageDialog
KPageDialog * m_pageDialog
Definition: multipagedialogbase.h:108
uml.h
MultiPageDialogBase::reject
void reject()
Definition: multipagedialogbase.cpp:179
MultiPageDialogBase::defaultClicked
void defaultClicked()
Definition: moc_multipagedialogbase.cpp:198
umlwidgetstylepage.h
MessageWidget::lwClassifier
virtual UMLClassifier * lwClassifier()
Definition: messagewidget.cpp:1013
Icon_Utils::it_Properties_Font
@ it_Properties_Font
Definition: icon_utils.h:75
MultiPageDialogBase::exec
int exec()
Definition: multipagedialogbase.cpp:223
debug_utils.h
icon_utils.h
UMLScene
Definition: umlscene.h:69
DBG_SRC
#define DBG_SRC
Definition: import_utils.cpp:43
MultiPageDialogBase::m_pageItem
KPageWidgetItem * m_pageItem
Definition: multipagedialogbase.h:107
MultiPageDialogBase::setCaption
void setCaption(const QString &caption)
Definition: multipagedialogbase.cpp:162
AssociationWidget::font
QFont font() const
Definition: associationwidget.cpp:3106
MultiPageDialogBase::spacingHint
static int spacingHint()
Definition: multipagedialogbase.cpp:214
MultiPageDialogBase::applyGeneralPage
void applyGeneralPage(MessageWidget *widget)
Icon_Utils::it_Properties_Color
@ it_Properties_Color
Definition: icon_utils.h:65
MultiPageDialogBase::m_isModified
bool m_isModified
Definition: multipagedialogbase.h:111
MultiPageDialogBase::m_pRolePage
AssociationRolePage * m_pRolePage
Definition: multipagedialogbase.h:104
AssociationWidget::lwSetFont
virtual void lwSetFont(QFont font)
Definition: associationwidget.cpp:266
NotePage::apply
bool apply()
Definition: notepage.cpp:44
MultiPageDialogBase::GeneralPage
@ GeneralPage
Definition: multipagedialogbase.h:64
MessageWidget
Displays a message.
Definition: messagewidget.h:41
MultiPageDialogBase::CodeGenerationPage
@ CodeGenerationPage
Definition: multipagedialogbase.h:61
MultiPageDialogBase::currentPage
KPageWidgetItem * currentPage()
Definition: multipagedialogbase.cpp:185
MultiPageDialogBase::PageType
PageType
Available page types.
Definition: multipagedialogbase.h:57