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

settingsdialog.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2002-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5#ifndef SETTINGSDIALOG_H
6#define SETTINGSDIALOG_H
7
8// app includes
9#include "multipagedialogbase.h"
10#include "optionstate.h"
11
12// kde includes
13#include <kcombobox.h>
14#include <kcolorbutton.h>
15#include <klineedit.h>
16
17 class AutoLayoutOptionPage;
18 class ClassOptionsPage;
19 class CodeImportOptionsPage;
20 class CodeGenOptionsPage;
21 class CodeViewerOptionsPage;
22 class DontAskAgainWidget;
23 class GeneralOptionPage;
24 class KColorButton;
25 class KFontChooser;
26#if QT_VERSION < 0x050000
27 class KIntSpinBox;
28#endif
29 class UIOptionsPage;
30
31 class QCheckBox;
32#if QT_VERSION >= 0x050000
33 class QFontDialog;
34#endif
35 class QGroupBox;
36#if QT_VERSION >= 0x050000
37 class QSpinBox;
38#endif
39 class UMLWidgetStylePage;
40
46 class SettingsDialog : public MultiPageDialogBase
47{
48 Q_OBJECT
49
50 public:
51 SettingsDialog(QWidget * parent, Settings::OptionState *state);
52 ~SettingsDialog();
53
54 void setCurrentPage(PageType page);
55
56 //public methods
57 bool getChangesApplied() const {
58 return m_bChangesApplied;
59 }
60
61 QString getCodeGenerationLanguage();
62
63 protected:
64
65 private:
66 //private structs
67 struct UIWidgets {
68 QCheckBox * rightToLeftUI;
69 QGroupBox * colorGB;
70
71 QCheckBox * textColorCB;
72 QCheckBox * lineColorCB;
73 QCheckBox * fillColorCB;
74 QCheckBox * lineWidthCB;
75 QCheckBox * gridColorCB;
76 QCheckBox * bgColorCB;
77
78 KColorButton * textColorB;
79 KColorButton * lineColorB;
80 KColorButton * fillColorB;
81 KColorButton * gridColorB;
82 KColorButton * bgColorB;
83#if QT_VERSION >= 0x050000
84 QSpinBox * lineWidthB;
85#else
86 KIntSpinBox * lineWidthB;
87#endif
88 QCheckBox * useFillColorCB;
89 }
90 ;//end struct UIWidgets
91
92 //private methods
93 void setupUIPage();
94 void setupGeneralPage();
95 void setupClassPage();
96 void setupCodeImportPage();
97 void setupCodeGenPage();
98 void setupCodeViewerPage(Settings::CodeViewerState options);
99 void setupAutoLayoutPage();
100 void applyPage(KPageWidgetItem*);
101
102 //private attributes
103 DontAskAgainWidget *m_dontAskAgainWidget;
104 Settings::OptionState *m_pOptionState;
105 UMLWidgetStylePage * m_pUserInterfacePage;
106 AutoLayoutOptionPage * m_pAutoLayoutPage;
107 CodeImportOptionsPage * m_pCodeImportPage;
108 CodeGenOptionsPage * m_pCodeGenPage;
109 CodeViewerOptionsPage * m_pCodeViewerPage;
110 GeneralOptionPage * m_pGeneralPage;
111 ClassOptionsPage * m_pClassPage;
112 UIOptionsPage *m_uiOptionsPage;
113
114 bool m_bChangesApplied;
115 KPageWidgetItem *pageCodeViewer, *pageFont, *pageCodeImport, *pageCodeGen,
116 *pageUserInterface, *pageClass, *pageAutoLayout, *pageGeneral;
117
118 private slots:
119 void slotApply();
120 void slotOk();
121 void slotDefault();
122};
123
124#endif
AutoLayoutOptionPage
Definition: autolayoutoptionpage.h:20
ClassOptionsPage
A dialog page to display the class related options.
Definition: classoptionspage.h:35
CodeGenOptionsPage
Definition: codegenoptionspage.h:31
CodeImportOptionsPage
Definition: codeimportoptionspage.h:20
CodeViewerOptionsPage
Definition: codevieweroptionspage.h:18
DontAskAgainWidget
Definition: dontaskagain.h:62
GeneralOptionPage
Definition: generaloptionpage.h:33
MultiPageDialogBase
Definition: multipagedialogbase.h:47
MultiPageDialogBase::PageType
PageType
Available page types.
Definition: multipagedialogbase.h:52
SettingsDialog
Definition: settingsdialog.h:47
SettingsDialog::m_uiOptionsPage
UIOptionsPage * m_uiOptionsPage
Definition: settingsdialog.h:112
SettingsDialog::m_pUserInterfacePage
UMLWidgetStylePage * m_pUserInterfacePage
Definition: settingsdialog.h:105
SettingsDialog::slotDefault
void slotDefault()
Definition: settingsdialog.cpp:181
SettingsDialog::pageCodeImport
KPageWidgetItem * pageCodeImport
Definition: settingsdialog.h:115
SettingsDialog::applyPage
void applyPage(KPageWidgetItem *)
Definition: settingsdialog.cpp:219
SettingsDialog::setCurrentPage
void setCurrentPage(PageType page)
Definition: settingsdialog.cpp:71
SettingsDialog::m_bChangesApplied
bool m_bChangesApplied
Definition: settingsdialog.h:114
SettingsDialog::getCodeGenerationLanguage
QString getCodeGenerationLanguage()
Definition: settingsdialog.cpp:258
SettingsDialog::SettingsDialog
SettingsDialog(QWidget *parent, Settings::OptionState *state)
Definition: settingsdialog.cpp:41
SettingsDialog::setupCodeGenPage
void setupCodeGenPage()
Definition: settingsdialog.cpp:136
SettingsDialog::pageCodeGen
KPageWidgetItem * pageCodeGen
Definition: settingsdialog.h:115
SettingsDialog::setupCodeViewerPage
void setupCodeViewerPage(Settings::CodeViewerState options)
Definition: settingsdialog.cpp:145
SettingsDialog::pageCodeViewer
KPageWidgetItem * pageCodeViewer
Definition: settingsdialog.h:115
SettingsDialog::pageGeneral
KPageWidgetItem * pageGeneral
Definition: settingsdialog.h:116
SettingsDialog::m_pCodeGenPage
CodeGenOptionsPage * m_pCodeGenPage
Definition: settingsdialog.h:108
SettingsDialog::m_pCodeImportPage
CodeImportOptionsPage * m_pCodeImportPage
Definition: settingsdialog.h:107
SettingsDialog::m_pGeneralPage
GeneralOptionPage * m_pGeneralPage
Definition: settingsdialog.h:110
SettingsDialog::pageUserInterface
KPageWidgetItem * pageUserInterface
Definition: settingsdialog.h:116
SettingsDialog::pageAutoLayout
KPageWidgetItem * pageAutoLayout
Definition: settingsdialog.h:116
SettingsDialog::m_pClassPage
ClassOptionsPage * m_pClassPage
Definition: settingsdialog.h:111
SettingsDialog::setupGeneralPage
void setupGeneralPage()
Definition: settingsdialog.cpp:113
SettingsDialog::pageClass
KPageWidgetItem * pageClass
Definition: settingsdialog.h:116
SettingsDialog::setupAutoLayoutPage
void setupAutoLayoutPage()
Definition: settingsdialog.cpp:153
SettingsDialog::getChangesApplied
bool getChangesApplied() const
Definition: settingsdialog.h:57
SettingsDialog::slotOk
void slotOk()
Definition: settingsdialog.cpp:167
SettingsDialog::~SettingsDialog
~SettingsDialog()
Definition: settingsdialog.cpp:62
SettingsDialog::m_pAutoLayoutPage
AutoLayoutOptionPage * m_pAutoLayoutPage
Definition: settingsdialog.h:106
SettingsDialog::m_dontAskAgainWidget
DontAskAgainWidget * m_dontAskAgainWidget
Definition: settingsdialog.h:103
SettingsDialog::setupCodeImportPage
void setupCodeImportPage()
Definition: settingsdialog.cpp:129
SettingsDialog::setupClassPage
void setupClassPage()
Definition: settingsdialog.cpp:122
SettingsDialog::pageFont
KPageWidgetItem * pageFont
Definition: settingsdialog.h:115
SettingsDialog::m_pOptionState
Settings::OptionState * m_pOptionState
Definition: settingsdialog.h:104
SettingsDialog::m_pCodeViewerPage
CodeViewerOptionsPage * m_pCodeViewerPage
Definition: settingsdialog.h:109
SettingsDialog::slotApply
void slotApply()
Definition: settingsdialog.cpp:160
SettingsDialog::setupUIPage
void setupUIPage()
Definition: settingsdialog.cpp:106
Settings::CodeViewerState
configurable params for the code viewer tool
Definition: codeviewerstate.h:15
Settings::OptionState
Definition: optionstate.h:310
UIOptionsPage
A dialog page to display the user interface options.
Definition: uioptionspage.h:37
UMLWidgetStylePage
Definition: umlwidgetstylepage.h:33
multipagedialogbase.h
optionstate.h
SettingsDialog::UIWidgets
Definition: settingsdialog.h:67
SettingsDialog::UIWidgets::lineWidthCB
QCheckBox * lineWidthCB
Definition: settingsdialog.h:74
SettingsDialog::UIWidgets::useFillColorCB
QCheckBox * useFillColorCB
Definition: settingsdialog.h:88
SettingsDialog::UIWidgets::gridColorCB
QCheckBox * gridColorCB
Definition: settingsdialog.h:75
SettingsDialog::UIWidgets::lineWidthB
KIntSpinBox * lineWidthB
Definition: settingsdialog.h:86
SettingsDialog::UIWidgets::bgColorCB
QCheckBox * bgColorCB
Definition: settingsdialog.h:76
SettingsDialog::UIWidgets::lineColorB
KColorButton * lineColorB
Definition: settingsdialog.h:79
SettingsDialog::UIWidgets::textColorB
KColorButton * textColorB
Definition: settingsdialog.h:78
SettingsDialog::UIWidgets::rightToLeftUI
QCheckBox * rightToLeftUI
Definition: settingsdialog.h:68
SettingsDialog::UIWidgets::bgColorB
KColorButton * bgColorB
Definition: settingsdialog.h:82
SettingsDialog::UIWidgets::lineColorCB
QCheckBox * lineColorCB
Definition: settingsdialog.h:72
SettingsDialog::UIWidgets::fillColorB
KColorButton * fillColorB
Definition: settingsdialog.h:80
SettingsDialog::UIWidgets::gridColorB
KColorButton * gridColorB
Definition: settingsdialog.h:81
SettingsDialog::UIWidgets::colorGB
QGroupBox * colorGB
Definition: settingsdialog.h:69
SettingsDialog::UIWidgets::textColorCB
QCheckBox * textColorCB
Definition: settingsdialog.h:71
SettingsDialog::UIWidgets::fillColorCB
QCheckBox * fillColorCB
Definition: settingsdialog.h:73