summaryrefslogtreecommitdiff
path: root/noncore/games/backgammon
authorar <ar>2004-02-14 16:06:45 (UTC)
committer ar <ar>2004-02-14 16:06:45 (UTC)
commit1ab6282d6869ca200133a0e47323ae9a760b3400 (patch) (side-by-side diff)
treea7f2b4fb6f34edb4b50f00b12cf649b9cf59b8ca /noncore/games/backgammon
parentc7cf5faa7f1512fa48fb298a75902d4557bc9cfa (diff)
downloadopie-1ab6282d6869ca200133a0e47323ae9a760b3400.zip
opie-1ab6282d6869ca200133a0e47323ae9a760b3400.tar.gz
opie-1ab6282d6869ca200133a0e47323ae9a760b3400.tar.bz2
improve support for BigScreen
Diffstat (limited to 'noncore/games/backgammon') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/backgammon/aidialog.cpp15
-rw-r--r--noncore/games/backgammon/filedialog.cpp129
-rw-r--r--noncore/games/backgammon/playerdialog.cpp4
-rw-r--r--noncore/games/backgammon/rulesdialog.cpp4
-rw-r--r--noncore/games/backgammon/themedialog.cpp2
5 files changed, 80 insertions, 74 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 @@
#include <qgroupbox.h>
+#include <qpe/qpeapplication.h>
AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
: QDialog(parent,name,modal,f)
@@ -28,7 +29,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
eliminatehelp->setGeometry(140,40,20,20);
connect(eliminatehelp,SIGNAL(pressed()),this,SLOT(eliminatehelp_pressed()));
connect(eliminatehelp,SIGNAL(released()),this,SLOT(eliminatehelp_released()));
-
+
QLabel* expose_label=new QLabel(tr( "<b>Expose</b>" ),settings);
expose_label->setGeometry(50,60,50,20);
expose=new QSpinBox(0,6,1,settings);
@@ -37,7 +38,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
exposeehelp->setGeometry(140,60,20,20);
connect(exposeehelp,SIGNAL(pressed()),this,SLOT(exposehelp_pressed()));
connect(exposeehelp,SIGNAL(released()),this,SLOT(exposehelp_released()));
-
+
QLabel* protect_label=new QLabel(tr( "<b>Protect</b>" ),settings);
protect_label->setGeometry(50,80,50,20);
protect=new QSpinBox(0,6,1,settings);
@@ -46,7 +47,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
protecthelp->setGeometry(140,80,20,20);
connect(protecthelp,SIGNAL(pressed()),this,SLOT(protecthelp_pressed()));
connect(protecthelp,SIGNAL(released()),this,SLOT(protecthelp_released()));
-
+
QLabel* safe_label=new QLabel(tr( "<b>Safe</b>" ),settings);
safe_label->setGeometry(50,100,50,20);
safe=new QSpinBox(0,6,1,settings);
@@ -55,7 +56,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
safeehelp->setGeometry(140,100,20,20);
connect(safeehelp,SIGNAL(pressed()),this,SLOT(safehelp_pressed()));
connect(safeehelp,SIGNAL(released()),this,SLOT(safehelp_released()));
-
+
QLabel* empty_label=new QLabel(tr( "<b>Empty</b>" ),settings);
empty_label->setGeometry(50,120,50,20);
empty=new QSpinBox(0,6,1,settings);
@@ -64,7 +65,7 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
emptyhelp->setGeometry(140,120,20,20);
connect(emptyhelp,SIGNAL(pressed()),this,SLOT(emptyhelp_pressed()));
connect(emptyhelp,SIGNAL(released()),this,SLOT(emptyhelp_released()));
-
+
defaultvalues=new QPushButton(tr( "Default Values" ),settings);
defaultvalues->setGeometry(60,140,90,20);
connect(defaultvalues,SIGNAL(clicked()),this,SLOT(setDefaultValues()));
@@ -74,9 +75,9 @@ AI_Dialog::AI_Dialog(QWidget* parent,const char* name,bool modal,WFlags f)
help=new QLabel(helpbox);
help->setGeometry(10,15,200,65);
-
+
setHelpText();
- showMaximized();
+ QPEApplication::showDialog( this );
}
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 @@
-#include "filedialog.h"
-
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qmessagebox.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qpe/qpeapplication.h>
-
-FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const char* name,bool modal,WFlags f)
- :QDialog(parent,name,modal,f)
-{
- setCaption(header);
- ext=extension;
- dirselector=new QListView(this);
- dirselector->setGeometry(1,10,235,200);
- dirselector->addColumn("Files");
- connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*)));
-
- getCurrentDir();
-
- file_name="user";
- fileinput=new QLineEdit(file_name,this);
- fileinput->setGeometry(1,220,235,20);
- showMaximized();
-}
-
-FileDialog::~FileDialog()
-{}
-
-
-void FileDialog::selectorclicked(QListViewItem* entry)
-{
- if(entry==NULL)
- return;
- file_name=entry->text(0);
- fileinput->setText(file_name);
-}
-
-void FileDialog::getCurrentDir()
-{
- dirselector->clear();
- QDir dir(QPEApplication::qpeDir()+"/backgammon");
- dir.setFilter(QDir::Files);
- QFileInfoListIterator it(*(dir.entryInfoList()));
- QFileInfo* fi;
-
- int ext_length=ext.length();
- while((fi=it.current())) // go through all file and subdirs
- {
- QString file=fi->fileName();
- if(file.right(ext_length)==ext && file)
- {
- file=file.left(file.length()-ext_length);
- new QListViewItem(dirselector,file);
- }
- ++it;
- }
-}
-
-QString FileDialog::filename()
-{
- return file_name;
-}
+#include "filedialog.h"
+
+#include <qdir.h>
+#include <qfileinfo.h>
+#include <qmessagebox.h>
+#include <qpixmap.h>
+#include <qpushbutton.h>
+#include <qpe/qpeapplication.h>
+
+FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const char* name,bool modal,WFlags f)
+ :QDialog(parent,name,modal,f)
+{
+ setCaption(header);
+ ext=extension;
+ dirselector=new QListView(this);
+ dirselector->setGeometry(1,10,235,200);
+ dirselector->addColumn("Files");
+ connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*)));
+
+ getCurrentDir();
+
+ file_name="user";
+ fileinput=new QLineEdit(file_name,this);
+ fileinput->setGeometry(1,220,235,20);
+
+ QPEApplication::showDialog( this );
+}
+
+FileDialog::~FileDialog()
+{}
+
+
+void FileDialog::selectorclicked(QListViewItem* entry)
+{
+ if(entry==NULL)
+ return;
+ file_name=entry->text(0);
+ fileinput->setText(file_name);
+}
+
+void FileDialog::getCurrentDir()
+{
+ dirselector->clear();
+ QDir dir(QPEApplication::qpeDir()+"/backgammon");
+ dir.setFilter(QDir::Files);
+ QFileInfoListIterator it(*(dir.entryInfoList()));
+ QFileInfo* fi;
+
+ int ext_length=ext.length();
+ while((fi=it.current())) // go through all file and subdirs
+ {
+ QString file=fi->fileName();
+ if(file.right(ext_length)==ext && file)
+ {
+ file=file.left(file.length()-ext_length);
+ new QListViewItem(dirselector,file);
+ }
+ ++it;
+ }
+}
+
+QString FileDialog::filename()
+{
+ return file_name;
+}
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 @@
#include <qgroupbox.h>
+#include <qpe/qpeapplication.h>
+
PlayerDialog::PlayerDialog(QWidget* parent,const char* name,bool modal,WFlags f)
:QDialog(parent,name,modal,f)
{
@@ -31,7 +33,7 @@ PlayerDialog::PlayerDialog(QWidget* parent,const char* name,bool modal,WFlags f)
auto_button2->setGeometry(110,20,100,20);
button2_state(auto2);
- showMaximized();
+ QPEApplication::showDialog( this );
}
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 @@
#include <qgroupbox.h>
#include <qlabel.h>
+#include <qpe/qpeapplication.h>
+
RulesDialog::RulesDialog(QWidget* parent,const char* name,bool modal,WFlags f)
: QDialog(parent,name,modal,f)
{
@@ -32,7 +34,7 @@ RulesDialog::RulesDialog(QWidget* parent,const char* name,bool modal,WFlags f)
QLabel* nice_dice_help=new QLabel("allow to rescue pieces with dice\nvalues graeter than the distance\nto the players endzone.",nice_dice_box);
nice_dice_help->setGeometry(10,40,200,60);
- showMaximized();
+ QPEApplication::showDialog( this );
}
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)
boxtable->setGeometry(40,225,195,20);
fillBox("table",boxtable);
- showMaximized();
+ QPEApplication::showDialog( this );
}
ThemeDialog::~ThemeDialog()