settingsdlg.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef SETTINGSDLG_H
00014 #define SETTINGSDLG_H
00015
00016 #include <qgroupbox.h>
00017 #include <qcheckbox.h>
00018 #include <qpushbutton.h>
00019 #include <qlabel.h>
00020 #include <qradiobutton.h>
00021 #include <qbuttongroup.h>
00022 #include <qdict.h>
00023
00024 #include <kcombobox.h>
00025 #include <kfontdialog.h>
00026 #include <kdialogbase.h>
00027 #include <kcolorbutton.h>
00028 #include <knuminput.h>
00029
00030
00031 #include "../optionstate.h"
00032
00033 class CodeGenerationOptionsPage;
00034 class CodeViewerOptionsPage;
00035 class CodeGenerator;
00036
00043 class SettingsDlg : public KDialogBase {
00044
00045 Q_OBJECT
00046
00047 public:
00048 SettingsDlg(QWidget * parent, Settings::OptionState *state);
00049 ~SettingsDlg();
00050
00051
00052 bool getChangesApplied() {
00053 return m_bChangesApplied;
00054 }
00055
00056 QString getCodeGenerationLanguage();
00057
00058 protected:
00062 void insertDiagram( const QString& type, int index = -1 );
00066 void insertAttribScope( const QString& type, int index = -1 );
00070 void insertOperationScope( const QString& type, int index = -1 );
00071
00072 private:
00073
00074 struct UIWidgets {
00075 QGroupBox * colorGB;
00076
00077 QLabel * lineColorL;
00078 QLabel * fillColorL;
00079 QLabel * lineWidthL;
00080
00081 QPushButton * lineDefaultB;
00082 QPushButton * fillDefaultB;
00083 QPushButton * lineWidthDefaultB;
00084
00085 KColorButton * lineColorB;
00086 KColorButton * fillColorB;
00087 KIntSpinBox * lineWidthB;
00088
00089 QCheckBox * useFillColorCB;
00090 }
00091 ;
00092
00093 struct GeneralWidgets {
00094 QGroupBox * miscGB;
00095 QGroupBox * autosaveGB;
00096 QGroupBox * startupGB;
00097
00098 KIntSpinBox * timeISB;
00099 KComboBox * diagramKB;
00100
00101 QCheckBox * undoCB;
00102 QCheckBox * tabdiagramsCB;
00103 QCheckBox * newcodegenCB;
00104 QCheckBox * angularLinesCB;
00105 QCheckBox * autosaveCB;
00106 QCheckBox * logoCB;
00107 QCheckBox * tipCB;
00108 QCheckBox * loadlastCB;
00109
00110
00111
00112 QLineEdit * autosaveSuffixT;
00113 QLabel * autosaveSuffixL;
00114
00115
00116 QLabel * startL;
00117 QLabel * autosaveL;
00118 }
00119 ;
00120
00121 struct ClassWidgets {
00122 QGroupBox * visibilityGB;
00123 QGroupBox * scopeGB;
00124
00125 QCheckBox * showVisibilityCB;
00126 QCheckBox * showAttsCB;
00127 QCheckBox * showOpsCB;
00128 QCheckBox * showStereotypeCB;
00129 QCheckBox * showAttSigCB;
00130 QCheckBox * showPackageCB;
00131
00132 QCheckBox * showOpSigCB;
00133
00134 QLabel * attributeLabel;
00135 QLabel * operationLabel;
00136
00137 KComboBox* m_pAttribScopeCB;
00138 KComboBox* m_pOperationScopeCB;
00139
00140 }
00141 ;
00142
00143 struct FontWidgets {
00144 KFontChooser * chooser;
00145 };
00146
00147
00148 void setupFontPage();
00149 void setupUIPage();
00150 void setupGeneralPage();
00151 void setupClassPage();
00152 void setupCodeGenPage();
00153 void setupCodeViewerPage(Settings::CodeViewerState options);
00154 void applyPage( Settings::Page page );
00155
00156
00157 FontWidgets m_FontWidgets;
00158 GeneralWidgets m_GeneralWidgets;
00159 UIWidgets m_UiWidgets;
00160 ClassWidgets m_ClassWidgets;
00161 Settings::OptionState *m_pOptionState;
00162 CodeGenerationOptionsPage * m_pCodeGenPage;
00163 CodeViewerOptionsPage * m_pCodeViewerPage;
00164
00165 KConfig * m_pCfg;
00166 bool m_bChangesApplied;
00167
00168 private slots:
00169 void slotApply();
00170 void slotOk();
00171 void slotDefault();
00172 void slotLineBClicked();
00173 void slotFillBClicked();
00174 void slotAutosaveCBClicked();
00175 };
00176
00177 #endif
This file is part of the documentation for umbrello Version 3.1.0.