00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "settingsdlg.h"
00014
00015
00016 #include <qlayout.h>
00017 #include <qtooltip.h>
00018 #include <qvbox.h>
00019
00020 #include <kdebug.h>
00021 #include <kiconloader.h>
00022 #include <klocale.h>
00023 #include <kfiledialog.h>
00024
00025 #include "codegenerationoptionspage.h"
00026 #include "codevieweroptionspage.h"
00027 #include "../dialog_utils.h"
00028
00029 SettingsDlg::SettingsDlg( QWidget * parent, Settings::OptionState *state )
00030 : KDialogBase( IconList, i18n("Umbrello Setup"),
00031 Help | Default | Apply | Ok | Cancel, Ok, parent, 0, true, true ) {
00032 m_bChangesApplied = false;
00033 m_pOptionState = state;
00034 setHelp( "umbrello/index.html", QString::null );
00035 setupGeneralPage();
00036 setupFontPage();
00037 setupUIPage();
00038 setupClassPage();
00039 setupCodeGenPage();
00040 setupCodeViewerPage(state->codeViewerState);
00041 }
00042
00043 SettingsDlg::~SettingsDlg() {}
00044
00045 void SettingsDlg::setupUIPage() {
00046
00047 QVBox * page = addVBoxPage( i18n("User Interface"), i18n("User Interface Settings"), DesktopIcon( "window_list") );
00048
00049 m_UiWidgets.colorGB = new QGroupBox( i18n("Color"), page );
00050 QGridLayout * colorLayout = new QGridLayout( m_UiWidgets.colorGB, 3, 3 );
00051 colorLayout -> setSpacing( spacingHint() );
00052 colorLayout -> setMargin( fontMetrics().height() );
00053
00054 m_UiWidgets.lineColorL = new QLabel( i18n("Line color:"), m_UiWidgets.colorGB );
00055 colorLayout -> addWidget( m_UiWidgets.lineColorL, 0, 0 );
00056
00057 m_UiWidgets.lineColorB = new KColorButton( m_pOptionState->uiState.lineColor, m_UiWidgets.colorGB );
00058 colorLayout -> addWidget( m_UiWidgets.lineColorB, 0, 1 );
00059
00060 m_UiWidgets.lineDefaultB = new QPushButton( i18n("D&efault Color"), m_UiWidgets.colorGB );
00061 colorLayout -> addWidget( m_UiWidgets.lineDefaultB, 0, 2 );
00062
00063 m_UiWidgets.fillColorL = new QLabel( i18n("Fill color:"), m_UiWidgets.colorGB );
00064 colorLayout -> addWidget( m_UiWidgets.fillColorL, 1, 0 );
00065
00066 m_UiWidgets.fillColorB = new KColorButton( m_pOptionState->uiState.fillColor, m_UiWidgets.colorGB );
00067 colorLayout -> addWidget( m_UiWidgets.fillColorB, 1, 1 );
00068
00069 m_UiWidgets.fillDefaultB = new QPushButton( i18n("De&fault Color"), m_UiWidgets.colorGB );
00070 colorLayout -> addWidget( m_UiWidgets.fillDefaultB, 1, 2 );
00071
00072
00073 m_UiWidgets.lineWidthL = new QLabel( i18n("Line width:"), m_UiWidgets.colorGB );
00074 colorLayout -> addWidget( m_UiWidgets.lineWidthL, 2, 0 );
00075
00076
00077
00078 m_UiWidgets.lineWidthB = new KIntSpinBox( 0, 10, 1, m_pOptionState->uiState.lineWidth, 10, m_UiWidgets.colorGB );
00079 colorLayout -> addWidget( m_UiWidgets.lineWidthB, 2, 1 );
00080
00081 m_UiWidgets.lineWidthDefaultB = new QPushButton( i18n("D&efault Width"), m_UiWidgets.colorGB );
00082 colorLayout -> addWidget( m_UiWidgets.lineWidthDefaultB, 2, 2 );
00083
00084
00085
00086 m_UiWidgets.useFillColorCB = new QCheckBox( i18n("&Use fill color"), m_UiWidgets.colorGB );
00087 colorLayout -> setRowStretch( 3, 2 );
00088 colorLayout -> addWidget( m_UiWidgets.useFillColorCB, 3, 0 );
00089 m_UiWidgets.useFillColorCB -> setChecked( m_pOptionState->uiState.useFillColor );
00090
00091
00092 connect( m_UiWidgets.lineDefaultB, SIGNAL(clicked()), this, SLOT(slotLineBClicked()) );
00093 connect( m_UiWidgets.fillDefaultB, SIGNAL(clicked()), this, SLOT(slotFillBClicked()) );
00094 }
00095
00096 void SettingsDlg::setupGeneralPage() {
00097
00098
00099 QVBox * page = addVBoxPage( i18n("General"), i18n("General Settings"), DesktopIcon( "misc") );
00100
00101
00102 m_GeneralWidgets.miscGB = new QGroupBox( i18n("Miscellaneous"), page );
00103
00104 QGridLayout * miscLayout = new QGridLayout( m_GeneralWidgets.miscGB, 2, 2 );
00105 miscLayout -> setSpacing( spacingHint() );
00106 miscLayout -> setMargin( fontMetrics().height() );
00107
00108 m_GeneralWidgets.undoCB = new QCheckBox( i18n("Enable undo"), m_GeneralWidgets.miscGB );
00109 m_GeneralWidgets.undoCB -> setChecked( m_pOptionState->generalState.undo );
00110 miscLayout -> addWidget( m_GeneralWidgets.undoCB, 0, 0 );
00111
00112 m_GeneralWidgets.tabdiagramsCB = new QCheckBox( i18n("Use tabbed diagrams"), m_GeneralWidgets.miscGB );
00113 m_GeneralWidgets.tabdiagramsCB -> setChecked( m_pOptionState->generalState.tabdiagrams );
00114 miscLayout -> addWidget( m_GeneralWidgets.tabdiagramsCB, 0, 1 );
00115
00116 m_GeneralWidgets.newcodegenCB = new QCheckBox( i18n("Use new C++/Java/Ruby generators"), m_GeneralWidgets.miscGB );
00117 m_GeneralWidgets.newcodegenCB -> setChecked( m_pOptionState->generalState.newcodegen );
00118 miscLayout -> addWidget( m_GeneralWidgets.newcodegenCB, 1, 0 );
00119
00120 m_GeneralWidgets.angularLinesCB = new QCheckBox( i18n("Use angular association lines"), m_GeneralWidgets.miscGB );
00121 m_GeneralWidgets.angularLinesCB -> setChecked( m_pOptionState->generalState.angularlines );
00122 miscLayout -> addWidget( m_GeneralWidgets.angularLinesCB, 1, 1 );
00123
00124
00125
00126 m_GeneralWidgets.autosaveGB = new QGroupBox( i18n("Autosave"), page );
00127
00128 QGridLayout * autosaveLayout = new QGridLayout( m_GeneralWidgets.autosaveGB, 3, 2 );
00129 autosaveLayout -> setSpacing( spacingHint() );
00130 autosaveLayout -> setMargin( fontMetrics().height() );
00131
00132 m_GeneralWidgets.autosaveCB = new QCheckBox( i18n("E&nable autosave"), m_GeneralWidgets.autosaveGB );
00133 m_GeneralWidgets.autosaveCB -> setChecked( m_pOptionState->generalState.autosave );
00134 autosaveLayout -> addWidget( m_GeneralWidgets.autosaveCB, 0, 0 );
00135
00136 m_GeneralWidgets.autosaveL = new QLabel( i18n("Select auto-save time interval (mins):"), m_GeneralWidgets.autosaveGB );
00137 autosaveLayout -> addWidget( m_GeneralWidgets.autosaveL, 1, 0 );
00138
00139 m_GeneralWidgets.timeISB = new KIntSpinBox( 1, 600, 1, m_pOptionState->generalState.autosavetime, 10, m_GeneralWidgets.autosaveGB );
00140 m_GeneralWidgets.timeISB -> setEnabled( m_pOptionState->generalState.autosave );
00141 autosaveLayout -> addWidget( m_GeneralWidgets.timeISB, 1, 1 );
00142
00143
00144
00145 Dialog_Utils::makeLabeledEditField( m_GeneralWidgets.autosaveGB, autosaveLayout, 2,
00146 m_GeneralWidgets.autosaveSuffixL, i18n("Set autosave suffix:"),
00147 m_GeneralWidgets.autosaveSuffixT, m_pOptionState->generalState.autosavesuffix );
00148 QString autoSaveSuffixToolTip = i18n( "<qt><p>The autosave file will be saved to ~/autosave.xmi if the autosaving occurs "
00149 "before you have manually saved the file.</p>"
00150 "<p>If you've already saved it, the autosave file will be saved in the same folder as the file "
00151 "and will be named like the file's name, followed by the suffix specified.</p>"
00152 "<p>If the suffix is equal to the suffix of the file you've saved, "
00153 "the autosave will overwrite your file automatically.</p></qt>" );
00154 QToolTip::add( m_GeneralWidgets.autosaveSuffixL, autoSaveSuffixToolTip );
00155 QToolTip::add( m_GeneralWidgets.autosaveSuffixT, autoSaveSuffixToolTip );
00156
00157
00158 m_GeneralWidgets.startupGB = new QGroupBox( i18n("Startup"), page );
00159
00160 QGridLayout * startupLayout = new QGridLayout( m_GeneralWidgets.startupGB, 3, 2 );
00161 startupLayout -> setSpacing( spacingHint() );
00162 startupLayout -> setMargin( fontMetrics().height() );
00163
00164 m_GeneralWidgets.logoCB = new QCheckBox( i18n("Sta&rtup logo"), m_GeneralWidgets.startupGB );
00165 m_GeneralWidgets.logoCB -> setChecked( m_pOptionState->generalState.logo );
00166 startupLayout -> addWidget( m_GeneralWidgets.logoCB, 0, 0 );
00167
00168 m_GeneralWidgets.tipCB = new QCheckBox( i18n("&Tip of the day"), m_GeneralWidgets.startupGB );
00169 m_GeneralWidgets.tipCB -> setChecked( m_pOptionState->generalState.tip );
00170 startupLayout -> addWidget( m_GeneralWidgets.tipCB, 0, 1 );
00171
00172 m_GeneralWidgets.loadlastCB = new QCheckBox( i18n("&Load last project"), m_GeneralWidgets.startupGB );
00173 m_GeneralWidgets.loadlastCB -> setChecked( m_pOptionState->generalState.loadlast );
00174 startupLayout -> addWidget( m_GeneralWidgets.loadlastCB, 1, 0 );
00175
00176 m_GeneralWidgets.startL = new QLabel( i18n("Start new project with:"), m_GeneralWidgets.startupGB );
00177 startupLayout -> addWidget( m_GeneralWidgets.startL, 2, 0 );
00178
00179 m_GeneralWidgets.diagramKB = new KComboBox( m_GeneralWidgets.startupGB );
00180 m_GeneralWidgets.diagramKB->setCompletionMode( KGlobalSettings::CompletionPopup );
00181 startupLayout -> addWidget( m_GeneralWidgets.diagramKB, 2, 1 );
00182
00183 QString diagrams [] = { i18n("No Diagram"), i18n("Class Diagram"),
00184 i18n("Use Case Diagram"), i18n("Sequence Diagram"),
00185 i18n("Collaboration Diagram"), i18n("State Diagram"),
00186 i18n("Activity Diagram"), i18n("Component Diagram"),
00187 i18n("Deployment Diagram") };
00188
00189
00190 for (int i=1; i<9; i++) {
00191 insertDiagram( diagrams[i] );
00192 }
00193
00194 m_GeneralWidgets.diagramKB->setCurrentItem( (int)m_pOptionState->generalState.diagram-1 );
00195 connect( m_GeneralWidgets.autosaveCB, SIGNAL(clicked()), this, SLOT(slotAutosaveCBClicked()) );
00196 }
00197
00201 void SettingsDlg::insertDiagram( const QString& type, int index )
00202 {
00203 m_GeneralWidgets.diagramKB->insertItem( type, index );
00204 m_GeneralWidgets.diagramKB->completionObject()->addItem( type );
00205 }
00206
00207 void SettingsDlg::setupClassPage() {
00208
00209
00210 QVBox * page = addVBoxPage( i18n("Class"), i18n("Class Settings"), DesktopIcon( "edit") );
00211 m_ClassWidgets.visibilityGB = new QGroupBox( i18n("Visibility"), page );
00212
00213 QGridLayout * visibilityLayout = new QGridLayout( m_ClassWidgets.visibilityGB );
00214 visibilityLayout -> setSpacing( spacingHint() );
00215 visibilityLayout -> setMargin( fontMetrics().height() );
00216
00217 m_ClassWidgets.showVisibilityCB = new QCheckBox(i18n("Show &visibility"), m_ClassWidgets.visibilityGB);
00218 m_ClassWidgets.showVisibilityCB -> setChecked( m_pOptionState->classState.showVisibility );
00219 visibilityLayout -> addWidget( m_ClassWidgets.showVisibilityCB, 0, 0 );
00220
00221 m_ClassWidgets.showAttsCB = new QCheckBox( i18n("Show attributes"), m_ClassWidgets.visibilityGB );
00222 m_ClassWidgets.showAttsCB -> setChecked( m_pOptionState->classState.showAtts );
00223 visibilityLayout -> addWidget( m_ClassWidgets.showAttsCB, 0, 1 );
00224
00225 m_ClassWidgets.showOpsCB = new QCheckBox( i18n("Show operations"), m_ClassWidgets.visibilityGB );
00226 m_ClassWidgets.showOpsCB -> setChecked( m_pOptionState->classState.showOps );
00227 visibilityLayout -> addWidget( m_ClassWidgets.showOpsCB, 1, 0 );
00228
00229 m_ClassWidgets.showStereotypeCB = new QCheckBox( i18n("Show stereot&ype"), m_ClassWidgets.visibilityGB );
00230 m_ClassWidgets.showStereotypeCB -> setChecked( m_pOptionState->classState.showStereoType );
00231 visibilityLayout -> addWidget( m_ClassWidgets.showStereotypeCB, 1, 1 );
00232
00233 m_ClassWidgets.showAttSigCB = new QCheckBox(i18n("Show attribute signature"), m_ClassWidgets.visibilityGB);
00234 m_ClassWidgets.showAttSigCB -> setChecked( m_pOptionState->classState.showAttSig );
00235 visibilityLayout -> addWidget( m_ClassWidgets.showAttSigCB, 2, 0 );
00236
00237
00238 m_ClassWidgets.showPackageCB = new QCheckBox(i18n("Show package"), m_ClassWidgets.visibilityGB);
00239 m_ClassWidgets.showPackageCB -> setChecked( m_pOptionState->classState.showPackage );
00240 visibilityLayout -> addWidget( m_ClassWidgets.showPackageCB, 2, 1 );
00241
00242 m_ClassWidgets.showOpSigCB = new QCheckBox( i18n("Show operation signature"), m_ClassWidgets.visibilityGB );
00243 m_ClassWidgets.showOpSigCB -> setChecked( m_pOptionState->classState.showOpSig );
00244 visibilityLayout -> addWidget( m_ClassWidgets.showOpSigCB, 3, 0 );
00245 visibilityLayout -> setRowStretch( 3, 1 );
00246
00247 m_ClassWidgets.scopeGB = new QGroupBox( i18n("Starting Scope"), page );
00248 QGridLayout * scopeLayout = new QGridLayout( m_ClassWidgets.scopeGB );
00249 scopeLayout -> setSpacing( spacingHint() );
00250 scopeLayout -> setMargin( fontMetrics().height() );
00251
00252 m_ClassWidgets.attributeLabel = new QLabel( i18n("Default attribute scope:"), m_ClassWidgets.scopeGB);
00253 scopeLayout -> addWidget( m_ClassWidgets.attributeLabel, 0, 0 );
00254
00255 m_ClassWidgets.operationLabel = new QLabel( i18n("Default operation scope:"), m_ClassWidgets.scopeGB);
00256 scopeLayout -> addWidget( m_ClassWidgets.operationLabel, 1, 0 );
00257
00258 m_ClassWidgets.m_pAttribScopeCB = new KComboBox(m_ClassWidgets.scopeGB);
00259 insertAttribScope( tr2i18n( "Public" ) );
00260 insertAttribScope( tr2i18n( "Private" ) );
00261 insertAttribScope( tr2i18n( "Protected" ) );
00262 m_ClassWidgets.m_pAttribScopeCB->setCurrentItem((m_pOptionState->classState.defaultAttributeScope - 200));
00263 m_ClassWidgets.m_pAttribScopeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
00264 scopeLayout -> addWidget( m_ClassWidgets.m_pAttribScopeCB, 0, 1 );
00265
00266 m_ClassWidgets.m_pOperationScopeCB = new KComboBox(m_ClassWidgets.scopeGB);
00267 insertOperationScope( tr2i18n( "Public" ) );
00268 insertOperationScope( tr2i18n( "Private" ) );
00269 insertOperationScope( tr2i18n( "Protected" ) );
00270 m_ClassWidgets.m_pOperationScopeCB->setCurrentItem((m_pOptionState->classState.defaultOperationScope - 200));
00271 m_ClassWidgets.m_pOperationScopeCB->setCompletionMode( KGlobalSettings::CompletionPopup );
00272 scopeLayout -> addWidget( m_ClassWidgets.m_pOperationScopeCB, 1, 1 );
00273
00274 }
00278 void SettingsDlg::insertAttribScope( const QString& type, int index )
00279 {
00280 m_ClassWidgets.m_pAttribScopeCB->insertItem( type, index );
00281 m_ClassWidgets.m_pAttribScopeCB->completionObject()->addItem( type );
00282 }
00286 void SettingsDlg::insertOperationScope( const QString& type, int index )
00287 {
00288 m_ClassWidgets.m_pOperationScopeCB->insertItem( type, index );
00289 m_ClassWidgets.m_pOperationScopeCB->completionObject()->addItem( type );
00290 }
00291
00292 void SettingsDlg::setupCodeGenPage() {
00293
00294 QVBox * page = addVBoxPage( i18n("Code Generation"), i18n("Code Generation Settings"), DesktopIcon( "source") );
00295 m_pCodeGenPage = new CodeGenerationOptionsPage(page);
00296 connect( m_pCodeGenPage, SIGNAL(languageChanged()), this, SLOT(slotApply()) );
00297 }
00298
00299 void SettingsDlg::setupCodeViewerPage(Settings::CodeViewerState options) {
00300
00301 QVBox * page = addVBoxPage( i18n("Code Viewer"), i18n("Code Viewer Settings"), DesktopIcon( "source") );
00302 m_pCodeViewerPage = new CodeViewerOptionsPage(options, page);
00303 }
00304
00305 void SettingsDlg::setupFontPage() {
00306 QVBox * page = addVBoxPage( i18n("Font"), i18n("Font Settings"), DesktopIcon( "fonts") );
00307 m_FontWidgets.chooser = new KFontChooser( page, "font", false, QStringList(), false);
00308 m_FontWidgets.chooser->setFont( m_pOptionState->uiState.font );
00309
00310 }
00311
00312 void SettingsDlg::slotApply() {
00313 applyPage( (Settings::Page) activePageIndex() );
00314
00315
00316 }
00317
00318 void SettingsDlg::slotOk() {
00319 applyPage( Settings::page_general );
00320 applyPage( Settings::page_font );
00321 applyPage( Settings::page_UI );
00322 applyPage( Settings::page_class );
00323 applyPage( Settings::page_codegen );
00324 applyPage( Settings::page_codeview );
00325 accept();
00326 }
00327
00328
00329 void SettingsDlg::slotDefault() {
00330
00331
00332
00333
00334 switch( activePageIndex() ) {
00335 case Settings::page_general:
00336 m_GeneralWidgets.autosaveCB -> setChecked( false );
00337 m_GeneralWidgets.timeISB -> setValue( 5 );
00338 m_GeneralWidgets.timeISB->setEnabled( true );
00339 m_GeneralWidgets.logoCB -> setChecked( true );
00340 m_GeneralWidgets.tipCB -> setChecked( true );
00341 m_GeneralWidgets.loadlastCB -> setChecked( true );
00342 m_GeneralWidgets.diagramKB -> setCurrentItem( 0 );
00343 break;
00344
00345 case Settings::page_font:
00346 m_FontWidgets.chooser -> setFont( parentWidget() -> font() );
00347 break;
00348
00349 case Settings::page_UI:
00350 m_UiWidgets.useFillColorCB -> setChecked( true );
00351 m_UiWidgets.fillColorB -> setColor( QColor( 255, 255, 192 ) );
00352 m_UiWidgets.lineColorB -> setColor( Qt::red );
00353 m_UiWidgets.lineWidthB -> setValue( 0 );
00354 break;
00355
00356 case Settings::page_class:
00357 m_ClassWidgets.showVisibilityCB -> setChecked( false );
00358 m_ClassWidgets.showAttsCB -> setChecked( true );
00359 m_ClassWidgets.showOpsCB -> setChecked( true );
00360 m_ClassWidgets.showStereotypeCB -> setChecked( false );
00361 m_ClassWidgets.showAttSigCB -> setChecked( false );
00362 m_ClassWidgets.showOpSigCB -> setChecked( false );
00363 m_ClassWidgets.showPackageCB -> setChecked( false );
00364 m_ClassWidgets.m_pAttribScopeCB->setCurrentItem(1);
00365 m_ClassWidgets.m_pOperationScopeCB->setCurrentItem(0);
00366 break;
00367
00368 case Settings::page_codegen:
00369 case Settings::page_codeview:
00370
00371 break;
00372 };
00373 }
00374
00375 void SettingsDlg::applyPage( Settings::Page page ) {
00376 m_bChangesApplied = true;
00377 switch( page ) {
00378 case Settings::page_general:
00379 m_pOptionState->generalState.undo = m_GeneralWidgets.undoCB -> isChecked();
00380 m_pOptionState->generalState.tabdiagrams = m_GeneralWidgets.tabdiagramsCB->isChecked();
00381 m_pOptionState->generalState.newcodegen = m_GeneralWidgets.newcodegenCB->isChecked();
00382 m_pOptionState->generalState.angularlines = m_GeneralWidgets.angularLinesCB->isChecked();
00383 m_pOptionState->generalState.autosave = m_GeneralWidgets.autosaveCB -> isChecked();
00384 m_pOptionState->generalState.autosavetime = m_GeneralWidgets.timeISB -> value();
00385
00386 m_pOptionState->generalState.autosavesuffix = m_GeneralWidgets.autosaveSuffixT -> text();
00387 m_pOptionState->generalState.logo = m_GeneralWidgets.logoCB -> isChecked();
00388 m_pOptionState->generalState.tip = m_GeneralWidgets.tipCB -> isChecked();
00389 m_pOptionState->generalState.loadlast = m_GeneralWidgets.loadlastCB -> isChecked();
00390 m_pOptionState->generalState.diagram = (Uml::Diagram_Type)(m_GeneralWidgets.diagramKB->currentItem() + 1);
00391 break;
00392
00393 case Settings::page_font:
00394 m_pOptionState->uiState.font = m_FontWidgets.chooser -> font();
00395 break;
00396
00397 case Settings::page_UI:
00398 m_pOptionState->uiState.useFillColor = m_UiWidgets.useFillColorCB -> isChecked();
00399 m_pOptionState->uiState.fillColor = m_UiWidgets.fillColorB -> color();
00400 m_pOptionState->uiState.lineColor = m_UiWidgets.lineColorB -> color();
00401 m_pOptionState->uiState.lineWidth = m_UiWidgets.lineWidthB -> value();
00402 break;
00403
00404 case Settings::page_class:
00405 m_pOptionState->classState.showVisibility = m_ClassWidgets.showVisibilityCB -> isChecked();
00406 m_pOptionState->classState.showAtts = m_ClassWidgets.showAttsCB -> isChecked();
00407 m_pOptionState->classState.showOps = m_ClassWidgets.showOpsCB -> isChecked();
00408 m_pOptionState->classState.showStereoType = m_ClassWidgets.showStereotypeCB -> isChecked();
00409 m_pOptionState->classState.showAttSig = m_ClassWidgets.showAttSigCB -> isChecked();
00410 m_pOptionState->classState.showOpSig = m_ClassWidgets.showOpSigCB -> isChecked();
00411 m_pOptionState->classState.showPackage = m_ClassWidgets.showPackageCB -> isChecked();
00412 m_pOptionState->classState.defaultAttributeScope = (Uml::Visibility::Value) (m_ClassWidgets.m_pAttribScopeCB->currentItem() + 200);
00413 m_pOptionState->classState.defaultOperationScope = (Uml::Visibility::Value) (m_ClassWidgets.m_pOperationScopeCB->currentItem() + 200);
00414 break;
00415
00416 case Settings::page_codegen:
00417 m_pCodeGenPage->apply();
00418 break;
00419
00420 case Settings::page_codeview:
00421 m_pCodeViewerPage->apply();
00422 m_pOptionState->codeViewerState = m_pCodeViewerPage->getOptions();
00423 break;
00424 }
00425 }
00426
00427 void SettingsDlg::slotLineBClicked() {
00428 m_UiWidgets.lineColorB -> setColor( Qt::red );
00429 }
00430
00431 void SettingsDlg::slotFillBClicked() {
00432 m_UiWidgets.fillColorB -> setColor( QColor(255, 255, 192) );
00433 }
00434
00435 void SettingsDlg::slotAutosaveCBClicked() {
00436 m_GeneralWidgets.timeISB -> setEnabled( m_GeneralWidgets.autosaveCB -> isChecked() );
00437 }
00438
00439 QString SettingsDlg::getCodeGenerationLanguage() {
00440 return m_pCodeGenPage->getCodeGenerationLanguage();
00441 }
00442
00443 #include "settingsdlg.moc"