summaryrefslogtreecommitdiff
path: root/noncore/games/minesweep/minesweep.cpp
Side-by-side diff
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 @@
+#include <qpe/qpeapplication.h>
#include <qpe/resource.h>
@@ -157,8 +158,8 @@ class ResultIndicator : private QLabel
{
-public:
+public:
static void showResult( QWidget *ref, bool won );
-private:
+private:
ResultIndicator( QWidget *parent, const char *name, WFlags f)
:QLabel( parent, name, f ) {}
-
+
void timerEvent( QTimerEvent *);
@@ -172,3 +173,3 @@ void ResultIndicator::showResult( QWidget *ref, bool won )
ResultIndicator *r = new ResultIndicator( ref, 0, WStyle_Customize | WStyle_Tool | WType_TopLevel );
-
+
r->setAlignment( AlignCenter );
@@ -197,3 +198,3 @@ void ResultIndicator::center()
- QPoint pp = w->mapToGlobal( QPoint(0,0) );
+ QPoint pp = w->mapToGlobal( QPoint(0,0) );
QSize s = sizeHint()*3;
@@ -203,3 +204,3 @@ void ResultIndicator::center()
setGeometry( QRect(pp, s) );
-
+
}
@@ -230,3 +231,3 @@ protected:
field->setAvailableRect( contentsRect());
- QFrame::resizeEvent(e);
+ QFrame::resizeEvent(e);
}
@@ -241,2 +242,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
{
+ QPEApplication::setInputMethodHint(this, QPEApplication::AlwaysOff );
srand(::time(0));
@@ -256,3 +258,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
menuBar->insertItem( tr("Game"), gameMenu );
-
+
guessLCD = new QLCDNumber( toolBar );
@@ -263,3 +265,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
lcdPal.setColor( QColorGroup::Button, QApplication::palette().active().button() );
-
+
// guessLCD->setPalette( lcdPal );
@@ -273,3 +275,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
connect( newGameButton, SIGNAL(clicked()), this, SLOT(newGame()) );
-
+
timeLCD = new QLCDNumber( toolBar );
@@ -280,3 +282,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
timeLCD->setBackgroundMode( PaletteButton );
-
+
setToolBarsMovable ( FALSE );
@@ -298,3 +300,3 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
setCentralWidget( mainframe );
-
+
connect( field, SIGNAL( gameOver( bool ) ), this, SLOT( gameOver( bool ) ) );