X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fapplicationwindow.cpp;h=fe0c29db9fd1e2696e91266b40411f0071c3cbad;hb=7ac2021bfe0d3032e161520e3fa790ef621e39b3;hp=2c7f22fb31ae4f7d54017684b58bc249f7558967;hpb=d41ddd699001f6bbf6ac621f5c467bd13efb6087;p=architektonas diff --git a/src/applicationwindow.cpp b/src/applicationwindow.cpp index 2c7f22f..fe0c29d 100644 --- a/src/applicationwindow.cpp +++ b/src/applicationwindow.cpp @@ -28,6 +28,8 @@ #include "about.h" #include "drawingview.h" +#include "settingsdialog.h" +#include "generaltab.h" ApplicationWindow::ApplicationWindow(): settings("Underground Software", "Architektonas") @@ -103,6 +105,19 @@ void ApplicationWindow::HelpAbout(void) aboutWin->show(); } +void ApplicationWindow::Settings(void) +{ + SettingsDialog dlg(this); + dlg.generalTab->antialiasChk->setChecked(drawing->useAntialiasing); + + if (dlg.exec() == false) + return; + + // Deal with stuff here (since user hit "OK" button...) + drawing->useAntialiasing = dlg.generalTab->antialiasChk->isChecked(); + WriteSettings(); +} + void ApplicationWindow::CreateActions(void) { exitAct = CreateAction(tr("&Quit"), tr("Quit"), tr("Exits the application."), @@ -146,6 +161,7 @@ void ApplicationWindow::CreateActions(void) fileCloseAct = CreateAction(tr("&Close Drawing"), tr("Close Drawing"), tr("Closes the current drawing."), QIcon(":/res/generic-tool.png"), QKeySequence(tr("Ctrl+w"))); settingsAct = CreateAction(tr("&Settings"), tr("Settings"), tr("Change certain defaults for Architektonas."), QIcon(":/res/generic-tool.png"), QKeySequence()); + connect(settingsAct, SIGNAL(triggered()), this, SLOT(Settings())); //Hm. I think we'll have to have separate logic to do the "Radio Group Toolbar" thing... /* QActionGroup * group = new QActionGroup(this);