summaryrefslogtreecommitdiff
path: root/noncore/games/minesweep/minesweep.cpp
Unidiff
Diffstat (limited to 'noncore/games/minesweep/minesweep.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/minesweep/minesweep.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/noncore/games/minesweep/minesweep.cpp b/noncore/games/minesweep/minesweep.cpp
index 48644b3..7214a73 100644
--- a/noncore/games/minesweep/minesweep.cpp
+++ b/noncore/games/minesweep/minesweep.cpp
@@ -23,2 +23,3 @@
23 23
24#include <qpe/qpeapplication.h>
24#include <qpe/resource.h> 25#include <qpe/resource.h>
@@ -157,8 +158,8 @@ class ResultIndicator : private QLabel
157{ 158{
158public: 159public:
159 static void showResult( QWidget *ref, bool won ); 160 static void showResult( QWidget *ref, bool won );
160private: 161private:
161 ResultIndicator( QWidget *parent, const char *name, WFlags f) 162 ResultIndicator( QWidget *parent, const char *name, WFlags f)
162 :QLabel( parent, name, f ) {} 163 :QLabel( parent, name, f ) {}
163 164
164 void timerEvent( QTimerEvent *); 165 void timerEvent( QTimerEvent *);
@@ -172,3 +173,3 @@ void ResultIndicator::showResult( QWidget *ref, bool won )
172 ResultIndicator *r = new ResultIndicator( ref, 0, WStyle_Customize | WStyle_Tool | WType_TopLevel ); 173 ResultIndicator *r = new ResultIndicator( ref, 0, WStyle_Customize | WStyle_Tool | WType_TopLevel );
173 174
174 r->setAlignment( AlignCenter ); 175 r->setAlignment( AlignCenter );
@@ -197,3 +198,3 @@ void ResultIndicator::center()
197 198
198 QPoint pp = w->mapToGlobal( QPoint(0,0) ); 199 QPoint pp = w->mapToGlobal( QPoint(0,0) );
199 QSize s = sizeHint()*3; 200 QSize s = sizeHint()*3;
@@ -203,3 +204,3 @@ void ResultIndicator::center()
203 setGeometry( QRect(pp, s) ); 204 setGeometry( QRect(pp, s) );
204 205
205} 206}
@@ -230,3 +231,3 @@ protected:
230 field->setAvailableRect( contentsRect()); 231 field->setAvailableRect( contentsRect());
231 QFrame::resizeEvent(e); 232 QFrame::resizeEvent(e);
232 } 233 }
@@ -241,2 +242,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
241{ 242{
243 QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff );
242 srand(::time(0)); 244 srand(::time(0));
@@ -256,3 +258,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
256 menuBar->insertItem( tr("Game"), gameMenu ); 258 menuBar->insertItem( tr("Game"), gameMenu );
257 259
258 guessLCD = new QLCDNumber( toolBar ); 260 guessLCD = new QLCDNumber( toolBar );
@@ -263,3 +265,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
263 lcdPal.setColor( QColorGroup::Button, QApplication::palette().active().button() ); 265 lcdPal.setColor( QColorGroup::Button, QApplication::palette().active().button() );
264 266
265// guessLCD->setPalette( lcdPal ); 267// guessLCD->setPalette( lcdPal );
@@ -273,3 +275,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
273 connect( newGameButton, SIGNAL(clicked()), this, SLOT(newGame()) ); 275 connect( newGameButton, SIGNAL(clicked()), this, SLOT(newGame()) );
274 276
275 timeLCD = new QLCDNumber( toolBar ); 277 timeLCD = new QLCDNumber( toolBar );
@@ -280,3 +282,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
280 timeLCD->setBackgroundMode( PaletteButton ); 282 timeLCD->setBackgroundMode( PaletteButton );
281 283
282 setToolBarsMovable ( FALSE ); 284 setToolBarsMovable ( FALSE );
@@ -298,3 +300,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
298 setCentralWidget( mainframe ); 300 setCentralWidget( mainframe );
299 301
300 connect( field, SIGNAL( gameOver( bool ) ), this, SLOT( gameOver( bool ) ) ); 302 connect( field, SIGNAL( gameOver( bool ) ), this, SLOT( gameOver( bool ) ) );