Diffstat (limited to 'noncore/games/backgammon/displaydialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/backgammon/displaydialog.cpp | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/noncore/games/backgammon/displaydialog.cpp b/noncore/games/backgammon/displaydialog.cpp deleted file mode 100644 index 8b97545..0000000 --- a/noncore/games/backgammon/displaydialog.cpp +++ b/dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | #include "displaydialog.h" | ||
2 | |||
3 | #include <qgroupbox.h> | ||
4 | #include <qlabel.h> | ||
5 | |||
6 | DisplayDialog::DisplayDialog(QWidget* parent,const char* name,bool modal,WFlags f) | ||
7 | : QDialog(parent,name,modal,f) | ||
8 | { | ||
9 | setCaption("Display Configuration"); | ||
10 | QLabel* header=new QLabel("<b>Change the display settings</b>",this); | ||
11 | header->setGeometry(10,10,200,20); | ||
12 | |||
13 | // | ||
14 | QGroupBox* settings_frame=new QGroupBox("Settings",this); | ||
15 | settings_frame->setGeometry(10,10,220,120); | ||
16 | |||
17 | small_box=new QRadioButton("Big display, e.g. for QPE Style",settings_frame); | ||
18 | small_box->setGeometry(10,20,200,20); | ||
19 | connect(small_box,SIGNAL(clicked()),this,SLOT(small_clicked())); | ||
20 | |||
21 | big_box=new QRadioButton("Small display, e.g. for Windows Style",settings_frame); | ||
22 | big_box->setGeometry(10,50,200,20); | ||
23 | connect(big_box,SIGNAL(clicked()),this,SLOT(big_clicked())); | ||
24 | |||
25 | // | ||
26 | QGroupBox* warning_frame=new QGroupBox("Warning",this); | ||
27 | warning_frame->setGeometry(10,140,220,120); | ||
28 | |||
29 | warning_box=new QCheckBox("show style warning",warning_frame); | ||
30 | warning_box->setGeometry(10,20,200,20); | ||
31 | connect(warning_box,SIGNAL(clicked()),this,SLOT(warning_clicked())); | ||
32 | |||
33 | QLabel* warning_help=new QLabel("show style warning at statup if the system style is not QPE\nif not set to small you may have\nscrollbars on the palying area",warning_frame); | ||
34 | warning_help->setGeometry(10,50,200,60); | ||
35 | |||
36 | showMaximized(); | ||
37 | } | ||
38 | |||
39 | |||
40 | DisplayDialog::~DisplayDialog() | ||
41 | { | ||
42 | } | ||
43 | |||
44 | void DisplayDialog::big_clicked() | ||
45 | { | ||
46 | big_box->setChecked(true); | ||
47 | small_box->setChecked(false); | ||
48 | } | ||
49 | |||
50 | void DisplayDialog::small_clicked() | ||
51 | { | ||
52 | big_box->setChecked(false); | ||
53 | small_box->setChecked(true); | ||
54 | } | ||
55 | |||
56 | void DisplayDialog::warning_clicked() | ||
57 | { | ||
58 | } | ||
59 | |||
60 | void DisplayDialog::setDisplaySettings(const Display& display) | ||
61 | { | ||
62 | if(!display.small) | ||
63 | { | ||
64 | big_box->setChecked(false); | ||
65 | small_box->setChecked(true); | ||
66 | } | ||
67 | else | ||
68 | { | ||
69 | big_box->setChecked(true); | ||
70 | small_box->setChecked(false); | ||
71 | } | ||
72 | if(display.warning) | ||
73 | warning_box->setChecked(true); | ||
74 | else | ||
75 | warning_box->setChecked(false); | ||
76 | |||
77 | } | ||
78 | |||
79 | Display DisplayDialog::getDisplaySettings() | ||
80 | { | ||
81 | Display display; | ||
82 | display.small=!small_box->isChecked(); | ||
83 | display.warning=warning_box->isChecked(); | ||
84 | return display; | ||
85 | } | ||
86 | |||
87 | |||
88 | |||
89 | |||