diff options
| author | 2015-03-03 23:00:11 +0100 | |
|---|---|---|
| committer | 2015-03-03 23:00:11 +0100 | |
| commit | 30aaf7a35bc6e8224ad683148af28cedf81f03fd (patch) | |
| tree | 4ef6e1451a62d852d4b83f2bb2a89e7940a33c6d /gui/mainwindow.cpp | |
| parent | 343f0d6b839d3f9a4740733cf2148b136ef8e00d (diff) | |
| download | OneRoll-30aaf7a35bc6e8224ad683148af28cedf81f03fd.tar.gz OneRoll-30aaf7a35bc6e8224ad683148af28cedf81f03fd.zip | |
Add gui and new node.
Diffstat (limited to 'gui/mainwindow.cpp')
| -rw-r--r-- | gui/mainwindow.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp new file mode 100644 index 0000000..5ec6e87 --- /dev/null +++ b/gui/mainwindow.cpp @@ -0,0 +1,31 @@ +#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(); + } + +} |