summaryrefslogtreecommitdiff
path: root/noncore/games/mindbreaker/mindbreaker.cpp
Unidiff
Diffstat (limited to 'noncore/games/mindbreaker/mindbreaker.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/mindbreaker/mindbreaker.cpp2
1 files changed, 1 insertions, 1 deletions
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;