summaryrefslogtreecommitdiffstats
path: root/mainwindow.cpp
diff options
context:
space:
mode:
authorStefan Suhren <suhren.stefan@fh-swf.de>2015-03-29 19:11:23 +0200
committerStefan Suhren <suhren.stefan@fh-swf.de>2015-03-29 19:11:23 +0200
commit74d0a4a6f634010db71d05536cffef15bfb1edd9 (patch)
tree89817f43c61fbfd2edda120276f33c5cd75ad92b /mainwindow.cpp
downloadGUI_SS2015-74d0a4a6f634010db71d05536cffef15bfb1edd9.tar.gz
GUI_SS2015-74d0a4a6f634010db71d05536cffef15bfb1edd9.zip
Initial Commit
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r--mainwindow.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
new file mode 100644
index 0000000..94b879e
--- /dev/null
+++ b/mainwindow.cpp
@@ -0,0 +1,39 @@
+#include "mainwindow.h"
+#include "ui_mainwindow.h"
+
+MainWindow::MainWindow(QWidget *parent) :
+ QMainWindow(parent),
+ ui(new Ui::MainWindow)
+{
+ ui->setupUi(this);
+}
+
+MainWindow::~MainWindow()
+{
+ delete ui;
+}
+
+void MainWindow::on_action_Preferences_triggered()
+{
+ qDebug() << "Preferences called";
+ DlgPreferences *tmp = new DlgPreferences(this);
+
+ tmp->setHeight(size().height());
+ tmp->setWidth(size().width());
+
+ if(tmp->exec())
+ {
+ qDebug() << "DlgPreferences okay clicked.";
+
+ int width = tmp->width();
+ int height = tmp->height();
+
+ if(width >= 100 && width <= 800 && height >= 100 && height <= 800)
+ {
+ qDebug() << "Resizing QMainWindow.";
+ resize(width,height);
+ }
+ }
+
+ delete tmp;
+}