diff options
| author | 2022-04-29 10:48:09 +0200 | |
|---|---|---|
| committer | 2022-04-29 10:48:09 +0200 | |
| commit | 07c5f6ec23fcf9237a24e71adcfacabce677f818 (patch) | |
| tree | 588e8c5f82b9163181fad3581f610e6f1d88cba4 /src/bin/gui/mainwindow.cpp | |
| parent | a9153f1615a842cfb9e9bcda4d9071e202618569 (diff) | |
| download | OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.tar.gz OneRoll-07c5f6ec23fcf9237a24e71adcfacabce677f818.zip | |
Change file organization.
Diffstat (limited to 'src/bin/gui/mainwindow.cpp')
| -rw-r--r-- | src/bin/gui/mainwindow.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/bin/gui/mainwindow.cpp b/src/bin/gui/mainwindow.cpp new file mode 100644 index 0000000..5b8422e --- /dev/null +++ b/src/bin/gui/mainwindow.cpp @@ -0,0 +1,27 @@ +#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(); + } +} |