umbrello: umbrello/dialogs/settingsdialog.h Source File

umbrello 25.04.1 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-2022 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
17class AutoLayoutOptionPage;
18class ClassOptionsPage;
19class CodeImportOptionsPage;
20class CodeGenOptionsPage;
21class CodeViewerOptionsPage;
22class DontAskAgainWidget;
23class GeneralOptionPage;
24class KColorButton;
25class KFontChooser;
26class UIOptionsPage;
27
28class QCheckBox;
29class QFontDialog;
30class QGroupBox;
31class QSpinBox;
32class UMLWidgetStylePage;
33
39 class SettingsDialog : public MultiPageDialogBase
40{
41 Q_OBJECT
42
43public:
44 SettingsDialog(QWidget * parent, Settings::OptionState *state);
45 ~SettingsDialog();
46
47 void setCurrentPage(PageType page);
48
49 //public methods
50 bool getChangesApplied() const {
51 return m_bChangesApplied;
52 }
53
54 QString getCodeGenerationLanguage();
55
56protected:
57
58private:
59 //private structs
60 struct UIWidgets {
61 QCheckBox * rightToLeftUI;
62 QGroupBox * colorGB;
63
64 QCheckBox * textColorCB;
65 QCheckBox * lineColorCB;
66 QCheckBox * fillColorCB;
67 QCheckBox * lineWidthCB;
68 QCheckBox * gridColorCB;
69 QCheckBox * bgColorCB;
70
71 KColorButton * textColorB;
72 KColorButton * lineColorB;
73 KColorButton * fillColorB;
74 KColorButton * gridColorB;
75 KColorButton * bgColorB;
76 QSpinBox * lineWidthB;
77 QCheckBox * useFillColorCB;
78 }
79 ;//end struct UIWidgets
80
81 //private methods
82 void setupUIPage();
83 void setupGeneralPage();
84 void setupClassPage();
85 void setupCodeImportPage();
86 void setupCodeGenPage();
87 void setupCodeViewerPage(Settings::CodeViewerState options);
88 void setupAutoLayoutPage();
89 void applyPage(KPageWidgetItem*);
90
91 //private attributes
92 DontAskAgainWidget *m_dontAskAgainWidget;
93 Settings::OptionState *m_pOptionState;
94 UMLWidgetStylePage * m_pUserInterfacePage;
95 AutoLayoutOptionPage * m_pAutoLayoutPage;
96 CodeImportOptionsPage * m_pCodeImportPage;
97 CodeGenOptionsPage * m_pCodeGenPage;
98 CodeViewerOptionsPage * m_pCodeViewerPage;
99 GeneralOptionPage * m_pGeneralPage;
100 ClassOptionsPage * m_pClassPage;
101 UIOptionsPage *m_uiOptionsPage;
102
103 bool m_bChangesApplied;
104 KPageWidgetItem *pageCodeViewer, *pageFont, *pageCodeImport, *pageCodeGen,
105 *pageUserInterface, *pageClass, *pageAutoLayout, *pageGeneral;
106
107private Q_SLOTS:
108 void slotApply();
109 void slotOk();
110 void slotDefault();
111};
112
113#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:28
MultiPageDialogBase::MultiPageDialogBase
MultiPageDialogBase(QWidget *parent, bool withDefaultButton=false)
Definition multipagedialogbase.cpp:43
MultiPageDialogBase::PageType
PageType
Available page types.
Definition multipagedialogbase.h:52
SettingsDialog::m_uiOptionsPage
UIOptionsPage * m_uiOptionsPage
Definition settingsdialog.h:101
SettingsDialog::m_pUserInterfacePage
UMLWidgetStylePage * m_pUserInterfacePage
Definition settingsdialog.h:94
SettingsDialog::slotDefault
void slotDefault()
Definition settingsdialog.cpp:173
SettingsDialog::pageCodeImport
KPageWidgetItem * pageCodeImport
Definition settingsdialog.h:104
SettingsDialog::applyPage
void applyPage(KPageWidgetItem *)
Definition settingsdialog.cpp:211
SettingsDialog::setCurrentPage
void setCurrentPage(PageType page)
Definition settingsdialog.cpp:62
SettingsDialog::m_bChangesApplied
bool m_bChangesApplied
Definition settingsdialog.h:103
SettingsDialog::getCodeGenerationLanguage
QString getCodeGenerationLanguage()
Definition settingsdialog.cpp:250
SettingsDialog::SettingsDialog
SettingsDialog(QWidget *parent, Settings::OptionState *state)
Definition settingsdialog.cpp:32
SettingsDialog::setupCodeGenPage
void setupCodeGenPage()
Definition settingsdialog.cpp:127
SettingsDialog::pageCodeGen
KPageWidgetItem * pageCodeGen
Definition settingsdialog.h:104
SettingsDialog::setupCodeViewerPage
void setupCodeViewerPage(Settings::CodeViewerState options)
Definition settingsdialog.cpp:136
SettingsDialog::pageCodeViewer
KPageWidgetItem * pageCodeViewer
Definition settingsdialog.h:104
SettingsDialog::pageGeneral
KPageWidgetItem * pageGeneral
Definition settingsdialog.h:105
SettingsDialog::m_pCodeGenPage
CodeGenOptionsPage * m_pCodeGenPage
Definition settingsdialog.h:97
SettingsDialog::m_pCodeImportPage
CodeImportOptionsPage * m_pCodeImportPage
Definition settingsdialog.h:96
SettingsDialog::m_pGeneralPage
GeneralOptionPage * m_pGeneralPage
Definition settingsdialog.h:99
SettingsDialog::pageUserInterface
KPageWidgetItem * pageUserInterface
Definition settingsdialog.h:105
SettingsDialog::pageAutoLayout
KPageWidgetItem * pageAutoLayout
Definition settingsdialog.h:105
SettingsDialog::m_pClassPage
ClassOptionsPage * m_pClassPage
Definition settingsdialog.h:100
SettingsDialog::setupGeneralPage
void setupGeneralPage()
Definition settingsdialog.cpp:104
SettingsDialog::pageClass
KPageWidgetItem * pageClass
Definition settingsdialog.h:105
SettingsDialog::setupAutoLayoutPage
void setupAutoLayoutPage()
Definition settingsdialog.cpp:144
SettingsDialog::getChangesApplied
bool getChangesApplied() const
Definition settingsdialog.h:50
SettingsDialog::slotOk
void slotOk()
Definition settingsdialog.cpp:158
SettingsDialog::~SettingsDialog
~SettingsDialog()
Definition settingsdialog.cpp:53
SettingsDialog::m_pAutoLayoutPage
AutoLayoutOptionPage * m_pAutoLayoutPage
Definition settingsdialog.h:95
SettingsDialog::m_dontAskAgainWidget
DontAskAgainWidget * m_dontAskAgainWidget
Definition settingsdialog.h:92
SettingsDialog::setupCodeImportPage
void setupCodeImportPage()
Definition settingsdialog.cpp:120
SettingsDialog::setupClassPage
void setupClassPage()
Definition settingsdialog.cpp:113
SettingsDialog::pageFont
KPageWidgetItem * pageFont
Definition settingsdialog.h:104
SettingsDialog::m_pOptionState
Settings::OptionState * m_pOptionState
Definition settingsdialog.h:93
SettingsDialog::m_pCodeViewerPage
CodeViewerOptionsPage * m_pCodeViewerPage
Definition settingsdialog.h:98
SettingsDialog::slotApply
void slotApply()
Definition settingsdialog.cpp:151
SettingsDialog::setupUIPage
void setupUIPage()
Definition settingsdialog.cpp:97
Settings::CodeViewerState
configurable params for the code viewer tool
Definition codeviewerstate.h:15
Settings::OptionState
Definition optionstate.h:309
UIOptionsPage
A dialog page to display the user interface options.
Definition uioptionspage.h:37
UMLWidgetStylePage
Definition umlwidgetstylepage.h:28
multipagedialogbase.h
optionstate.h
SettingsDialog::UIWidgets
Definition settingsdialog.h:60
SettingsDialog::UIWidgets::lineWidthCB
QCheckBox * lineWidthCB
Definition settingsdialog.h:67
SettingsDialog::UIWidgets::lineWidthB
QSpinBox * lineWidthB
Definition settingsdialog.h:76
SettingsDialog::UIWidgets::useFillColorCB
QCheckBox * useFillColorCB
Definition settingsdialog.h:77
SettingsDialog::UIWidgets::gridColorCB
QCheckBox * gridColorCB
Definition settingsdialog.h:68
SettingsDialog::UIWidgets::bgColorCB
QCheckBox * bgColorCB
Definition settingsdialog.h:69
SettingsDialog::UIWidgets::lineColorB
KColorButton * lineColorB
Definition settingsdialog.h:72
SettingsDialog::UIWidgets::textColorB
KColorButton * textColorB
Definition settingsdialog.h:71
SettingsDialog::UIWidgets::rightToLeftUI
QCheckBox * rightToLeftUI
Definition settingsdialog.h:61
SettingsDialog::UIWidgets::bgColorB
KColorButton * bgColorB
Definition settingsdialog.h:75
SettingsDialog::UIWidgets::lineColorCB
QCheckBox * lineColorCB
Definition settingsdialog.h:65
SettingsDialog::UIWidgets::fillColorB
KColorButton * fillColorB
Definition settingsdialog.h:73
SettingsDialog::UIWidgets::gridColorB
KColorButton * gridColorB
Definition settingsdialog.h:74
SettingsDialog::UIWidgets::colorGB
QGroupBox * colorGB
Definition settingsdialog.h:62
SettingsDialog::UIWidgets::textColorCB
QCheckBox * textColorCB
Definition settingsdialog.h:64
SettingsDialog::UIWidgets::fillColorCB
QCheckBox * fillColorCB
Definition settingsdialog.h:66