diff options
| author | 2022-04-29 10:48:09 +0200 | |
|---|---|---|
| committer | 2022-04-29 10:48:09 +0200 | |
| commit | 07c5f6ec23fcf9237a24e71adcfacabce677f818 (patch) | |
| tree | 588e8c5f82b9163181fad3581f610e6f1d88cba4 /gui | |
| parent | a9153f1615a842cfb9e9bcda4d9071e202618569 (diff) | |
| download | OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.tar.gz OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.zip | |
Change file organization.
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/gui.pri | 10 | ||||
| -rw-r--r-- | gui/mainwindow.cpp | 27 | ||||
| -rw-r--r-- | gui/mainwindow.h | 28 | ||||
| -rw-r--r-- | gui/mainwindow.ui | 75 |
4 files changed, 0 insertions, 140 deletions
diff --git a/gui/gui.pri b/gui/gui.pri deleted file mode 100644 index c31fd79..0000000 --- a/gui/gui.pri +++ /dev/null @@ -1,10 +0,0 @@ -QT += gui - -FORMS += \ - $$PWD/mainwindow.ui - -HEADERS += \ - $$PWD/mainwindow.h - -SOURCES += \ - $$PWD/mainwindow.cpp diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp deleted file mode 100644 index 5b8422e..0000000 --- a/gui/mainwindow.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "mainwindow.h" -#include "ui_mainwindow.h" - -#include "diceparser.h" - -MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent), ui(new Ui::MainWindow) -{ - ui->setupUi(this); - - connect(ui->m_rollButton, SIGNAL(pressed()), this, SLOT(rollDiceCommand())); - m_dieParser= new DiceParser(); -} - -MainWindow::~MainWindow() -{ - delete ui; -} -void MainWindow::rollDiceCommand() -{ - QString cmd= ui->m_cmdEdit->text(); - - if(m_dieParser->parseLine(cmd)) - { - m_dieParser->Start(); - m_dieParser->displayResult(); - } -} diff --git a/gui/mainwindow.h b/gui/mainwindow.h deleted file mode 100644 index bd19b34..0000000 --- a/gui/mainwindow.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include <QMainWindow> - -class DiceParser; -namespace Ui -{ - class MainWindow; -} - -class MainWindow : public QMainWindow -{ - Q_OBJECT - -public: - explicit MainWindow(QWidget* parent= 0); - ~MainWindow(); - -protected slots: - void rollDiceCommand(); - -private: - Ui::MainWindow* ui; - DiceParser* m_dieParser; -}; - -#endif // MAINWINDOW_H diff --git a/gui/mainwindow.ui b/gui/mainwindow.ui deleted file mode 100644 index d09f866..0000000 --- a/gui/mainwindow.ui +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>MainWindow</class> - <widget class="QMainWindow" name="MainWindow"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>800</width> - <height>600</height> - </rect> - </property> - <property name="windowTitle"> - <string>MainWindow</string> - </property> - <widget class="QWidget" name="centralwidget"> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLineEdit" name="m_cmdEdit"/> - </item> - <item> - <widget class="QPushButton" name="m_rollButton"> - <property name="text"> - <string>Roll</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2" stretch="0,1"> - <item> - <widget class="QListView" name="m_historicView"/> - </item> - <item> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QWidget" name="m_display" native="true"/> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> - </item> - </layout> - </widget> - <widget class="QMenuBar" name="menubar"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>800</width> - <height>29</height> - </rect> - </property> - </widget> - <widget class="QStatusBar" name="statusbar"/> - </widget> - <resources/> - <connections/> -</ui> |