Diffstat (limited to 'noncore/games/backgammon/aidialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/backgammon/aidialog.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/noncore/games/backgammon/aidialog.cpp b/noncore/games/backgammon/aidialog.cpp index 7dfe403..32e9b52 100644 --- a/noncore/games/backgammon/aidialog.cpp +++ b/noncore/games/backgammon/aidialog.cpp | |||
@@ -1,16 +1,17 @@ | |||
1 | #include "aidialog.h" | 1 | #include "aidialog.h" |
2 | 2 | ||
3 | #include <qgroupbox.h> | 3 | #include <qgroupbox.h> |
4 | 4 | ||
5 | #include <qpe/qpeapplication.h> | ||
5 | 6 | ||
6 | AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) | 7 | AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) |
7 | : QDialog(parent,name,modal,f) | 8 | : QDialog(parent,name,modal,f) |
8 | { | 9 | { |
9 | setCaption("AI Configuration"); | 10 | setCaption("AI Configuration"); |
10 | 11 | ||
11 | QGroupBox* settings=new QGroupBox(tr( "Settings" ),this); | 12 | QGroupBox* settings=new QGroupBox(tr( "Settings" ),this); |
12 | settings->setGeometry(10,5,220,170); | 13 | settings->setGeometry(10,5,220,170); |
13 | 14 | ||
14 | QLabel* rescue_label=new QLabel(tr( "<b>Rescue</b>" ),settings); | 15 | QLabel* rescue_label=new QLabel(tr( "<b>Rescue</b>" ),settings); |
15 | rescue_label->setGeometry(50,20,50,20); | 16 | rescue_label->setGeometry(50,20,50,20); |
16 | rescue=new QSpinBox(0,6,1,settings); | 17 | rescue=new QSpinBox(0,6,1,settings); |
@@ -19,73 +20,73 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
19 | rescuehelp->setGeometry(140,20,20,20); | 20 | rescuehelp->setGeometry(140,20,20,20); |
20 | connect(rescuehelp,SIGNAL(pressed()),this,SLOT(rescuehelp_pressed())); | 21 | connect(rescuehelp,SIGNAL(pressed()),this,SLOT(rescuehelp_pressed())); |
21 | connect(rescuehelp,SIGNAL(released()),this,SLOT(rescuehelp_released())); | 22 | connect(rescuehelp,SIGNAL(released()),this,SLOT(rescuehelp_released())); |
22 | 23 | ||
23 | QLabel* eliminate_label=new QLabel(tr( "<b>Eliminate</b>" ),settings); | 24 | QLabel* eliminate_label=new QLabel(tr( "<b>Eliminate</b>" ),settings); |
24 | eliminate_label->setGeometry(50,40,50,20); | 25 | eliminate_label->setGeometry(50,40,50,20); |
25 | eliminate=new QSpinBox(0,6,1,settings); | 26 | eliminate=new QSpinBox(0,6,1,settings); |
26 | eliminate->setGeometry(100,40,40,20); | 27 | eliminate->setGeometry(100,40,40,20); |
27 | QPushButton* eliminatehelp=new QPushButton(tr( "?" ),settings); | 28 | QPushButton* eliminatehelp=new QPushButton(tr( "?" ),settings); |
28 | eliminatehelp->setGeometry(140,40,20,20); | 29 | eliminatehelp->setGeometry(140,40,20,20); |
29 | connect(eliminatehelp,SIGNAL(pressed()),this,SLOT(eliminatehelp_pressed())); | 30 | connect(eliminatehelp,SIGNAL(pressed()),this,SLOT(eliminatehelp_pressed())); |
30 | connect(eliminatehelp,SIGNAL(released()),this,SLOT(eliminatehelp_released())); | 31 | connect(eliminatehelp,SIGNAL(released()),this,SLOT(eliminatehelp_released())); |
31 | 32 | ||
32 | QLabel* expose_label=new QLabel(tr( "<b>Expose</b>" ),settings); | 33 | QLabel* expose_label=new QLabel(tr( "<b>Expose</b>" ),settings); |
33 | expose_label->setGeometry(50,60,50,20); | 34 | expose_label->setGeometry(50,60,50,20); |
34 | expose=new QSpinBox(0,6,1,settings); | 35 | expose=new QSpinBox(0,6,1,settings); |
35 | expose->setGeometry(100,60,40,20); | 36 | expose->setGeometry(100,60,40,20); |
36 | QPushButton* exposeehelp=new QPushButton(tr( "?" ),settings); | 37 | QPushButton* exposeehelp=new QPushButton(tr( "?" ),settings); |
37 | exposeehelp->setGeometry(140,60,20,20); | 38 | exposeehelp->setGeometry(140,60,20,20); |
38 | connect(exposeehelp,SIGNAL(pressed()),this,SLOT(exposehelp_pressed())); | 39 | connect(exposeehelp,SIGNAL(pressed()),this,SLOT(exposehelp_pressed())); |
39 | connect(exposeehelp,SIGNAL(released()),this,SLOT(exposehelp_released())); | 40 | connect(exposeehelp,SIGNAL(released()),this,SLOT(exposehelp_released())); |
40 | 41 | ||
41 | QLabel* protect_label=new QLabel(tr( "<b>Protect</b>" ),settings); | 42 | QLabel* protect_label=new QLabel(tr( "<b>Protect</b>" ),settings); |
42 | protect_label->setGeometry(50,80,50,20); | 43 | protect_label->setGeometry(50,80,50,20); |
43 | protect=new QSpinBox(0,6,1,settings); | 44 | protect=new QSpinBox(0,6,1,settings); |
44 | protect->setGeometry(100,80,40,20); | 45 | protect->setGeometry(100,80,40,20); |
45 | QPushButton* protecthelp=new QPushButton(tr( "?" ),settings); | 46 | QPushButton* protecthelp=new QPushButton(tr( "?" ),settings); |
46 | protecthelp->setGeometry(140,80,20,20); | 47 | protecthelp->setGeometry(140,80,20,20); |
47 | connect(protecthelp,SIGNAL(pressed()),this,SLOT(protecthelp_pressed())); | 48 | connect(protecthelp,SIGNAL(pressed()),this,SLOT(protecthelp_pressed())); |
48 | connect(protecthelp,SIGNAL(released()),this,SLOT(protecthelp_released())); | 49 | connect(protecthelp,SIGNAL(released()),this,SLOT(protecthelp_released())); |
49 | 50 | ||
50 | QLabel* safe_label=new QLabel(tr( "<b>Safe</b>" ),settings); | 51 | QLabel* safe_label=new QLabel(tr( "<b>Safe</b>" ),settings); |
51 | safe_label->setGeometry(50,100,50,20); | 52 | safe_label->setGeometry(50,100,50,20); |
52 | safe=new QSpinBox(0,6,1,settings); | 53 | safe=new QSpinBox(0,6,1,settings); |
53 | safe->setGeometry(100,100,40,20); | 54 | safe->setGeometry(100,100,40,20); |
54 | QPushButton* safeehelp=new QPushButton(tr( "?" ),settings); | 55 | QPushButton* safeehelp=new QPushButton(tr( "?" ),settings); |
55 | safeehelp->setGeometry(140,100,20,20); | 56 | safeehelp->setGeometry(140,100,20,20); |
56 | connect(safeehelp,SIGNAL(pressed()),this,SLOT(safehelp_pressed())); | 57 | connect(safeehelp,SIGNAL(pressed()),this,SLOT(safehelp_pressed())); |
57 | connect(safeehelp,SIGNAL(released()),this,SLOT(safehelp_released())); | 58 | connect(safeehelp,SIGNAL(released()),this,SLOT(safehelp_released())); |
58 | 59 | ||
59 | QLabel* empty_label=new QLabel(tr( "<b>Empty</b>" ),settings); | 60 | QLabel* empty_label=new QLabel(tr( "<b>Empty</b>" ),settings); |
60 | empty_label->setGeometry(50,120,50,20); | 61 | empty_label->setGeometry(50,120,50,20); |
61 | empty=new QSpinBox(0,6,1,settings); | 62 | empty=new QSpinBox(0,6,1,settings); |
62 | empty->setGeometry(100,120,40,20); | 63 | empty->setGeometry(100,120,40,20); |
63 | QPushButton* emptyhelp=new QPushButton(tr( "?" ),settings); | 64 | QPushButton* emptyhelp=new QPushButton(tr( "?" ),settings); |
64 | emptyhelp->setGeometry(140,120,20,20); | 65 | emptyhelp->setGeometry(140,120,20,20); |
65 | connect(emptyhelp,SIGNAL(pressed()),this,SLOT(emptyhelp_pressed())); | 66 | connect(emptyhelp,SIGNAL(pressed()),this,SLOT(emptyhelp_pressed())); |
66 | connect(emptyhelp,SIGNAL(released()),this,SLOT(emptyhelp_released())); | 67 | connect(emptyhelp,SIGNAL(released()),this,SLOT(emptyhelp_released())); |
67 | 68 | ||
68 | defaultvalues=new QPushButton(tr( "Default Values" ),settings); | 69 | defaultvalues=new QPushButton(tr( "Default Values" ),settings); |
69 | defaultvalues->setGeometry(60,140,90,20); | 70 | defaultvalues->setGeometry(60,140,90,20); |
70 | connect(defaultvalues,SIGNAL(clicked()),this,SLOT(setDefaultValues())); | 71 | connect(defaultvalues,SIGNAL(clicked()),this,SLOT(setDefaultValues())); |
71 | 72 | ||
72 | QGroupBox* helpbox=new QGroupBox(tr( "Help" ),this); | 73 | QGroupBox* helpbox=new QGroupBox(tr( "Help" ),this); |
73 | helpbox->setGeometry(10,185,220,90); | 74 | helpbox->setGeometry(10,185,220,90); |
74 | 75 | ||
75 | help=new QLabel(helpbox); | 76 | help=new QLabel(helpbox); |
76 | help->setGeometry(10,15,200,65); | 77 | help->setGeometry(10,15,200,65); |
77 | 78 | ||
78 | setHelpText(); | 79 | setHelpText(); |
79 | showMaximized(); | 80 | QPEApplication::showDialog( this ); |
80 | } | 81 | } |
81 | 82 | ||
82 | 83 | ||
83 | AI_Dialog::~AI_Dialog() | 84 | AI_Dialog::~AI_Dialog() |
84 | { | 85 | { |
85 | } | 86 | } |
86 | 87 | ||
87 | void AI_Dialog::rescuehelp_pressed() | 88 | void AI_Dialog::rescuehelp_pressed() |
88 | { | 89 | { |
89 | setHelpText("rescue"); | 90 | setHelpText("rescue"); |
90 | } | 91 | } |
91 | 92 | ||