umbrello: umbrello/dialogs/settingsdialog.h Source File

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 * 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 #ifndef SETTINGSDIALOG_H
11 #define SETTINGSDIALOG_H
12
13 // app includes
14 #include "multipagedialogbase.h"
15 #include "optionstate.h"
16
17 // kde includes
18 #include <kcombobox.h>
19 #include <kcolorbutton.h>
20 #include <klineedit.h>
21
22 class AutoLayoutOptionPage;
23 class ClassOptionsPage;
24 class CodeImportOptionsPage;
25 class CodeGenOptionsPage;
26 class CodeViewerOptionsPage;
27 class DontAskAgainWidget;
28 class GeneralOptionPage;
29 class KColorButton;
30 class KFontChooser;
31 #if QT_VERSION < 0x050000
32 class KIntSpinBox;
33 #endif
34 class UIOptionsPage;
35
36 class QCheckBox;
37 #if QT_VERSION >= 0x050000
38 class QFontDialog;
39 #endif
40 class QGroupBox;
41 #if QT_VERSION >= 0x050000
42 class QSpinBox;
43 #endif
44 class UMLWidgetStylePage;
45
51 class SettingsDialog : public MultiPageDialogBase
52 {
53 Q_OBJECT
54
55 public:
56 SettingsDialog(QWidget * parent, Settings::OptionState *state);
57 ~SettingsDialog();
58
59 void setCurrentPage(PageType page);
60
61 //public methods
62 bool getChangesApplied() {
63 return m_bChangesApplied;
64 }
65
66 QString getCodeGenerationLanguage();
67
68 protected:
69
70 private:
71 //private structs
72 struct UIWidgets {
73 QCheckBox * rightToLeftUI;
74 QGroupBox * colorGB;
75
76 QCheckBox * textColorCB;
77 QCheckBox * lineColorCB;
78 QCheckBox * fillColorCB;
79 QCheckBox * lineWidthCB;
80 QCheckBox * gridColorCB;
81 QCheckBox * bgColorCB;
82
83 KColorButton * textColorB;
84 KColorButton * lineColorB;
85 KColorButton * fillColorB;
86 KColorButton * gridColorB;
87 KColorButton * bgColorB;
88 #if QT_VERSION >= 0x050000
89 QSpinBox * lineWidthB;
90 #else
91 KIntSpinBox * lineWidthB;
92 #endif
93 QCheckBox * useFillColorCB;
94 }
95 ;//end struct UIWidgets
96
97 //private methods
98 void setupUIPage();
99 void setupGeneralPage();
100 void setupClassPage();
101 void setupCodeImportPage();
102 void setupCodeGenPage();
103 void setupCodeViewerPage(Settings::CodeViewerState options);
104 void setupAutoLayoutPage();
105 void applyPage(KPageWidgetItem*);
106
107 //private attributes
108 DontAskAgainWidget *m_dontAskAgainWidget;
109 Settings::OptionState *m_pOptionState;
110 UMLWidgetStylePage * m_pUserInterfacePage;
111 AutoLayoutOptionPage * m_pAutoLayoutPage;
112 CodeImportOptionsPage * m_pCodeImportPage;
113 CodeGenOptionsPage * m_pCodeGenPage;
114 CodeViewerOptionsPage * m_pCodeViewerPage;
115 GeneralOptionPage * m_pGeneralPage;
116 ClassOptionsPage * m_pClassPage;
117 UIOptionsPage *m_uiOptionsPage;
118
119 bool m_bChangesApplied;
120 KPageWidgetItem *pageCodeViewer, *pageFont, *pageCodeImport, *pageCodeGen,
121 *pageUserInterface, *pageClass, *pageAutoLayout, *pageGeneral;
122
123 private slots:
124 void slotApply();
125 void slotOk();
126 void slotDefault();
127 };
128
129 #endif
AutoLayoutOptionPage
Definition: autolayoutoptionpage.h:25
ClassOptionsPage
A dialog page to display the class related options.
Definition: classoptionspage.h:40
CodeGenOptionsPage
Definition: codegenoptionspage.h:36
CodeImportOptionsPage
Definition: codeimportoptionspage.h:33
CodeViewerOptionsPage
Definition: codevieweroptionspage.h:23
DontAskAgainWidget
Definition: dontaskagain.h:67
GeneralOptionPage
Definition: generaloptionpage.h:38
MultiPageDialogBase
Definition: multipagedialogbase.h:52
MultiPageDialogBase::PageType
PageType
Available page types.
Definition: multipagedialogbase.h:57
SettingsDialog
Definition: settingsdialog.h:52
SettingsDialog::m_uiOptionsPage
UIOptionsPage * m_uiOptionsPage
Definition: settingsdialog.h:117
SettingsDialog::m_pUserInterfacePage
UMLWidgetStylePage * m_pUserInterfacePage
Definition: settingsdialog.h:110
SettingsDialog::slotDefault
void slotDefault()
Definition: settingsdialog.cpp:185
SettingsDialog::pageCodeImport
KPageWidgetItem * pageCodeImport
Definition: settingsdialog.h:120
SettingsDialog::applyPage
void applyPage(KPageWidgetItem *)
Definition: settingsdialog.cpp:223
SettingsDialog::setCurrentPage
void setCurrentPage(PageType page)
Definition: settingsdialog.cpp:76
SettingsDialog::m_bChangesApplied
bool m_bChangesApplied
Definition: settingsdialog.h:119
SettingsDialog::getCodeGenerationLanguage
QString getCodeGenerationLanguage()
Definition: settingsdialog.cpp:262
SettingsDialog::getChangesApplied
bool getChangesApplied()
Definition: settingsdialog.h:62
SettingsDialog::SettingsDialog
SettingsDialog(QWidget *parent, Settings::OptionState *state)
Definition: settingsdialog.cpp:46
SettingsDialog::setupCodeGenPage
void setupCodeGenPage()
Definition: settingsdialog.cpp:141
SettingsDialog::pageCodeGen
KPageWidgetItem * pageCodeGen
Definition: settingsdialog.h:120
SettingsDialog::setupCodeViewerPage
void setupCodeViewerPage(Settings::CodeViewerState options)
Definition: settingsdialog.cpp:150
SettingsDialog::pageCodeViewer
KPageWidgetItem * pageCodeViewer
Definition: settingsdialog.h:120
SettingsDialog::pageGeneral
KPageWidgetItem * pageGeneral
Definition: settingsdialog.h:121
SettingsDialog::m_pCodeGenPage
CodeGenOptionsPage * m_pCodeGenPage
Definition: settingsdialog.h:113
SettingsDialog::m_pCodeImportPage
CodeImportOptionsPage * m_pCodeImportPage
Definition: settingsdialog.h:112
SettingsDialog::m_pGeneralPage
GeneralOptionPage * m_pGeneralPage
Definition: settingsdialog.h:115
SettingsDialog::pageUserInterface
KPageWidgetItem * pageUserInterface
Definition: settingsdialog.h:121
SettingsDialog::pageAutoLayout
KPageWidgetItem * pageAutoLayout
Definition: settingsdialog.h:121
SettingsDialog::m_pClassPage
ClassOptionsPage * m_pClassPage
Definition: settingsdialog.h:116
SettingsDialog::setupGeneralPage
void setupGeneralPage()
Definition: settingsdialog.cpp:118
SettingsDialog::pageClass
KPageWidgetItem * pageClass
Definition: settingsdialog.h:121
SettingsDialog::setupAutoLayoutPage
void setupAutoLayoutPage()
Definition: settingsdialog.cpp:158
SettingsDialog::slotOk
void slotOk()
Definition: settingsdialog.cpp:172
SettingsDialog::~SettingsDialog
~SettingsDialog()
Definition: settingsdialog.cpp:67
SettingsDialog::m_pAutoLayoutPage
AutoLayoutOptionPage * m_pAutoLayoutPage
Definition: settingsdialog.h:111
SettingsDialog::m_dontAskAgainWidget
DontAskAgainWidget * m_dontAskAgainWidget
Definition: settingsdialog.h:108
SettingsDialog::setupCodeImportPage
void setupCodeImportPage()
Definition: settingsdialog.cpp:134
SettingsDialog::setupClassPage
void setupClassPage()
Definition: settingsdialog.cpp:127
SettingsDialog::pageFont
KPageWidgetItem * pageFont
Definition: settingsdialog.h:120
SettingsDialog::m_pOptionState
Settings::OptionState * m_pOptionState
Definition: settingsdialog.h:109
SettingsDialog::m_pCodeViewerPage
CodeViewerOptionsPage * m_pCodeViewerPage
Definition: settingsdialog.h:114
SettingsDialog::slotApply
void slotApply()
Definition: settingsdialog.cpp:165
SettingsDialog::setupUIPage
void setupUIPage()
Definition: settingsdialog.cpp:111
Settings::CodeViewerState
configurable params for the code viewer tool
Definition: codeviewerstate.h:20
Settings::OptionState
Definition: optionstate.h:314
UIOptionsPage
A dialog page to display the user interface options.
Definition: uioptionspage.h:42
UMLWidgetStylePage
Definition: umlwidgetstylepage.h:38
multipagedialogbase.h
optionstate.h
SettingsDialog::UIWidgets
Definition: settingsdialog.h:72
SettingsDialog::UIWidgets::lineWidthCB
QCheckBox * lineWidthCB
Definition: settingsdialog.h:79
SettingsDialog::UIWidgets::useFillColorCB
QCheckBox * useFillColorCB
Definition: settingsdialog.h:93
SettingsDialog::UIWidgets::gridColorCB
QCheckBox * gridColorCB
Definition: settingsdialog.h:80
SettingsDialog::UIWidgets::lineWidthB
KIntSpinBox * lineWidthB
Definition: settingsdialog.h:91
SettingsDialog::UIWidgets::bgColorCB
QCheckBox * bgColorCB
Definition: settingsdialog.h:81
SettingsDialog::UIWidgets::lineColorB
KColorButton * lineColorB
Definition: settingsdialog.h:84
SettingsDialog::UIWidgets::textColorB
KColorButton * textColorB
Definition: settingsdialog.h:83
SettingsDialog::UIWidgets::rightToLeftUI
QCheckBox * rightToLeftUI
Definition: settingsdialog.h:73
SettingsDialog::UIWidgets::bgColorB
KColorButton * bgColorB
Definition: settingsdialog.h:87
SettingsDialog::UIWidgets::lineColorCB
QCheckBox * lineColorCB
Definition: settingsdialog.h:77
SettingsDialog::UIWidgets::fillColorB
KColorButton * fillColorB
Definition: settingsdialog.h:85
SettingsDialog::UIWidgets::gridColorB
KColorButton * gridColorB
Definition: settingsdialog.h:86
SettingsDialog::UIWidgets::colorGB
QGroupBox * colorGB
Definition: settingsdialog.h:74
SettingsDialog::UIWidgets::textColorCB
QCheckBox * textColorCB
Definition: settingsdialog.h:76
SettingsDialog::UIWidgets::fillColorCB
QCheckBox * fillColorCB
Definition: settingsdialog.h:78