summaryrefslogtreecommitdiff
path: root/noncore/games
Unidiff
Diffstat (limited to 'noncore/games') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/backgammon/backgammon.cpp2
-rw-r--r--noncore/games/fifteen/fifteen.cpp4
-rw-r--r--noncore/games/go/gowidget.cpp4
-rw-r--r--noncore/games/mindbreaker/mindbreaker.cpp2
-rw-r--r--noncore/games/minesweep/minesweep.cpp4
-rw-r--r--noncore/games/parashoot/interface.cpp2
-rw-r--r--noncore/games/snake/interface.cpp2
-rw-r--r--noncore/games/solitaire/canvascardgame.cpp2
-rw-r--r--noncore/games/wordgame/wordgame.cpp2
9 files changed, 12 insertions, 12 deletions
diff --git a/noncore/games/backgammon/backgammon.cpp b/noncore/games/backgammon/backgammon.cpp
index 755ed10..e9e5467 100644
--- a/noncore/games/backgammon/backgammon.cpp
+++ b/noncore/games/backgammon/backgammon.cpp
@@ -6,25 +6,25 @@
6#include "rulesdialog.h" 6#include "rulesdialog.h"
7#include "themedialog.h" 7#include "themedialog.h"
8 8
9#include <qdatetime.h> 9#include <qdatetime.h>
10#include <qfile.h> 10#include <qfile.h>
11#include <qlayout.h> 11#include <qlayout.h>
12#include <qmessagebox.h> 12#include <qmessagebox.h>
13#include <qstring.h> 13#include <qstring.h>
14#include <qtimer.h> 14#include <qtimer.h>
15#include <qmainwindow.h> 15#include <qmainwindow.h>
16#include <qpe/qpeapplication.h> 16#include <qpe/qpeapplication.h>
17#include <qpe/config.h> 17#include <qpe/config.h>
18#include <qpe/qpemenubar.h> 18#include <qmenubar.h>
19#include <qpe/resource.h> 19#include <qpe/resource.h>
20 20
21#include <stdlib.h> 21#include <stdlib.h>
22 22
23 23
24BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl) 24BackGammon::BackGammon(QWidget* parent, const char* name, WFlags fl)
25 : QMainWindow(parent, name, fl) 25 : QMainWindow(parent, name, fl)
26{ 26{
27 if (!name) setName("BackGammon"); 27 if (!name) setName("BackGammon");
28 setCaption(tr( "Backgammon") ); 28 setCaption(tr( "Backgammon") );
29 setIcon( Resource::loadPixmap( "backgammon" ) ); 29 setIcon( Resource::loadPixmap( "backgammon" ) );
30 //general counter varaible 30 //general counter varaible
diff --git a/noncore/games/fifteen/fifteen.cpp b/noncore/games/fifteen/fifteen.cpp
index 212f7b1..2e4ed94 100644
--- a/noncore/games/fifteen/fifteen.cpp
+++ b/noncore/games/fifteen/fifteen.cpp
@@ -21,43 +21,43 @@
21#include "fifteen.h" 21#include "fifteen.h"
22 22
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24#include <qpe/config.h> 24#include <qpe/config.h>
25 25
26#include <qvbox.h> 26#include <qvbox.h>
27#include <qaction.h> 27#include <qaction.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qpopupmenu.h> 30#include <qpopupmenu.h>
31#include <qmessagebox.h> 31#include <qmessagebox.h>
32#include <qpe/qpetoolbar.h> 32#include <qpe/qpetoolbar.h>
33#include <qpe/qpemenubar.h> 33#include <qmenubar.h>
34#include <qstringlist.h> 34#include <qstringlist.h>
35#include <qapplication.h> 35#include <qapplication.h>
36 36
37#include <stdlib.h> 37#include <stdlib.h>
38#include <time.h> 38#include <time.h>
39 39
40FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name) 40FifteenMainWindow::FifteenMainWindow(QWidget *parent, const char* name)
41 : QMainWindow( parent, name ) 41 : QMainWindow( parent, name )
42{ 42{
43 // random seed 43 // random seed
44 srand(time(0)); 44 srand(time(0));
45 45
46 setToolBarsMovable( FALSE ); 46 setToolBarsMovable( FALSE );
47 QVBox *vbox = new QVBox( this ); 47 QVBox *vbox = new QVBox( this );
48 PiecesTable *table = new PiecesTable( vbox ); 48 PiecesTable *table = new PiecesTable( vbox );
49 setCentralWidget(vbox); 49 setCentralWidget(vbox);
50 50
51 QPEToolBar *toolbar = new QPEToolBar(this); 51 QToolBar *toolbar = new QToolBar(this);
52 toolbar->setHorizontalStretchable( TRUE ); 52 toolbar->setHorizontalStretchable( TRUE );
53 addToolBar(toolbar); 53 addToolBar(toolbar);
54 54
55 QMenuBar *menubar = new QMenuBar( toolbar ); 55 QMenuBar *menubar = new QMenuBar( toolbar );
56 menubar->setMargin(0); 56 menubar->setMargin(0);
57 57
58 QPopupMenu *game = new QPopupMenu( this ); 58 QPopupMenu *game = new QPopupMenu( this );
59 59
60 QWidget *spacer = new QWidget( toolbar ); 60 QWidget *spacer = new QWidget( toolbar );
61 spacer->setBackgroundMode( PaletteButton ); 61 spacer->setBackgroundMode( PaletteButton );
62 toolbar->setStretchableWidget( spacer ); 62 toolbar->setStretchableWidget( spacer );
63 63
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index 476f7ce1..6d06f3b 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -17,25 +17,25 @@
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "gowidget.h" 21#include "gowidget.h"
22 22
23#include <qpe/config.h> 23#include <qpe/config.h>
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qpainter.h> 26#include <qpainter.h>
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qpe/qpetoolbar.h> 28#include <qpe/qpetoolbar.h>
29#include <qpe/qpemenubar.h> 29#include <qmenubar.h>
30#include <qpopupmenu.h> 30#include <qpopupmenu.h>
31#include <qaction.h> 31#include <qaction.h>
32#include <qapplication.h> //processEvents() 32#include <qapplication.h> //processEvents()
33#include <qlabel.h> 33#include <qlabel.h>
34 34
35//#include <stdio.h> 35//#include <stdio.h>
36 36
37#include "amigo.h" 37#include "amigo.h"
38#include "goplayutils.h" 38#include "goplayutils.h"
39 39
40static const enum bVal computer_color = BLACK; 40static const enum bVal computer_color = BLACK;
41 41
@@ -49,25 +49,25 @@ static QPixmap *newBlackStone;
49static QPixmap *blackStone; 49static QPixmap *blackStone;
50static QPixmap *whiteStone; 50static QPixmap *whiteStone;
51 51
52static bool smallStones = FALSE; 52static bool smallStones = FALSE;
53 53
54GoMainWidget::GoMainWidget( QWidget *parent, const char* name) : 54GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
55 QMainWindow( parent, name ) 55 QMainWindow( parent, name )
56{ 56{
57 setToolBarsMovable( FALSE ); 57 setToolBarsMovable( FALSE );
58 GoWidget *go = new GoWidget(this); 58 GoWidget *go = new GoWidget(this);
59 59
60 setCentralWidget(go); 60 setCentralWidget(go);
61 toolbar = new QPEToolBar(this); 61 toolbar = new QToolBar(this);
62 toolbar->setHorizontalStretchable( TRUE ); 62 toolbar->setHorizontalStretchable( TRUE );
63 addToolBar(toolbar); 63 addToolBar(toolbar);
64 64
65 QMenuBar *mb = new QMenuBar( toolbar ); 65 QMenuBar *mb = new QMenuBar( toolbar );
66 mb->setMargin(0); 66 mb->setMargin(0);
67 QPopupMenu *file = new QPopupMenu( this ); 67 QPopupMenu *file = new QPopupMenu( this );
68 68
69 QAction *a = new QAction( tr( "New Game" ), QString::null, 0, this, 0 ); 69 QAction *a = new QAction( tr( "New Game" ), QString::null, 0, this, 0 );
70 connect( a, SIGNAL( activated() ), go, SLOT( newGame() ) ); 70 connect( a, SIGNAL( activated() ), go, SLOT( newGame() ) );
71 a->addTo( file ); 71 a->addTo( file );
72 72
73 a = new QAction( tr( "Pass" ), Resource::loadPixmap( "pass" ), QString::null, 0, this, 0 ); 73 a = new QAction( tr( "Pass" ), Resource::loadPixmap( "pass" ), QString::null, 0, this, 0 );
diff --git a/noncore/games/mindbreaker/mindbreaker.cpp b/noncore/games/mindbreaker/mindbreaker.cpp
index 1a1d05d..7802e38 100644
--- a/noncore/games/mindbreaker/mindbreaker.cpp
+++ b/noncore/games/mindbreaker/mindbreaker.cpp
@@ -205,25 +205,25 @@ inline int Peg::type() const
205/* Load the main image, copy from it the pegs, the board, and the answer image 205/* Load the main image, copy from it the pegs, the board, and the answer image
206 * and use these to create the tray, answer and board 206 * and use these to create the tray, answer and board
207 */ 207 */
208MindBreaker::MindBreaker( QWidget *parent, const char *name, int wFlags ) 208MindBreaker::MindBreaker( QWidget *parent, const char *name, int wFlags )
209: QMainWindow(parent, name, wFlags), 209: QMainWindow(parent, name, wFlags),
210 canvas(board_height, board_width) 210 canvas(board_height, board_width)
211{ 211{
212 MindBreakerBoard *m = new MindBreakerBoard(canvas, this); 212 MindBreakerBoard *m = new MindBreakerBoard(canvas, this);
213 setCentralWidget(m); 213 setCentralWidget(m);
214 214
215 setToolBarsMovable( FALSE ); 215 setToolBarsMovable( FALSE );
216 216
217 QPEToolBar *tb = new QPEToolBar(this); 217 QToolBar *tb = new QToolBar(this);
218 tb->setHorizontalStretchable( TRUE ); 218 tb->setHorizontalStretchable( TRUE );
219 219
220 QPixmap newicon = Resource::loadPixmap("new"); 220 QPixmap newicon = Resource::loadPixmap("new");
221 new QToolButton(newicon, tr("New Game"), 0, 221 new QToolButton(newicon, tr("New Game"), 0,
222 m, SLOT(clear()), tb, "NewGame"); 222 m, SLOT(clear()), tb, "NewGame");
223 223
224 score = new QToolButton(tb); 224 score = new QToolButton(tb);
225 score->setText(""); 225 score->setText("");
226 score->setMaximumHeight(20); 226 score->setMaximumHeight(20);
227 score->setUsesTextLabel(TRUE); 227 score->setUsesTextLabel(TRUE);
228 tb->setStretchableWidget(score); 228 tb->setStretchableWidget(score);
229 229
diff --git a/noncore/games/minesweep/minesweep.cpp b/noncore/games/minesweep/minesweep.cpp
index 814070b..48644b3 100644
--- a/noncore/games/minesweep/minesweep.cpp
+++ b/noncore/games/minesweep/minesweep.cpp
@@ -16,25 +16,25 @@
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "minesweep.h" 21#include "minesweep.h"
22#include "minefield.h" 22#include "minefield.h"
23 23
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25#include <qpe/config.h> 25#include <qpe/config.h>
26 26
27#include <qpe/qpetoolbar.h> 27#include <qpe/qpetoolbar.h>
28#include <qpe/qpemenubar.h> 28#include <qmenubar.h>
29#include <qpopupmenu.h> 29#include <qpopupmenu.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31#include <qlcdnumber.h> 31#include <qlcdnumber.h>
32#include <qmessagebox.h> 32#include <qmessagebox.h>
33#include <qtimer.h> 33#include <qtimer.h>
34#include <qpalette.h> 34#include <qpalette.h>
35#include <qapplication.h> 35#include <qapplication.h>
36#include <qlayout.h> 36#include <qlayout.h>
37#include <qlabel.h> 37#include <qlabel.h>
38 38
39#include <stdlib.h> 39#include <stdlib.h>
40#include <time.h> 40#include <time.h>
@@ -234,25 +234,25 @@ private:
234 MineField *field; 234 MineField *field;
235}; 235};
236 236
237 237
238 238
239MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f ) 239MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
240: QMainWindow( parent, name, f ) 240: QMainWindow( parent, name, f )
241{ 241{
242 srand(::time(0)); 242 srand(::time(0));
243 setCaption( tr("Mine Hunt") ); 243 setCaption( tr("Mine Hunt") );
244 setIcon( Resource::loadPixmap( "minesweep_icon" ) ); 244 setIcon( Resource::loadPixmap( "minesweep_icon" ) );
245 245
246 QPEToolBar *toolBar = new QPEToolBar( this ); 246 QToolBar *toolBar = new QToolBar( this );
247 toolBar->setHorizontalStretchable( TRUE ); 247 toolBar->setHorizontalStretchable( TRUE );
248 248
249 QMenuBar *menuBar = new QMenuBar( toolBar ); 249 QMenuBar *menuBar = new QMenuBar( toolBar );
250 250
251 QPopupMenu *gameMenu = new QPopupMenu( this ); 251 QPopupMenu *gameMenu = new QPopupMenu( this );
252 gameMenu->insertItem( tr("Beginner"), this, SLOT( beginner() ) ); 252 gameMenu->insertItem( tr("Beginner"), this, SLOT( beginner() ) );
253 gameMenu->insertItem( tr("Advanced"), this, SLOT( advanced() ) ); 253 gameMenu->insertItem( tr("Advanced"), this, SLOT( advanced() ) );
254 gameMenu->insertItem( tr("Expert"), this, SLOT( expert() ) ); 254 gameMenu->insertItem( tr("Expert"), this, SLOT( expert() ) );
255 255
256 menuBar->insertItem( tr("Game"), gameMenu ); 256 menuBar->insertItem( tr("Game"), gameMenu );
257 257
258 guessLCD = new QLCDNumber( toolBar ); 258 guessLCD = new QLCDNumber( toolBar );
diff --git a/noncore/games/parashoot/interface.cpp b/noncore/games/parashoot/interface.cpp
index 84e5e60..db98720 100644
--- a/noncore/games/parashoot/interface.cpp
+++ b/noncore/games/parashoot/interface.cpp
@@ -36,25 +36,25 @@ ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
36 fanfare("level_up"), 36 fanfare("level_up"),
37 score(0) 37 score(0)
38{ 38{
39 canvas.setAdvancePeriod(80); 39 canvas.setAdvancePeriod(80);
40 QPixmap bg = Resource::loadPixmap("parashoot/sky"); 40 QPixmap bg = Resource::loadPixmap("parashoot/sky");
41 canvas.setBackgroundPixmap(bg); 41 canvas.setBackgroundPixmap(bg);
42 42
43 pb = new QCanvasView(&canvas, this); 43 pb = new QCanvasView(&canvas, this);
44 pb->setFocus(); 44 pb->setFocus();
45 45
46 setToolBarsMovable( FALSE ); 46 setToolBarsMovable( FALSE );
47 47
48 QPEToolBar* toolbar = new QPEToolBar(this); 48 QToolBar* toolbar = new QToolBar(this);
49 toolbar->setHorizontalStretchable( TRUE ); 49 toolbar->setHorizontalStretchable( TRUE );
50 50
51 setCaption( tr("ParaShoot") ); 51 setCaption( tr("ParaShoot") );
52 QPixmap newicon = Resource::loadPixmap("parashoot/manicon"); 52 QPixmap newicon = Resource::loadPixmap("parashoot/manicon");
53 setIcon(newicon); 53 setIcon(newicon);
54 new QToolButton(newicon, tr("New Game"), 0, 54 new QToolButton(newicon, tr("New Game"), 0,
55 this, SLOT(newGame()), toolbar, "New Game"); 55 this, SLOT(newGame()), toolbar, "New Game");
56 56
57 levelscore = new QLabel(toolbar); 57 levelscore = new QLabel(toolbar);
58 levelscore->setBackgroundMode( PaletteButton ); 58 levelscore->setBackgroundMode( PaletteButton );
59 levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); 59 levelscore->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
60 toolbar->setStretchableWidget( levelscore ); 60 toolbar->setStretchableWidget( levelscore );
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp
index 68e0f14..f1227cb 100644
--- a/noncore/games/snake/interface.cpp
+++ b/noncore/games/snake/interface.cpp
@@ -36,25 +36,25 @@ SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) :
36 QPixmap bg = Resource::loadPixmap("snake/grass"); 36 QPixmap bg = Resource::loadPixmap("snake/grass");
37 canvas.setBackgroundPixmap(bg); 37 canvas.setBackgroundPixmap(bg);
38 canvas.setUpdatePeriod(100); 38 canvas.setUpdatePeriod(100);
39 snake = 0; 39 snake = 0;
40 40
41 cv = new QCanvasView(&canvas, this); 41 cv = new QCanvasView(&canvas, this);
42 42
43 pauseTimer = new QTimer(this); 43 pauseTimer = new QTimer(this);
44 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) ); 44 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
45 45
46 setToolBarsMovable( FALSE ); 46 setToolBarsMovable( FALSE );
47 47
48 QPEToolBar* toolbar = new QPEToolBar( this); 48 QToolBar* toolbar = new QToolBar( this);
49 toolbar->setHorizontalStretchable( TRUE ); 49 toolbar->setHorizontalStretchable( TRUE );
50 50
51 QPixmap newicon = Resource::loadPixmap("ksnake"); 51 QPixmap newicon = Resource::loadPixmap("ksnake");
52 setIcon(newicon); 52 setIcon(newicon);
53 (void)new QToolButton(newicon, tr("New Game"), 0, 53 (void)new QToolButton(newicon, tr("New Game"), 0,
54 this, SLOT(newGame()), toolbar, "New Game"); 54 this, SLOT(newGame()), toolbar, "New Game");
55 55
56 scorelabel = new QLabel(toolbar); 56 scorelabel = new QLabel(toolbar);
57 showScore(0); 57 showScore(0);
58 scorelabel->setBackgroundMode( PaletteButton ); 58 scorelabel->setBackgroundMode( PaletteButton );
59 scorelabel->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); 59 scorelabel->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
60 toolbar->setStretchableWidget( scorelabel ); 60 toolbar->setStretchableWidget( scorelabel );
diff --git a/noncore/games/solitaire/canvascardgame.cpp b/noncore/games/solitaire/canvascardgame.cpp
index 8250193..9ae2a23 100644
--- a/noncore/games/solitaire/canvascardgame.cpp
+++ b/noncore/games/solitaire/canvascardgame.cpp
@@ -18,25 +18,25 @@
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "cardgame.h" 21#include "cardgame.h"
22#include "canvasshapes.h" 22#include "canvasshapes.h"
23#include "canvascard.h" 23#include "canvascard.h"
24#include "canvascardgame.h" 24#include "canvascardgame.h"
25 25
26#include <qpe/resource.h> 26#include <qpe/resource.h>
27#include <qpe/config.h> 27#include <qpe/config.h>
28 28
29#include <qmainwindow.h> 29#include <qmainwindow.h>
30#include <qpe/qpemenubar.h> 30#include <qmenubar.h>
31#include <qpainter.h> 31#include <qpainter.h>
32#include <qgfx_qws.h> 32#include <qgfx_qws.h>
33 33
34#include <stdlib.h> 34#include <stdlib.h>
35#include <limits.h> 35#include <limits.h>
36#include <time.h> 36#include <time.h>
37#include <math.h> 37#include <math.h>
38 38
39 39
40extern int highestZ; 40extern int highestZ;
41 41
42 42
diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp
index d46e824..c01551d 100644
--- a/noncore/games/wordgame/wordgame.cpp
+++ b/noncore/games/wordgame/wordgame.cpp
@@ -125,25 +125,25 @@ WordGame::WordGame( QWidget* parent, const char* name, WFlags fl ) :
125 tile_bigh = 16; 125 tile_bigh = 16;
126 tile_stweak = 0; 126 tile_stweak = 0;
127 tile_btweak = 0; 127 tile_btweak = 0;
128 } 128 }
129 129
130 setIcon( Resource::loadPixmap( "wordgame/WordGame.png" ) ); 130 setIcon( Resource::loadPixmap( "wordgame/WordGame.png" ) );
131 setCaption( tr("Word Game") ); 131 setCaption( tr("Word Game") );
132 132
133 setToolBarsMovable( FALSE ); 133 setToolBarsMovable( FALSE );
134 vbox = new QVBox(this); 134 vbox = new QVBox(this);
135 135
136 setCentralWidget(vbox); 136 setCentralWidget(vbox);
137 toolbar = new QPEToolBar(this); 137 toolbar = new QToolBar(this);
138 addToolBar(toolbar, Bottom); 138 addToolBar(toolbar, Bottom);
139 reset = new QToolButton(Resource::loadPixmap("back"), tr("Back"), "", this, SLOT(resetTurn()), toolbar); 139 reset = new QToolButton(Resource::loadPixmap("back"), tr("Back"), "", this, SLOT(resetTurn()), toolbar);
140 done = new QToolButton(Resource::loadPixmap("done"), tr("Done"), "", this, SLOT(endTurn()), toolbar); 140 done = new QToolButton(Resource::loadPixmap("done"), tr("Done"), "", this, SLOT(endTurn()), toolbar);
141 scoreinfo = new ScoreInfo(toolbar); 141 scoreinfo = new ScoreInfo(toolbar);
142 scoreinfo->setFont(QFont("Helvetica",10)); 142 scoreinfo->setFont(QFont("Helvetica",10));
143 new QToolButton(Resource::loadPixmap("finish"), tr("Close"), "", this, SLOT(endGame()), toolbar); 143 new QToolButton(Resource::loadPixmap("finish"), tr("Close"), "", this, SLOT(endGame()), toolbar);
144 toolbar->setStretchableWidget(scoreinfo); 144 toolbar->setStretchableWidget(scoreinfo);
145 145
146 cpu = 0; 146 cpu = 0;
147 board = 0; 147 board = 0;
148 bag = 0; 148 bag = 0;
149 racks = 0; 149 racks = 0;