-rw-r--r-- | noncore/games/backgammon/aidialog.cpp | 15 | ||||
-rw-r--r-- | noncore/games/backgammon/filedialog.cpp | 129 | ||||
-rw-r--r-- | noncore/games/backgammon/playerdialog.cpp | 4 | ||||
-rw-r--r-- | noncore/games/backgammon/rulesdialog.cpp | 4 | ||||
-rw-r--r-- | noncore/games/backgammon/themedialog.cpp | 2 | ||||
-rw-r--r-- | noncore/games/sfcave/helpwindow.cpp | 4 | ||||
-rw-r--r-- | noncore/games/tetrix/ohighscoredlg.cpp | 3 | ||||
-rw-r--r-- | noncore/games/tictac/tictac.cpp | 4 |
8 files changed, 87 insertions, 78 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 | |||
@@ -2,6 +2,7 @@ | |||
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) |
@@ -28,7 +29,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
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); |
@@ -37,7 +38,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
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); |
@@ -46,7 +47,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
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); |
@@ -55,7 +56,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
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); |
@@ -64,7 +65,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
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())); |
@@ -74,9 +75,9 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
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 | ||
diff --git a/noncore/games/backgammon/filedialog.cpp b/noncore/games/backgammon/filedialog.cpp index 6c858a2..a5e71c9 100644 --- a/noncore/games/backgammon/filedialog.cpp +++ b/noncore/games/backgammon/filedialog.cpp | |||
@@ -1,64 +1,65 @@ | |||
1 | #include "filedialog.h" | 1 | #include "filedialog.h" |
2 | 2 | ||
3 | #include <qdir.h> | 3 | #include <qdir.h> |
4 | #include <qfileinfo.h> | 4 | #include <qfileinfo.h> |
5 | #include <qmessagebox.h> | 5 | #include <qmessagebox.h> |
6 | #include <qpixmap.h> | 6 | #include <qpixmap.h> |
7 | #include <qpushbutton.h> | 7 | #include <qpushbutton.h> |
8 | #include <qpe/qpeapplication.h> | 8 | #include <qpe/qpeapplication.h> |
9 | 9 | ||
10 | FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const char* name,bool modal,WFlags f) | 10 | FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const char* name,bool modal,WFlags f) |
11 | :QDialog(parent,name,modal,f) | 11 | :QDialog(parent,name,modal,f) |
12 | { | 12 | { |
13 | setCaption(header); | 13 | setCaption(header); |
14 | ext=extension; | 14 | ext=extension; |
15 | dirselector=new QListView(this); | 15 | dirselector=new QListView(this); |
16 | dirselector->setGeometry(1,10,235,200); | 16 | dirselector->setGeometry(1,10,235,200); |
17 | dirselector->addColumn("Files"); | 17 | dirselector->addColumn("Files"); |
18 | connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*))); | 18 | connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*))); |
19 | 19 | ||
20 | getCurrentDir(); | 20 | getCurrentDir(); |
21 | 21 | ||
22 | file_name="user"; | 22 | file_name="user"; |
23 | fileinput=new QLineEdit(file_name,this); | 23 | fileinput=new QLineEdit(file_name,this); |
24 | fileinput->setGeometry(1,220,235,20); | 24 | fileinput->setGeometry(1,220,235,20); |
25 | showMaximized(); | 25 | |
26 | } | 26 | QPEApplication::showDialog( this ); |
27 | 27 | } | |
28 | FileDialog::~FileDialog() | 28 | |
29 | {} | 29 | FileDialog::~FileDialog() |
30 | 30 | {} | |
31 | 31 | ||
32 | void FileDialog::selectorclicked(QListViewItem* entry) | 32 | |
33 | { | 33 | void FileDialog::selectorclicked(QListViewItem* entry) |
34 | if(entry==NULL) | 34 | { |
35 | return; | 35 | if(entry==NULL) |
36 | file_name=entry->text(0); | 36 | return; |
37 | fileinput->setText(file_name); | 37 | file_name=entry->text(0); |
38 | } | 38 | fileinput->setText(file_name); |
39 | 39 | } | |
40 | void FileDialog::getCurrentDir() | 40 | |
41 | { | 41 | void FileDialog::getCurrentDir() |
42 | dirselector->clear(); | 42 | { |
43 | QDir dir(QPEApplication::qpeDir()+"/backgammon"); | 43 | dirselector->clear(); |
44 | dir.setFilter(QDir::Files); | 44 | QDir dir(QPEApplication::qpeDir()+"/backgammon"); |
45 | QFileInfoListIterator it(*(dir.entryInfoList())); | 45 | dir.setFilter(QDir::Files); |
46 | QFileInfo* fi; | 46 | QFileInfoListIterator it(*(dir.entryInfoList())); |
47 | 47 | QFileInfo* fi; | |
48 | int ext_length=ext.length(); | 48 | |
49 | while((fi=it.current())) // go through all file and subdirs | 49 | int ext_length=ext.length(); |
50 | { | 50 | while((fi=it.current())) // go through all file and subdirs |
51 | QString file=fi->fileName(); | 51 | { |
52 | if(file.right(ext_length)==ext && file) | 52 | QString file=fi->fileName(); |
53 | { | 53 | if(file.right(ext_length)==ext && file) |
54 | file=file.left(file.length()-ext_length); | 54 | { |
55 | new QListViewItem(dirselector,file); | 55 | file=file.left(file.length()-ext_length); |
56 | } | 56 | new QListViewItem(dirselector,file); |
57 | ++it; | 57 | } |
58 | } | 58 | ++it; |
59 | } | 59 | } |
60 | 60 | } | |
61 | QString FileDialog::filename() | 61 | |
62 | { | 62 | QString FileDialog::filename() |
63 | return file_name; | 63 | { |
64 | } | 64 | return file_name; |
65 | } | ||
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 | |||
@@ -2,6 +2,8 @@ | |||
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 | { |
@@ -31,7 +33,7 @@ PlayerDialog::PlayerDialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
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() |
diff --git a/noncore/games/backgammon/rulesdialog.cpp b/noncore/games/backgammon/rulesdialog.cpp index 85c3db3..5e17eeb 100644 --- a/noncore/games/backgammon/rulesdialog.cpp +++ b/noncore/games/backgammon/rulesdialog.cpp | |||
@@ -3,6 +3,8 @@ | |||
3 | #include <qgroupbox.h> | 3 | #include <qgroupbox.h> |
4 | #include <qlabel.h> | 4 | #include <qlabel.h> |
5 | 5 | ||
6 | #include <qpe/qpeapplication.h> | ||
7 | |||
6 | RulesDialog::RulesDialog(QWidget* parent,const char* name,bool modal,WFlags f) | 8 | RulesDialog::RulesDialog(QWidget* parent,const char* name,bool modal,WFlags f) |
7 | : QDialog(parent,name,modal,f) | 9 | : QDialog(parent,name,modal,f) |
8 | { | 10 | { |
@@ -32,7 +34,7 @@ RulesDialog::RulesDialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
32 | QLabel* nice_dice_help=new QLabel("allow to rescue pieces with dice\nvalues graeter than the distance\nto the players endzone.",nice_dice_box); | 34 | QLabel* nice_dice_help=new QLabel("allow to rescue pieces with dice\nvalues graeter than the distance\nto the players endzone.",nice_dice_box); |
33 | nice_dice_help->setGeometry(10,40,200,60); | 35 | nice_dice_help->setGeometry(10,40,200,60); |
34 | 36 | ||
35 | showMaximized(); | 37 | QPEApplication::showDialog( this ); |
36 | } | 38 | } |
37 | 39 | ||
38 | 40 | ||
diff --git a/noncore/games/backgammon/themedialog.cpp b/noncore/games/backgammon/themedialog.cpp index dcb957c..f342381 100644 --- a/noncore/games/backgammon/themedialog.cpp +++ b/noncore/games/backgammon/themedialog.cpp | |||
@@ -59,7 +59,7 @@ ThemeDialog::ThemeDialog(QWidget* parent,const char* name,bool modal,WFlags f) | |||
59 | boxtable->setGeometry(40,225,195,20); | 59 | boxtable->setGeometry(40,225,195,20); |
60 | fillBox("table",boxtable); | 60 | fillBox("table",boxtable); |
61 | 61 | ||
62 | showMaximized(); | 62 | QPEApplication::showDialog( this ); |
63 | } | 63 | } |
64 | 64 | ||
65 | ThemeDialog::~ThemeDialog() | 65 | ThemeDialog::~ThemeDialog() |
diff --git a/noncore/games/sfcave/helpwindow.cpp b/noncore/games/sfcave/helpwindow.cpp index c920312..544e237 100644 --- a/noncore/games/sfcave/helpwindow.cpp +++ b/noncore/games/sfcave/helpwindow.cpp | |||
@@ -20,6 +20,8 @@ | |||
20 | #include <qstring.h> | 20 | #include <qstring.h> |
21 | #include <qtextview.h> | 21 | #include <qtextview.h> |
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | ||
24 | |||
23 | #include "helpwindow.h" | 25 | #include "helpwindow.h" |
24 | 26 | ||
25 | 27 | ||
@@ -71,7 +73,7 @@ HelpWindow::HelpWindow( QWidget *parent, const char *name, bool modal, WFlags fl | |||
71 | layout->insertWidget( -1, view ); | 73 | layout->insertWidget( -1, view ); |
72 | layout->insertSpacing( -1, 5 ); | 74 | layout->insertSpacing( -1, 5 ); |
73 | 75 | ||
74 | showMaximized(); | 76 | QPEApplication::showDialog( this ); |
75 | } | 77 | } |
76 | 78 | ||
77 | HelpWindow::~HelpWindow() | 79 | HelpWindow::~HelpWindow() |
diff --git a/noncore/games/tetrix/ohighscoredlg.cpp b/noncore/games/tetrix/ohighscoredlg.cpp index cf0dcf7..7581f51 100644 --- a/noncore/games/tetrix/ohighscoredlg.cpp +++ b/noncore/games/tetrix/ohighscoredlg.cpp | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <qpe/config.h> | 17 | #include <qpe/config.h> |
18 | #include <qlayout.h> | 18 | #include <qlayout.h> |
19 | #include <qpe/config.h> | 19 | #include <qpe/config.h> |
20 | #include <qpe/qpeapplication.h> | ||
20 | 21 | ||
21 | #include <qstring.h> | 22 | #include <qstring.h> |
22 | #include <qhbox.h> | 23 | #include <qhbox.h> |
@@ -169,7 +170,7 @@ OHighscoreDialog::OHighscoreDialog(OHighscore *highscore, QWidget *parent, const | |||
169 | createHighscoreListView(); | 170 | createHighscoreListView(); |
170 | 171 | ||
171 | vbox_layout->addWidget( list ); | 172 | vbox_layout->addWidget( list ); |
172 | showMaximized(); | 173 | QPEApplication::showDialog( this ); |
173 | } | 174 | } |
174 | 175 | ||
175 | void OHighscoreDialog::createHighscoreListView() | 176 | void OHighscoreDialog::createHighscoreListView() |
diff --git a/noncore/games/tictac/tictac.cpp b/noncore/games/tictac/tictac.cpp index 4954ba4..9de3b58 100644 --- a/noncore/games/tictac/tictac.cpp +++ b/noncore/games/tictac/tictac.cpp | |||
@@ -63,7 +63,7 @@ void TicTacButton::drawButtonLabel( QPainter *p ) | |||
63 | TicTacGameBoard::TicTacGameBoard( int n, QWidget *parent, const char *name ) | 63 | TicTacGameBoard::TicTacGameBoard( int n, QWidget *parent, const char *name ) |
64 | : QWidget( parent, name ) | 64 | : QWidget( parent, name ) |
65 | { | 65 | { |
66 | showMaximized(); | 66 | QPEApplication::showWidget( this ); |
67 | st = Init; // initial state | 67 | st = Init; // initial state |
68 | nBoard = n; | 68 | nBoard = n; |
69 | n *= n; // make square | 69 | n *= n; // make square |
@@ -333,7 +333,7 @@ TicTacToe::TicTacToe( QWidget *parent, const char *name, WFlags fl ) | |||
333 | l->addLayout( b ); | 333 | l->addLayout( b ); |
334 | b->addWidget( newGame ); | 334 | b->addWidget( newGame ); |
335 | b->addWidget( quit ); | 335 | b->addWidget( quit ); |
336 | showMaximized(); | 336 | QPEApplication::showWidget( this ); |
337 | newState(); | 337 | newState(); |
338 | } | 338 | } |
339 | 339 | ||