src/container.h \
src/dimension.h \
src/drawingview.h \
+ src/generaltab.h \
src/line.h \
src/main.h \
src/mathconstants.h \
src/object.h \
+ src/settingsdialog.h \
src/vector.h
SOURCES = \
src/container.cpp \
src/dimension.cpp \
src/drawingview.cpp \
+ src/generaltab.cpp \
src/line.cpp \
src/main.cpp \
src/object.cpp \
+ src/settingsdialog.cpp \
src/vector.cpp
# src/mainapp/commands.cpp \
QString s = QString(tr(
"<table>"
"<tr>"
- "<td><img src=':/res/about-logo.png' style='float:left; margin-right:20px'></td>"
+ "<td style='padding-right:15px'><img src=':/res/about-logo.png'></td>"
"<td>"
"<table>"
// "<tr><td align='right'><b>Architektonas: </b></td><td width='100'>Free, <i>Industrial Strength</i> 2D Computer Aided Design</td></tr>"
- "<tr><td align='right'><b>Architektonas: </b></td><td>Free, <i>Industrial Strength</i> 2D Computer Aided Design</td></tr>"
+ "<tr><td align='right' width='100'><b>Architektonas: </b></td><td>Free, <i>Industrial Strength</i> 2D Computer Aided Design</td></tr>"
"<tr><td align='right'><b>Version: </b></td><td>1.0.0</td></tr>"
"<tr><td align='right'><b>License: </b></td><td>GPL v3 or later</td></tr>"
"<tr><td align='right'><b>Chief Architect: </b></td><td>James L. Hammons (shamus)</td></tr>"
#include "about.h"
#include "drawingview.h"
+#include "settingsdialog.h"
+#include "generaltab.h"
ApplicationWindow::ApplicationWindow(): settings("Underground Software", "Architektonas")
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."),
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);
void DimensionTool(void);
void RotateTool(void);
void HelpAbout(void);
+ void Settings(void);
private:
void CreateActions(void);
--- /dev/null
+//
+// generaltab.cpp: "General" tab on the settings dialog
+//
+// Part of the Architektonas Project
+// (C) 2011 Underground Software
+// See the README and GPLv3 files for licensing and warranty information
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// WHO WHEN WHAT
+// --- ---------- ------------------------------------------------------------
+// JLH 06/04/2011 Created this file
+
+#include "generaltab.h"
+
+
+GeneralTab::GeneralTab(QWidget * parent/*= 0*/): QWidget(parent)
+{
+ antialiasChk = new QCheckBox(tr("Use Qt's built-in antialiasing"));
+
+ QVBoxLayout * layout = new QVBoxLayout;
+ layout->addWidget(antialiasChk);
+ setLayout(layout);
+}
+
+GeneralTab::~GeneralTab()
+{
+}
--- /dev/null
+#ifndef __GENERALTAB_H__
+#define __GENERALTAB_H__
+
+#include <QtGui>
+
+class GeneralTab: public QWidget
+{
+ Q_OBJECT
+
+ public:
+ GeneralTab(QWidget * parent = 0);
+ ~GeneralTab();
+
+ public:
+ QCheckBox * antialiasChk;
+};
+
+#endif // __GENERALTAB_H__
--- /dev/null
+//
+// settingsdialog.cpp: Dialog for changing Architektonas settings
+//
+// Part of the Architektonas Project
+// (C) 2011 Underground Software
+// See the README and GPLv3 files for licensing and warranty information
+//
+// JLH = James L. Hammons <jlhamm@acm.org>
+//
+// WHO WHEN WHAT
+// --- ---------- ------------------------------------------------------------
+// JLH 06/04/2011 Created this file
+
+#include "settingsdialog.h"
+#include "generaltab.h"
+
+
+SettingsDialog::SettingsDialog(QWidget * parent/*= 0*/): QDialog(parent)
+{
+ tabWidget = new QTabWidget;
+ generalTab = new GeneralTab(this);
+ tabWidget->addTab(generalTab, tr("General"));
+// tabWidget->addTab(new PermissionsTab(fileInfo), tr("Permissions"));
+// tabWidget->addTab(new ApplicationsTab(fileInfo), tr("Applications"));
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
+
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+
+ QVBoxLayout * mainLayout = new QVBoxLayout;
+ mainLayout->addWidget(tabWidget);
+ mainLayout->addWidget(buttonBox);
+ setLayout(mainLayout);
+
+ setWindowTitle(tr("Architektonas Settings"));
+}
+
+SettingsDialog::~SettingsDialog()
+{
+}
--- /dev/null
+#ifndef __SETTINGSDIALOG_H__
+#define __SETTINGSDIALOG_H__
+
+#include <QtGui>
+
+class GeneralTab;
+
+class SettingsDialog: public QDialog
+{
+ Q_OBJECT
+
+ public:
+ SettingsDialog(QWidget * parent = 0);
+ ~SettingsDialog();
+
+ private:
+ QTabWidget * tabWidget;
+ QDialogButtonBox * buttonBox;
+
+ public:
+ GeneralTab * generalTab;
+};
+
+#endif // __SETTINGSDIALOG_H__