author | chicken <chicken> | 2004-03-01 20:30:56 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 20:30:56 (UTC) |
commit | 7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc (patch) (unidiff) | |
tree | 0ec283bce345770910a2630e868afcde3d7c3dc9 /noncore/games/backgammon | |
parent | 054b3c3e032bdb0a6061a3345487b4ff877eebfd (diff) | |
download | opie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.zip opie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.tar.gz opie-7b0bdb05e4ae29b2643d73e3b8f20a86a86dcccc.tar.bz2 |
fix includes
-rw-r--r-- | noncore/games/backgammon/backgammon.cpp | 3 | ||||
-rw-r--r-- | noncore/games/backgammon/filedialog.cpp | 4 | ||||
-rw-r--r-- | noncore/games/backgammon/main.cpp | 1 | ||||
-rw-r--r-- | noncore/games/backgammon/moveengine.cpp | 1 | ||||
-rw-r--r-- | noncore/games/backgammon/themedialog.cpp | 2 |
5 files changed, 0 insertions, 11 deletions
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp index e9e5467..51020a0 100644 --- a/noncore/games/backgammon/backgammon.cpp +++ b/noncore/games/backgammon/backgammon.cpp | |||
@@ -1,39 +1,36 @@ | |||
1 | #include "backgammon.h" | 1 | #include "backgammon.h" |
2 | 2 | ||
3 | #include "aidialog.h" | 3 | #include "aidialog.h" |
4 | #include "filedialog.h" | 4 | #include "filedialog.h" |
5 | #include "playerdialog.h" | 5 | #include "playerdialog.h" |
6 | #include "rulesdialog.h" | 6 | #include "rulesdialog.h" |
7 | #include "themedialog.h" | 7 | #include "themedialog.h" |
8 | 8 | ||
9 | #include <qdatetime.h> | ||
10 | #include <qfile.h> | 9 | #include <qfile.h> |
11 | #include <qlayout.h> | 10 | #include <qlayout.h> |
12 | #include <qmessagebox.h> | 11 | #include <qmessagebox.h> |
13 | #include <qstring.h> | ||
14 | #include <qtimer.h> | 12 | #include <qtimer.h> |
15 | #include <qmainwindow.h> | ||
16 | #include <qpe/qpeapplication.h> | 13 | #include <qpe/qpeapplication.h> |
17 | #include <qpe/config.h> | 14 | #include <qpe/config.h> |
18 | #include <qmenubar.h> | 15 | #include <qmenubar.h> |
19 | #include <qpe/resource.h> | 16 | #include <qpe/resource.h> |
20 | 17 | ||
21 | #include <stdlib.h> | 18 | #include <stdlib.h> |
22 | 19 | ||
23 | 20 | ||
24 | BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) | 21 | BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) |
25 | : QMainWindow(parent, name, fl) | 22 | : QMainWindow(parent, name, fl) |
26 | { | 23 | { |
27 | if (!name) setName("BackGammon"); | 24 | if (!name) setName("BackGammon"); |
28 | setCaption(tr( "Backgammon") ); | 25 | setCaption(tr( "Backgammon") ); |
29 | setIcon( Resource::loadPixmap( "backgammon" ) ); | 26 | setIcon( Resource::loadPixmap( "backgammon" ) ); |
30 | //general counter varaible | 27 | //general counter varaible |
31 | int a=0; | 28 | int a=0; |
32 | //the game engine | 29 | //the game engine |
33 | move=new MoveEngine(); | 30 | move=new MoveEngine(); |
34 | 31 | ||
35 | //load the default theme | 32 | //load the default theme |
36 | Config conf("backgammon"); | 33 | Config conf("backgammon"); |
37 | if(!conf.isValid()) | 34 | if(!conf.isValid()) |
38 | { | 35 | { |
39 | qDebug("config file does not exist"); | 36 | qDebug("config file does not exist"); |
diff --git a/noncore/games/backgammon/filedialog.cpp b/noncore/games/backgammon/filedialog.cpp index a5e71c9..e0a2914 100644 --- a/noncore/games/backgammon/filedialog.cpp +++ b/noncore/games/backgammon/filedialog.cpp | |||
@@ -1,31 +1,27 @@ | |||
1 | #include "filedialog.h" | 1 | #include "filedialog.h" |
2 | 2 | ||
3 | #include <qdir.h> | 3 | #include <qdir.h> |
4 | #include <qfileinfo.h> | ||
5 | #include <qmessagebox.h> | ||
6 | #include <qpixmap.h> | ||
7 | #include <qpushbutton.h> | ||
8 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
9 | 5 | ||
10 | FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const char* name,bool modal,WFlags f) | 6 | FileDialog::FileDialog(QWidget* parent,QString header,QString extension,const char* name,bool modal,WFlags f) |
11 | :QDialog(parent,name,modal,f) | 7 | :QDialog(parent,name,modal,f) |
12 | { | 8 | { |
13 | setCaption(header); | 9 | setCaption(header); |
14 | ext=extension; | 10 | ext=extension; |
15 | dirselector=new QListView(this); | 11 | dirselector=new QListView(this); |
16 | dirselector->setGeometry(1,10,235,200); | 12 | dirselector->setGeometry(1,10,235,200); |
17 | dirselector->addColumn("Files"); | 13 | dirselector->addColumn("Files"); |
18 | connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*))); | 14 | connect(dirselector,SIGNAL(clicked(QListViewItem*)),this,SLOT(selectorclicked(QListViewItem*))); |
19 | 15 | ||
20 | getCurrentDir(); | 16 | getCurrentDir(); |
21 | 17 | ||
22 | file_name="user"; | 18 | file_name="user"; |
23 | fileinput=new QLineEdit(file_name,this); | 19 | fileinput=new QLineEdit(file_name,this); |
24 | fileinput->setGeometry(1,220,235,20); | 20 | fileinput->setGeometry(1,220,235,20); |
25 | 21 | ||
26 | QPEApplication::showDialog( this ); | 22 | QPEApplication::showDialog( this ); |
27 | } | 23 | } |
28 | 24 | ||
29 | FileDialog::~FileDialog() | 25 | FileDialog::~FileDialog() |
30 | {} | 26 | {} |
31 | 27 | ||
diff --git a/noncore/games/backgammon/main.cpp b/noncore/games/backgammon/main.cpp index 58ced10..6316040 100644 --- a/noncore/games/backgammon/main.cpp +++ b/noncore/games/backgammon/main.cpp | |||
@@ -1,8 +1,7 @@ | |||
1 | #include <qpe/qpeapplication.h> | ||
2 | #include "backgammon.h" | 1 | #include "backgammon.h" |
3 | 2 | ||
4 | #include <opie/oapplicationfactory.h> | 3 | #include <opie/oapplicationfactory.h> |
5 | 4 | ||
6 | OPIE_EXPORT_APP( OApplicationFactory<BackGammon> ) | 5 | OPIE_EXPORT_APP( OApplicationFactory<BackGammon> ) |
7 | 6 | ||
8 | 7 | ||
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp index 37b73a6..7de7147 100644 --- a/noncore/games/backgammon/moveengine.cpp +++ b/noncore/games/backgammon/moveengine.cpp | |||
@@ -1,27 +1,26 @@ | |||
1 | #include "moveengine.h" | 1 | #include "moveengine.h" |
2 | 2 | ||
3 | #include <qmessagebox.h> | ||
4 | #include <qtimer.h> | 3 | #include <qtimer.h> |
5 | #include <stdlib.h> | 4 | #include <stdlib.h> |
6 | 5 | ||
7 | MoveEngine::MoveEngine() | 6 | MoveEngine::MoveEngine() |
8 | : QObject() | 7 | : QObject() |
9 | { | 8 | { |
10 | int offset=7; | 9 | int offset=7; |
11 | int a=0; //counter variable | 10 | int a=0; //counter variable |
12 | int xfill[]={210,185,170,155,140,125,110,85,70,55,40,25,10,10,25,40,55,70,85,110,125,140,155,170,185,210}; | 11 | int xfill[]={210,185,170,155,140,125,110,85,70,55,40,25,10,10,25,40,55,70,85,110,125,140,155,170,185,210}; |
13 | for(a=0;a<26;a++) | 12 | for(a=0;a<26;a++) |
14 | { | 13 | { |
15 | x_coord[a]=xfill[a]; | 14 | x_coord[a]=xfill[a]; |
16 | } | 15 | } |
17 | 16 | ||
18 | int yfill[]={10,25,40,55,70,10+offset,25+offset,40+offset,55+offset,25,40,55, 25+offset,40+offset,40}; | 17 | int yfill[]={10,25,40,55,70,10+offset,25+offset,40+offset,55+offset,25,40,55, 25+offset,40+offset,40}; |
19 | int zfill[]={1,1,1,1,1,2,2,2,2,3,3,3,4,4,5}; | 18 | int zfill[]={1,1,1,1,1,2,2,2,2,3,3,3,4,4,5}; |
20 | for(a=0;a<15;a++) | 19 | for(a=0;a<15;a++) |
21 | { | 20 | { |
22 | yup_coord[a]=yfill[a]; | 21 | yup_coord[a]=yfill[a]; |
23 | ylow_coord[a]=185-(yfill[a]); | 22 | ylow_coord[a]=185-(yfill[a]); |
24 | z_coord[a]=zfill[a]; | 23 | z_coord[a]=zfill[a]; |
25 | } | 24 | } |
26 | for(a=0;a<5;a++) | 25 | for(a=0;a<5;a++) |
27 | { | 26 | { |
diff --git a/noncore/games/backgammon/themedialog.cpp b/noncore/games/backgammon/themedialog.cpp index f342381..afd6a1b 100644 --- a/noncore/games/backgammon/themedialog.cpp +++ b/noncore/games/backgammon/themedialog.cpp | |||
@@ -1,30 +1,28 @@ | |||
1 | #include "themedialog.h" | 1 | #include "themedialog.h" |
2 | 2 | ||
3 | #include <qdir.h> | 3 | #include <qdir.h> |
4 | #include <qfileinfo.h> | ||
5 | #include <qlabel.h> | 4 | #include <qlabel.h> |
6 | #include <qpushbutton.h> | ||
7 | #include <qpe/qpeapplication.h> | 5 | #include <qpe/qpeapplication.h> |
8 | 6 | ||
9 | 7 | ||
10 | ThemeDialog::ThemeDialog(QWidget* parent,const char* name,bool modal,WFlags f) | 8 | ThemeDialog::ThemeDialog(QWidget* parent,const char* name,bool modal,WFlags f) |
11 | :QDialog(parent,name,modal,f) | 9 | :QDialog(parent,name,modal,f) |
12 | { | 10 | { |
13 | setCaption("Theme Dialog"); | 11 | setCaption("Theme Dialog"); |
14 | QLabel* labelname=new QLabel("name",this); | 12 | QLabel* labelname=new QLabel("name",this); |
15 | labelname->setGeometry(0,5,40,20); | 13 | labelname->setGeometry(0,5,40,20); |
16 | lineName=new QLineEdit("user",this); | 14 | lineName=new QLineEdit("user",this); |
17 | lineName->setGeometry(40,5,195,20); | 15 | lineName->setGeometry(40,5,195,20); |
18 | 16 | ||
19 | QLabel* labelboard=new QLabel("board",this); | 17 | QLabel* labelboard=new QLabel("board",this); |
20 | labelboard->setGeometry(0,30,40,20); | 18 | labelboard->setGeometry(0,30,40,20); |
21 | boxboard=new QComboBox(this,""); | 19 | boxboard=new QComboBox(this,""); |
22 | boxboard->setGeometry(40,30,195,20); | 20 | boxboard->setGeometry(40,30,195,20); |
23 | fillBox("boards",boxboard); | 21 | fillBox("boards",boxboard); |
24 | 22 | ||
25 | QLabel* labelpiecesA=new QLabel("pieces1",this); | 23 | QLabel* labelpiecesA=new QLabel("pieces1",this); |
26 | labelpiecesA->setGeometry(0,70,40,20); | 24 | labelpiecesA->setGeometry(0,70,40,20); |
27 | boxpiecesA=new QComboBox(this); | 25 | boxpiecesA=new QComboBox(this); |
28 | boxpiecesA->setGeometry(40,70,195,20); | 26 | boxpiecesA->setGeometry(40,70,195,20); |
29 | fillBox("pieces",boxpiecesA); | 27 | fillBox("pieces",boxpiecesA); |
30 | 28 | ||