summaryrefslogtreecommitdiff
path: root/noncore/games/mindbreaker/mindbreaker.h
authorzecke <zecke>2004-02-06 12:14:56 (UTC)
committer zecke <zecke>2004-02-06 12:14:56 (UTC)
commit0c74629e8f5c12a9b5a282b817f884fa10dee491 (patch) (side-by-side diff)
tree3294663b92023f8d24d68a01022e011a3c94002d /noncore/games/mindbreaker/mindbreaker.h
parent46ce5afcfbe7be19f4d5ac0fed6886a0759f1a25 (diff)
downloadopie-0c74629e8f5c12a9b5a282b817f884fa10dee491.zip
opie-0c74629e8f5c12a9b5a282b817f884fa10dee491.tar.gz
opie-0c74629e8f5c12a9b5a282b817f884fa10dee491.tar.bz2
Merge from the 1.0.x release
Diffstat (limited to 'noncore/games/mindbreaker/mindbreaker.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/mindbreaker/mindbreaker.h27
1 files changed, 22 insertions, 5 deletions
diff --git a/noncore/games/mindbreaker/mindbreaker.h b/noncore/games/mindbreaker/mindbreaker.h
index fca649a..3132e80 100644
--- a/noncore/games/mindbreaker/mindbreaker.h
+++ b/noncore/games/mindbreaker/mindbreaker.h
@@ -1,7 +1,7 @@
/**********************************************************************
-** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qtopia Environment.
+** This file is part of the Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -51,15 +51,20 @@ static const int board_width = (panel_width + (bin_margin * 2) + peg_size);
class Peg;
class QToolButton;
+class QTimer;
class MindBreakerBoard : public QCanvasView // QWidget
{
Q_OBJECT
public:
- MindBreakerBoard(QCanvas &c, QWidget *parent=0, const char *name=0, int wFlags=0 );
+ MindBreakerBoard(QWidget *parent=0, const char *name=0, int wFlags=0 );
~MindBreakerBoard();
void getScore(int *, int *);
+
+ void resizeEvent(QResizeEvent*);
+ void fixSize();
+
signals:
void scoreChanged(int, int);
@@ -67,13 +72,20 @@ public slots:
void clear();
void resetScore();
+private slots:
+ void doFixSize();
+
protected:
void contentsMousePressEvent(QMouseEvent *);
void contentsMouseMoveEvent(QMouseEvent *);
void contentsMouseReleaseEvent(QMouseEvent *);
- void resizeEvent(QResizeEvent *);
private:
+ QCanvas cnv;
+
+ void readConfig();
+ void writeConfig();
+
void drawBackground();
void checkGuess();
void checkScores();
@@ -100,6 +112,8 @@ private:
int total_turns;
int total_games;
+
+ QTimer *widthTimer;
};
class MindBreaker : public QMainWindow // QWidget
@@ -107,10 +121,13 @@ class MindBreaker : public QMainWindow // QWidget
Q_OBJECT
public:
MindBreaker(QWidget *parent=0, const char *name=0, int wFlags=0 );
-
+ static QString appName() { return QString::fromLatin1("mindbreaker"); }
public slots:
void setScore(int, int);
+protected:
+ void resizeEvent( QResizeEvent * );
+
private:
QCanvas canvas;
MindBreakerBoard *board;