simple_mtglife

annotate mainwin.cc @ 0:6321cfa2ad62

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