simple_mtglife

view mainwin.cc @ 0:6321cfa2ad62

initial
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 23 Jan 2015 15:24:27 +0200
parents
children d76fb2ffe7f5
line source
1 #include "mainwin.h"
2 #include "ui_mainwin.h"
4 MainWin::MainWin(QWidget *parent) :
5 QMainWindow(parent),
6 ui(new Ui::MainWin)
7 {
8 ui->setupUi(this);
9 }
11 MainWin::~MainWin()
12 {
13 delete ui;
14 }
16 void MainWin::on_bn_p1_reset_clicked()
17 {
18 ui->spin_p1_life->setValue(20);
19 }
21 void MainWin::on_bn_p2_reset_clicked()
22 {
23 ui->spin_p2_life->setValue(20);
24 }
26 void MainWin::on_bn_p1_inc10_clicked()
27 {
28 ui->spin_p1_life->setValue(ui->spin_p1_life->value() + 10);
29 }
31 void MainWin::on_bn_p1_dec10_clicked()
32 {
33 ui->spin_p1_life->setValue(ui->spin_p1_life->value() - 10);
34 }
36 void MainWin::on_bn_p2_inc10_clicked()
37 {
38 ui->spin_p2_life->setValue(ui->spin_p2_life->value() + 10);
39 }
41 void MainWin::on_bn_p2_dec10_clicked()
42 {
43 ui->spin_p2_life->setValue(ui->spin_p2_life->value() - 10);
44 }