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
@@ -1,42 +1,42 @@
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> 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
31 int a=0; 31 int a=0;
32 //the game engine 32 //the game engine
33 move=new MoveEngine(); 33 move=new MoveEngine();
34 34
35 //load the default theme 35 //load the default theme
36 Config conf("backgammon"); 36 Config conf("backgammon");
37 if(!conf.isValid()) 37 if(!conf.isValid())
38 { 38 {
39 qDebug("config file does not exist"); 39 qDebug("config file does not exist");
40 conf.setGroup("general"); 40 conf.setGroup("general");
41 conf.writeEntry("theme","default"); 41 conf.writeEntry("theme","default");
42 conf.setGroup("rules"); 42 conf.setGroup("rules");
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
@@ -9,67 +9,67 @@
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
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 "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
64 QAction *a = new QAction( tr( "Randomize" ), Resource::loadPixmap( "new" ), 64 QAction *a = new QAction( tr( "Randomize" ), Resource::loadPixmap( "new" ),
65 QString::null, 0, this, 0 ); 65 QString::null, 0, this, 0 );
66 connect( a, SIGNAL( activated() ), table, SLOT( slotRandomize() ) ); 66 connect( a, SIGNAL( activated() ), table, SLOT( slotRandomize() ) );
67 a->addTo( game ); 67 a->addTo( game );
68 a->addTo( toolbar ); 68 a->addTo( toolbar );
69 69
70 a = new QAction( tr( "Solve" ), Resource::loadPixmap( "repeat" ), 70 a = new QAction( tr( "Solve" ), Resource::loadPixmap( "repeat" ),
71 QString::null, 0, this, 0 ); 71 QString::null, 0, this, 0 );
72 connect( a, SIGNAL( activated() ), table, SLOT( slotReset() ) ); 72 connect( a, SIGNAL( activated() ), table, SLOT( slotReset() ) );
73 a->addTo( game ); 73 a->addTo( game );
74 a->addTo( toolbar ); 74 a->addTo( toolbar );
75 75
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
@@ -5,81 +5,81 @@
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
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 "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
42static int current_handicap = 1; 42static int current_handicap = 1;
43 43
44static QBrush *goBrush; 44static QBrush *goBrush;
45//static QImage *newBlackStone; 45//static QImage *newBlackStone;
46//static QImage *blackStone; 46//static QImage *blackStone;
47//static QImage *whiteStone; 47//static QImage *whiteStone;
48static QPixmap *newBlackStone; 48static 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 );
74 connect( a, SIGNAL( activated() ), go, SLOT( pass() ) ); 74 connect( a, SIGNAL( activated() ), go, SLOT( pass() ) );
75 a->addTo( file ); 75 a->addTo( file );
76 a->addTo( toolbar ); 76 a->addTo( toolbar );
77 77
78 78
79 a = new QAction( tr( "Resign" ), Resource::loadPixmap( "reset" ), QString::null, 0, this, 0 ); 79 a = new QAction( tr( "Resign" ), Resource::loadPixmap( "reset" ), QString::null, 0, this, 0 );
80 connect( a, SIGNAL( activated() ), go, SLOT( resign() ) ); 80 connect( a, SIGNAL( activated() ), go, SLOT( resign() ) );
81 a->addTo( file ); 81 a->addTo( file );
82 82
83 a = new QAction( tr( "Two player option" ), QString::null, 0, this, 0 ); 83 a = new QAction( tr( "Two player option" ), QString::null, 0, this, 0 );
84 a->setToggleAction( TRUE ); 84 a->setToggleAction( TRUE );
85 connect( a, SIGNAL( toggled(bool) ), go, SLOT( setTwoplayer(bool) ) ); 85 connect( a, SIGNAL( toggled(bool) ), go, SLOT( setTwoplayer(bool) ) );
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
@@ -193,49 +193,49 @@ inline void Peg::setPegPos(int p)
193} 193}
194 194
195inline void Peg::setPlaced(bool p) 195inline void Peg::setPlaced(bool p)
196{ 196{
197 isplaced = p; 197 isplaced = p;
198} 198}
199 199
200inline int Peg::type() const 200inline int Peg::type() const
201{ 201{
202 return pegtype; 202 return pegtype;
203} 203}
204 204
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
230 connect(m, SIGNAL(scoreChanged(int, int)), this, SLOT(setScore(int, int))); 230 connect(m, SIGNAL(scoreChanged(int, int)), this, SLOT(setScore(int, int)));
231 connect(score, SIGNAL(clicked()), m, SLOT(resetScore())); 231 connect(score, SIGNAL(clicked()), m, SLOT(resetScore()));
232 232
233 int a, b; 233 int a, b;
234 m->getScore(&a, &b); 234 m->getScore(&a, &b);
235 setScore(a,b); 235 setScore(a,b);
236} 236}
237 237
238void MindBreaker::setScore(int turns, int games) 238void MindBreaker::setScore(int turns, int games)
239{ 239{
240 double average; 240 double average;
241 double total_turns = turns; 241 double total_turns = turns;
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
@@ -4,49 +4,49 @@
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
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>
41 41
42 42
43 43
44 44
45static const char *pix_new[]={ 45static const char *pix_new[]={
46"20 20 3 1", 46"20 20 3 1",
47" c None", 47" c None",
48"# c #00FF00", 48"# c #00FF00",
49". c #000000", 49". c #000000",
50" ", 50" ",
51" ...... ", 51" ...... ",
52" ..######.. ", 52" ..######.. ",
@@ -222,49 +222,49 @@ void ResultIndicator::timerEvent( QTimerEvent *te )
222class MineFrame : public QFrame 222class MineFrame : public QFrame
223{ 223{
224public: 224public:
225 MineFrame( QWidget *parent, const char *name = 0 ) 225 MineFrame( QWidget *parent, const char *name = 0 )
226 :QFrame( parent, name ) {} 226 :QFrame( parent, name ) {}
227 void setField( MineField *f ) { field = f; } 227 void setField( MineField *f ) { field = f; }
228protected: 228protected:
229 void resizeEvent( QResizeEvent *e ) { 229 void resizeEvent( QResizeEvent *e ) {
230 field->setAvailableRect( contentsRect()); 230 field->setAvailableRect( contentsRect());
231 QFrame::resizeEvent(e); 231 QFrame::resizeEvent(e);
232 } 232 }
233private: 233private:
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 );
259 toolBar->setStretchableWidget( guessLCD ); 259 toolBar->setStretchableWidget( guessLCD );
260 260
261 QPalette lcdPal( red ); 261 QPalette lcdPal( red );
262 lcdPal.setColor( QColorGroup::Background, QApplication::palette().active().background() ); 262 lcdPal.setColor( QColorGroup::Background, QApplication::palette().active().background() );
263 lcdPal.setColor( QColorGroup::Button, QApplication::palette().active().button() ); 263 lcdPal.setColor( QColorGroup::Button, QApplication::palette().active().button() );
264 264
265// guessLCD->setPalette( lcdPal ); 265// guessLCD->setPalette( lcdPal );
266 guessLCD->setSegmentStyle( QLCDNumber::Flat ); 266 guessLCD->setSegmentStyle( QLCDNumber::Flat );
267 guessLCD->setFrameStyle( QFrame::NoFrame ); 267 guessLCD->setFrameStyle( QFrame::NoFrame );
268 guessLCD->setNumDigits( 2 ); 268 guessLCD->setNumDigits( 2 );
269 guessLCD->setBackgroundMode( PaletteButton ); 269 guessLCD->setBackgroundMode( PaletteButton );
270 newGameButton = new QPushButton( toolBar ); 270 newGameButton = new QPushButton( 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
@@ -24,49 +24,49 @@
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25 25
26#include <qlabel.h> 26#include <qlabel.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qstyle.h> 29#include <qstyle.h>
30#include <qpe/qpetoolbar.h> 30#include <qpe/qpetoolbar.h>
31#include <qtoolbutton.h> 31#include <qtoolbutton.h>
32 32
33ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) : 33ParaShoot::ParaShoot(QWidget* parent, const char* name, WFlags f) :
34 QMainWindow(parent,name,f), 34 QMainWindow(parent,name,f),
35 canvas(232, 258), 35 canvas(232, 258),
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 );
61 showScore(0,0); 61 showScore(0,0);
62 62
63 setCentralWidget(pb); 63 setCentralWidget(pb);
64 64
65 autoDropTimer = new QTimer(this); 65 autoDropTimer = new QTimer(this);
66 connect (autoDropTimer, SIGNAL(timeout()), this, SLOT(play()) ); 66 connect (autoDropTimer, SIGNAL(timeout()), this, SLOT(play()) );
67 67
68 pauseTimer = new QTimer(this); 68 pauseTimer = new QTimer(this);
69 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) ); 69 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
70 70
71 setFocusPolicy(StrongFocus); 71 setFocusPolicy(StrongFocus);
72 72
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
@@ -24,49 +24,49 @@
24 24
25#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
26#include <qtoolbutton.h> 26#include <qtoolbutton.h>
27#include <qstyle.h> 27#include <qstyle.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qmessagebox.h> 29#include <qmessagebox.h>
30 30
31SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : 31SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) :
32 QMainWindow(parent,name,f), 32 QMainWindow(parent,name,f),
33 canvas(232, 258) 33 canvas(232, 258)
34{ 34{
35 setCaption( tr("Snake") ); 35 setCaption( tr("Snake") );
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 );
61 61
62 setFocusPolicy(StrongFocus); 62 setFocusPolicy(StrongFocus);
63 63
64 setCentralWidget(cv); 64 setCentralWidget(cv);
65 65
66 QTimer::singleShot( 16, this, SLOT(welcomescreen()) ); 66 QTimer::singleShot( 16, this, SLOT(welcomescreen()) );
67 gamestopped = true; 67 gamestopped = true;
68 waitover = true; 68 waitover = true;
69} 69}
70 70
71SnakeGame::~SnakeGame() 71SnakeGame::~SnakeGame()
72{ 72{
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
@@ -6,49 +6,49 @@
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
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 "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
43class CanvasCardPile : public QCanvasRectangle 43class CanvasCardPile : public QCanvasRectangle
44{ 44{
45public: 45public:
46 CanvasCardPile( CanvasCardGame *ccg, QCanvas *canvas ) : QCanvasRectangle( canvas ), parent( ccg ) { 46 CanvasCardPile( CanvasCardGame *ccg, QCanvas *canvas ) : QCanvasRectangle( canvas ), parent( ccg ) {
47 pile = new QPixmap( 0, 0 ); 47 pile = new QPixmap( 0, 0 );
48 pileHeight = 0; 48 pileHeight = 0;
49 firstCard = NULL; 49 firstCard = NULL;
50 } 50 }
51 51
52 void addCard( CanvasCard *card ); 52 void addCard( CanvasCard *card );
53 void advance(int stage); 53 void advance(int stage);
54 void animatedMove() { animatedMove(savedX, savedY); } 54 void animatedMove() { animatedMove(savedX, savedY); }
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
@@ -113,49 +113,49 @@ const char* sampleWGR=
113 "8 s 1\n" 113 "8 s 1\n"
114 "8 i 1\n" 114 "8 i 1\n"
115 "11 e 1\n" 115 "11 e 1\n"
116 "0\n"; 116 "0\n";
117 117
118WordGame::WordGame( QWidget* parent, const char* name, WFlags fl ) : 118WordGame::WordGame( QWidget* parent, const char* name, WFlags fl ) :
119 QMainWindow(parent, name, fl) 119 QMainWindow(parent, name, fl)
120{ 120{
121 if ( qApp->desktop()->width() < 240 ) { 121 if ( qApp->desktop()->width() < 240 ) {
122 tile_smallw = 10; 122 tile_smallw = 10;
123 tile_smallh = 10; 123 tile_smallh = 10;
124 tile_bigw = 16; 124 tile_bigw = 16;
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;
150 150
151 aiheart = new QTimer(this); 151 aiheart = new QTimer(this);
152 connect(aiheart, SIGNAL(timeout()), this, SLOT(think())); 152 connect(aiheart, SIGNAL(timeout()), this, SLOT(think()));
153 153
154 readConfig(); 154 readConfig();
155} 155}
156 156
157WordGame::~WordGame() 157WordGame::~WordGame()
158{ 158{
159 writeConfig(); 159 writeConfig();
160} 160}
161 161