Diffstat (limited to 'noncore/games/tictac/tictac.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/tictac/tictac.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/games/tictac/tictac.cpp b/noncore/games/tictac/tictac.cpp index 3d727ac..4954ba4 100644 --- a/noncore/games/tictac/tictac.cpp +++ b/noncore/games/tictac/tictac.cpp | |||
@@ -1,14 +1,14 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** tictac.cpp,v 1.3.8.1 2003/08/29 06:50:40 harlekin Exp |
3 | ** | 3 | ** |
4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | 4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. |
5 | ** | 5 | ** |
6 | ** This file is part of an example program for Qt. This example | 6 | ** This file is part of an example program for Qt. This example |
7 | ** program may be used, distributed and modified without limitation. | 7 | ** program may be used, distributed and modified without limitation. |
8 | ** | 8 | ** |
9 | *****************************************************************************/ | 9 | *****************************************************************************/ |
10 | 10 | ||
11 | #include "tictac.h" | 11 | #include "tictac.h" |
12 | #include <qpe/qpeapplication.h> | 12 | #include <qpe/qpeapplication.h> |
13 | #include <qpainter.h> | 13 | #include <qpainter.h> |
14 | #include <qdrawutil.h> | 14 | #include <qdrawutil.h> |
@@ -279,30 +279,31 @@ void TicTacGameBoard::computerMove() | |||
279 | } | 279 | } |
280 | 280 | ||
281 | 281 | ||
282 | //*************************************************************************** | 282 | //*************************************************************************** |
283 | //* TicTacToe member functions | 283 | //* TicTacToe member functions |
284 | //*************************************************************************** | 284 | //*************************************************************************** |
285 | 285 | ||
286 | // -------------------------------------------------------------------------- | 286 | // -------------------------------------------------------------------------- |
287 | // Creates a game widget with a game board and two push buttons, and connects | 287 | // Creates a game widget with a game board and two push buttons, and connects |
288 | // signals of child widgets to slots. | 288 | // signals of child widgets to slots. |
289 | // | 289 | // |
290 | 290 | ||
291 | TicTacToe::TicTacToe( int boardSize, QWidget *parent, const char *name ) | 291 | TicTacToe::TicTacToe( QWidget *parent, const char *name, WFlags fl ) |
292 | : QWidget( parent, name ) | 292 | : QWidget( parent, name, fl ) |
293 | { | 293 | { |
294 | QVBoxLayout * l = new QVBoxLayout( this, 6 ); | 294 | QVBoxLayout * l = new QVBoxLayout( this, 6 ); |
295 | 295 | ||
296 | // Create a message label | 296 | // Create a message label |
297 | boardSize = 3; | ||
297 | 298 | ||
298 | message = new QLabel( this ); | 299 | message = new QLabel( this ); |
299 | message->setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); | 300 | message->setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); |
300 | message->setAlignment( AlignCenter ); | 301 | message->setAlignment( AlignCenter ); |
301 | l->addWidget( message ); | 302 | l->addWidget( message ); |
302 | 303 | ||
303 | // Create the game board and connect the signal finished() to this | 304 | // Create the game board and connect the signal finished() to this |
304 | // gameOver() slot | 305 | // gameOver() slot |
305 | 306 | ||
306 | board = new TicTacGameBoard( boardSize, this ); | 307 | board = new TicTacGameBoard( boardSize, this ); |
307 | connect( board, SIGNAL(finished()), SLOT(gameOver()) ); | 308 | connect( board, SIGNAL(finished()), SLOT(gameOver()) ); |
308 | l->addWidget( board ); | 309 | l->addWidget( board ); |