Diffstat (limited to 'noncore/games/backgammon/playerdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/backgammon/playerdialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/noncore/games/backgammon/playerdialog.cpp b/noncore/games/backgammon/playerdialog.cpp index c16f202..0faf7e2 100644 --- a/noncore/games/backgammon/playerdialog.cpp +++ b/noncore/games/backgammon/playerdialog.cpp | |||
@@ -1,16 +1,18 @@ | |||
1 | #include "playerdialog.h" | 1 | #include "playerdialog.h" |
2 | 2 | ||
3 | #include <qgroupbox.h> | 3 | #include <qgroupbox.h> |
4 | 4 | ||
5 | #include <qpe/qpeapplication.h> | ||
6 | |||
5 | PlayerDialog::PlayerDialog(QWidget* parent,const char* name,bool modal,WFlags f) | 7 | PlayerDialog::PlayerDialog(QWidget* parent,const char* name,bool modal,WFlags f) |
6 | :QDialog(parent,name,modal,f) | 8 | :QDialog(parent,name,modal,f) |
7 | { | 9 | { |
8 | auto2=false; | 10 | auto2=false; |
9 | auto2=true; | 11 | auto2=true; |
10 | setCaption("Player Settings"); | 12 | setCaption("Player Settings"); |
11 | 13 | ||
12 | QGroupBox* player1_box=new QGroupBox("Player 1",this); | 14 | QGroupBox* player1_box=new QGroupBox("Player 1",this); |
13 | player1_box->setGeometry(10,30,220,60); | 15 | player1_box->setGeometry(10,30,220,60); |
14 | 16 | ||
15 | manual_button1=new QRadioButton("Human",player1_box); | 17 | manual_button1=new QRadioButton("Human",player1_box); |
16 | connect(manual_button1,SIGNAL(clicked()),this,SLOT(button_manual1())); | 18 | connect(manual_button1,SIGNAL(clicked()),this,SLOT(button_manual1())); |
@@ -22,25 +24,25 @@ PlayerDialog::PlayerDialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
22 | 24 | ||
23 | QGroupBox* player2_box=new QGroupBox("Player 2",this); | 25 | QGroupBox* player2_box=new QGroupBox("Player 2",this); |
24 | player2_box->setGeometry(10,150,220,60); | 26 | player2_box->setGeometry(10,150,220,60); |
25 | 27 | ||
26 | manual_button2=new QRadioButton("Human",player2_box); | 28 | manual_button2=new QRadioButton("Human",player2_box); |
27 | connect(manual_button2,SIGNAL(clicked()),this,SLOT(button_manual2())); | 29 | connect(manual_button2,SIGNAL(clicked()),this,SLOT(button_manual2())); |
28 | manual_button2->setGeometry(10,20,100,20); | 30 | manual_button2->setGeometry(10,20,100,20); |
29 | auto_button2=new QRadioButton("Computer",player2_box); | 31 | auto_button2=new QRadioButton("Computer",player2_box); |
30 | connect(auto_button2,SIGNAL(clicked()),this,SLOT(button_auto2())); | 32 | connect(auto_button2,SIGNAL(clicked()),this,SLOT(button_auto2())); |
31 | auto_button2->setGeometry(110,20,100,20); | 33 | auto_button2->setGeometry(110,20,100,20); |
32 | button2_state(auto2); | 34 | button2_state(auto2); |
33 | 35 | ||
34 | showMaximized(); | 36 | QPEApplication::showDialog( this ); |
35 | } | 37 | } |
36 | 38 | ||
37 | PlayerDialog::~PlayerDialog() | 39 | PlayerDialog::~PlayerDialog() |
38 | {} | 40 | {} |
39 | 41 | ||
40 | 42 | ||
41 | void PlayerDialog::button_manual1() | 43 | void PlayerDialog::button_manual1() |
42 | { | 44 | { |
43 | auto1=false; | 45 | auto1=false; |
44 | button1_state(auto1); | 46 | button1_state(auto1); |
45 | } | 47 | } |
46 | 48 | ||