umbrello: umbrello/dialogs/multipagedialogbase.h Source File

umbrello 25.04.0 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 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2012-2022 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef MULTIPAGEDIALOGBASE_H
7#define MULTIPAGEDIALOGBASE_H
8
9#include "icon_utils.h"
10
11#include <kpagewidget.h>
12
13// qt class includes
14#include <QDialog>
15#include <QWidget>
16
17//forward declarations
18class AssociationWidget;
19class AssociationGeneralPage;
20class AssociationRolePage;
21class KFontChooser;
22class KPageDialog;
23class QAbstractButton;
24class QFrame;
25class NotePage;
26class NoteWidget;
27class MessageWidget;
28class UMLWidget;
29class SelectOperationPage;
30class UMLWidgetStylePage;
31class WidgetBase;
32class UMLScene;
33namespace Settings { class OptionState; }
34
46 class MultiPageDialogBase : public QWidget
47{
48 Q_OBJECT
49
50public:
52 enum PageType {
53 AutoLayoutPage,
54 ClassPage,
55 CodeImportPage,
56 CodeGenerationPage,
57 CodeViewerPage,
58 FontPage,
59 GeneralPage,
60 UserInterfacePage,
61 };
62
63 explicit MultiPageDialogBase(QWidget *parent, bool withDefaultButton=false);
64 virtual ~MultiPageDialogBase();
65
66 void apply();
67
68 void setCaption(const QString &caption);
69 void accept();
70 void reject();
71 KPageWidgetItem *currentPage() const;
72 void addPage(KPageWidgetItem *page);
73 void setCurrentPage(KPageWidgetItem *page);
74 int exec();
75
76 virtual bool isModified() const;
77
78Q_SIGNALS:
79 void okClicked();
80 void applyClicked();
81 void defaultClicked();
82
83protected Q_SLOTS:
84 void slotEnableButtonOk(bool state);
85
86private Q_SLOTS:
87 void slotOkClicked();
88 void slotApplyClicked();
89 void slotDefaultClicked();
90 void slotHelpClicked();
91 void slotButtonClicked(QAbstractButton *button);
92protected:
93 AssociationGeneralPage *m_pAssocGeneralPage;
94 NotePage *m_notePage;
95 SelectOperationPage *m_operationGeneralPage;
96 AssociationRolePage *m_pRolePage;
97 KFontChooser *m_fontChooser;
98 UMLWidgetStylePage *m_pStylePage;
99 KPageWidgetItem *m_pageItem;
100 KPageDialog *m_pageDialog;
101 KPageWidget *m_pageWidget;
102 bool m_useDialog;
103 bool m_isModified;
104 virtual void keyPressEvent(QKeyEvent *event);
105
106 QFrame* createPage(const QString& name, const QString& header, Icon_Utils::IconType icon);
107 KPageWidgetItem *createPage(const QString &name, const QString &header, Icon_Utils::IconType icon, QWidget *widget);
108
109 void setupGeneralPage(AssociationWidget *widget);
110 void applyGeneralPage(AssociationWidget *widget);
111
112 void setupGeneralPage(NoteWidget *widget);
113 KPageWidgetItem *setupGeneralPage(MessageWidget *widget);
114 void applyGeneralPage(MessageWidget *widget);
115
116 KPageWidgetItem *setupFontPage(const QFont &font);
117 KPageWidgetItem *setupFontPage(UMLWidget *widget);
118 KPageWidgetItem *setupFontPage(AssociationWidget *widget);
119 void resetFontPage(QWidget *widget);
120 void applyFontPage(AssociationWidget *widget);
121 void applyFontPage(Settings::OptionState *state);
122 void applyFontPage(UMLScene *scene);
123 void applyFontPage(UMLWidget *widget);
124
125 KPageWidgetItem *setupStylePage(WidgetBase *widget);
126 KPageWidgetItem *setupStylePage(AssociationWidget *widget);
127 void applyStylePage();
128
129 KPageWidgetItem *setupAssociationRolePage(AssociationWidget *widget);
130 void applyAssociationRolePage();
131};
132
133#endif
AssociationGeneralPage
Display properties on a UMLObject.
Definition associationgeneralpage.h:35
AssociationRolePage
Display properties on a UMLObject.
Definition associationrolepage.h:30
AssociationWidget
This class represents an association inside a diagram. Bugs and comments to umbrello-devel@kde....
Definition associationwidget.h:47
MessageWidget
Displays a message.
Definition messagewidget.h:36
MultiPageDialogBase::defaultClicked
void defaultClicked()
MultiPageDialogBase::slotHelpClicked
void slotHelpClicked()
Definition multipagedialogbase.cpp:208
MultiPageDialogBase::resetFontPage
void resetFontPage(QWidget *widget)
Definition multipagedialogbase.cpp:364
MultiPageDialogBase::MultiPageDialogBase
MultiPageDialogBase(QWidget *parent, bool withDefaultButton=false)
Definition multipagedialogbase.cpp:43
MultiPageDialogBase::isModified
virtual bool isModified() const
Definition multipagedialogbase.cpp:176
MultiPageDialogBase::applyAssociationRolePage
void applyAssociationRolePage()
Definition multipagedialogbase.cpp:451
MultiPageDialogBase::okClicked
void okClicked()
MultiPageDialogBase::addPage
void addPage(KPageWidgetItem *page)
Definition multipagedialogbase.cpp:141
MultiPageDialogBase::exec
int exec()
Definition multipagedialogbase.cpp:162
MultiPageDialogBase::m_pStylePage
UMLWidgetStylePage * m_pStylePage
Definition multipagedialogbase.h:98
MultiPageDialogBase::m_pRolePage
AssociationRolePage * m_pRolePage
Definition multipagedialogbase.h:96
MultiPageDialogBase::reject
void reject()
Definition multipagedialogbase.cpp:127
MultiPageDialogBase::keyPressEvent
virtual void keyPressEvent(QKeyEvent *event)
Definition multipagedialogbase.cpp:245
MultiPageDialogBase::m_fontChooser
KFontChooser * m_fontChooser
Definition multipagedialogbase.h:97
MultiPageDialogBase::~MultiPageDialogBase
virtual ~MultiPageDialogBase()
Definition multipagedialogbase.cpp:78
MultiPageDialogBase::createPage
QFrame * createPage(const QString &name, const QString &header, Icon_Utils::IconType icon)
Definition multipagedialogbase.cpp:262
MultiPageDialogBase::slotDefaultClicked
void slotDefaultClicked()
Definition multipagedialogbase.cpp:200
MultiPageDialogBase::PageType
PageType
Available page types.
Definition multipagedialogbase.h:52
MultiPageDialogBase::UserInterfacePage
@ UserInterfacePage
Definition multipagedialogbase.h:60
MultiPageDialogBase::CodeGenerationPage
@ CodeGenerationPage
Definition multipagedialogbase.h:56
MultiPageDialogBase::GeneralPage
@ GeneralPage
Definition multipagedialogbase.h:59
MultiPageDialogBase::FontPage
@ FontPage
Definition multipagedialogbase.h:58
MultiPageDialogBase::CodeImportPage
@ CodeImportPage
Definition multipagedialogbase.h:55
MultiPageDialogBase::ClassPage
@ ClassPage
Definition multipagedialogbase.h:54
MultiPageDialogBase::AutoLayoutPage
@ AutoLayoutPage
Definition multipagedialogbase.h:53
MultiPageDialogBase::CodeViewerPage
@ CodeViewerPage
Definition multipagedialogbase.h:57
MultiPageDialogBase::slotApplyClicked
void slotApplyClicked()
Definition multipagedialogbase.cpp:192
MultiPageDialogBase::setCaption
void setCaption(const QString &caption)
Definition multipagedialogbase.cpp:115
MultiPageDialogBase::applyClicked
void applyClicked()
MultiPageDialogBase::m_operationGeneralPage
SelectOperationPage * m_operationGeneralPage
Definition multipagedialogbase.h:95
MultiPageDialogBase::setupStylePage
KPageWidgetItem * setupStylePage(WidgetBase *widget)
Definition multipagedialogbase.cpp:410
MultiPageDialogBase::setupFontPage
KPageWidgetItem * setupFontPage(const QFont &font)
Definition multipagedialogbase.cpp:333
MultiPageDialogBase::currentPage
KPageWidgetItem * currentPage() const
Definition multipagedialogbase.cpp:133
MultiPageDialogBase::m_pAssocGeneralPage
AssociationGeneralPage * m_pAssocGeneralPage
Definition multipagedialogbase.h:93
MultiPageDialogBase::slotEnableButtonOk
void slotEnableButtonOk(bool state)
Definition multipagedialogbase.cpp:84
MultiPageDialogBase::applyStylePage
void applyStylePage()
Definition multipagedialogbase.cpp:431
MultiPageDialogBase::m_notePage
NotePage * m_notePage
Definition multipagedialogbase.h:94
MultiPageDialogBase::applyGeneralPage
void applyGeneralPage(MessageWidget *widget)
MultiPageDialogBase::setupAssociationRolePage
KPageWidgetItem * setupAssociationRolePage(AssociationWidget *widget)
Definition multipagedialogbase.cpp:441
MultiPageDialogBase::setupGeneralPage
void setupGeneralPage(AssociationWidget *widget)
Definition multipagedialogbase.cpp:297
MultiPageDialogBase::m_useDialog
bool m_useDialog
Definition multipagedialogbase.h:102
MultiPageDialogBase::accept
void accept()
Definition multipagedialogbase.cpp:121
MultiPageDialogBase::setCurrentPage
void setCurrentPage(KPageWidgetItem *page)
Definition multipagedialogbase.cpp:154
MultiPageDialogBase::m_isModified
bool m_isModified
Definition multipagedialogbase.h:103
MultiPageDialogBase::apply
void apply()
Definition multipagedialogbase.cpp:93
MultiPageDialogBase::slotOkClicked
void slotOkClicked()
Definition multipagedialogbase.cpp:184
MultiPageDialogBase::m_pageDialog
KPageDialog * m_pageDialog
Definition multipagedialogbase.h:100
MultiPageDialogBase::slotButtonClicked
void slotButtonClicked(QAbstractButton *button)
Definition multipagedialogbase.cpp:218
MultiPageDialogBase::applyFontPage
void applyFontPage(AssociationWidget *widget)
Definition multipagedialogbase.cpp:374
MultiPageDialogBase::m_pageWidget
KPageWidget * m_pageWidget
Definition multipagedialogbase.h:101
MultiPageDialogBase::m_pageItem
KPageWidgetItem * m_pageItem
Definition multipagedialogbase.h:99
MultiPageDialogBase::applyGeneralPage
void applyGeneralPage(AssociationWidget *widget)
NotePage
Definition notepage.h:19
NoteWidget
Displays a note box.
Definition notewidget.h:26
SelectOperationPage
A dialog page to select an operation.
Definition selectoperationpage.h:31
Settings::OptionState
Definition optionstate.h:308
UMLScene
Definition umlscene.h:65
UMLWidgetStylePage
Definition umlwidgetstylepage.h:28
UMLWidget
The base class for graphical UML objects.
Definition umlwidget.h:36
WidgetBase
Common base class for UMLWidget and AssociationWidget.
Definition widgetbase.h:101
icon_utils.h
Icon_Utils::IconType
IconType
Definition icon_utils.h:25
Settings
Definition codeviewerstate.cpp:10