Diffstat (limited to 'noncore/games/mindbreaker/mindbreaker.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/mindbreaker/mindbreaker.h | 27 |
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,6 +1,6 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the 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 |
@@ -52,4 +52,5 @@ static const int board_width = (panel_width + (bin_margin * 2) + peg_size); | |||
52 | class Peg; | 52 | class Peg; |
53 | class QToolButton; | 53 | class QToolButton; |
54 | class QTimer; | ||
54 | 55 | ||
55 | class MindBreakerBoard : public QCanvasView // QWidget | 56 | class MindBreakerBoard : public QCanvasView // QWidget |
@@ -57,8 +58,12 @@ class MindBreakerBoard : public QCanvasView // QWidget | |||
57 | Q_OBJECT | 58 | Q_OBJECT |
58 | public: | 59 | public: |
59 | MindBreakerBoard(QCanvas &c, QWidget *parent=0, const char *name=0, int wFlags=0 ); | 60 | MindBreakerBoard(QWidget *parent=0, const char *name=0, int wFlags=0 ); |
60 | ~MindBreakerBoard(); | 61 | ~MindBreakerBoard(); |
61 | 62 | ||
62 | void getScore(int *, int *); | 63 | void getScore(int *, int *); |
64 | |||
65 | void resizeEvent(QResizeEvent*); | ||
66 | void fixSize(); | ||
67 | |||
63 | signals: | 68 | signals: |
64 | void scoreChanged(int, int); | 69 | void scoreChanged(int, int); |
@@ -68,11 +73,18 @@ public slots: | |||
68 | void resetScore(); | 73 | void resetScore(); |
69 | 74 | ||
75 | private slots: | ||
76 | void doFixSize(); | ||
77 | |||
70 | protected: | 78 | protected: |
71 | void contentsMousePressEvent(QMouseEvent *); | 79 | void contentsMousePressEvent(QMouseEvent *); |
72 | void contentsMouseMoveEvent(QMouseEvent *); | 80 | void contentsMouseMoveEvent(QMouseEvent *); |
73 | void contentsMouseReleaseEvent(QMouseEvent *); | 81 | void contentsMouseReleaseEvent(QMouseEvent *); |
74 | void resizeEvent(QResizeEvent *); | ||
75 | 82 | ||
76 | private: | 83 | private: |
84 | QCanvas cnv; | ||
85 | |||
86 | void readConfig(); | ||
87 | void writeConfig(); | ||
88 | |||
77 | void drawBackground(); | 89 | void drawBackground(); |
78 | void checkGuess(); | 90 | void checkGuess(); |
@@ -101,4 +113,6 @@ private: | |||
101 | int total_turns; | 113 | int total_turns; |
102 | int total_games; | 114 | int total_games; |
115 | |||
116 | QTimer *widthTimer; | ||
103 | }; | 117 | }; |
104 | 118 | ||
@@ -108,8 +122,11 @@ class MindBreaker : public QMainWindow // QWidget | |||
108 | public: | 122 | public: |
109 | MindBreaker(QWidget *parent=0, const char *name=0, int wFlags=0 ); | 123 | MindBreaker(QWidget *parent=0, const char *name=0, int wFlags=0 ); |
110 | 124 | static QString appName() { return QString::fromLatin1("mindbreaker"); } | |
111 | public slots: | 125 | public slots: |
112 | void setScore(int, int); | 126 | void setScore(int, int); |
113 | 127 | ||
128 | protected: | ||
129 | void resizeEvent( QResizeEvent * ); | ||
130 | |||
114 | private: | 131 | private: |
115 | QCanvas canvas; | 132 | QCanvas canvas; |