summaryrefslogtreecommitdiff
path: root/noncore/games/tictac/tictac.cpp
Unidiff
Diffstat (limited to 'noncore/games/tictac/tictac.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/tictac/tictac.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/games/tictac/tictac.cpp b/noncore/games/tictac/tictac.cpp
index 4954ba4..9de3b58 100644
--- a/noncore/games/tictac/tictac.cpp
+++ b/noncore/games/tictac/tictac.cpp
@@ -54,25 +54,25 @@ void TicTacButton::drawButtonLabel( QPainter *p )
54//*************************************************************************** 54//***************************************************************************
55//* TicTacGameBoard member functions 55//* TicTacGameBoard member functions
56//*************************************************************************** 56//***************************************************************************
57 57
58// -------------------------------------------------------------------------- 58// --------------------------------------------------------------------------
59// Creates a game board with N x N buttons and connects the "clicked()" 59// Creates a game board with N x N buttons and connects the "clicked()"
60// signal of all buttons to the "buttonClicked()" slot. 60// signal of all buttons to the "buttonClicked()" slot.
61// 61//
62 62
63TicTacGameBoard::TicTacGameBoard( int n, QWidget *parent, const char *name ) 63TicTacGameBoard::TicTacGameBoard( int n, QWidget *parent, const char *name )
64 : QWidget( parent, name ) 64 : QWidget( parent, name )
65{ 65{
66 showMaximized(); 66 QPEApplication::showWidget( this );
67 st = Init; // initial state 67 st = Init; // initial state
68 nBoard = n; 68 nBoard = n;
69 n *= n; // make square 69 n *= n; // make square
70 comp_starts = FALSE; // human starts 70 comp_starts = FALSE; // human starts
71 buttons = new TicTacButtons(n); // create real buttons 71 buttons = new TicTacButtons(n); // create real buttons
72 btArray = new TicTacArray(n); // create button model 72 btArray = new TicTacArray(n); // create button model
73 QGridLayout * grid = new QGridLayout( this, 3, 3, 4 ); 73 QGridLayout * grid = new QGridLayout( this, 3, 3, 4 );
74 QPalette p( blue ); 74 QPalette p( blue );
75 for ( int i=0; i<n; i++ ) { // create and connect buttons 75 for ( int i=0; i<n; i++ ) { // create and connect buttons
76 TicTacButton *ttb = new TicTacButton( this ); 76 TicTacButton *ttb = new TicTacButton( this );
77 ttb->setPalette( p ); 77 ttb->setPalette( p );
78 ttb->setEnabled( FALSE ); 78 ttb->setEnabled( FALSE );
@@ -324,25 +324,25 @@ TicTacToe::TicTacToe( QWidget *parent, const char *name, WFlags fl )
324 324
325 // Create the push buttons and connect their clicked() signals 325 // Create the push buttons and connect their clicked() signals
326 // to this right slots. 326 // to this right slots.
327 327
328 newGame = new QPushButton( tr( "Play!" ), this ); 328 newGame = new QPushButton( tr( "Play!" ), this );
329 connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) ); 329 connect( newGame, SIGNAL(clicked()), SLOT(newGameClicked()) );
330 quit = new QPushButton( tr( "Quit" ), this ); 330 quit = new QPushButton( tr( "Quit" ), this );
331 connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) ); 331 connect( quit, SIGNAL(clicked()), qApp, SLOT(quit()) );
332 QHBoxLayout * b = new QHBoxLayout; 332 QHBoxLayout * b = new QHBoxLayout;
333 l->addLayout( b ); 333 l->addLayout( b );
334 b->addWidget( newGame ); 334 b->addWidget( newGame );
335 b->addWidget( quit ); 335 b->addWidget( quit );
336 showMaximized(); 336 QPEApplication::showWidget( this );
337 newState(); 337 newState();
338} 338}
339 339
340 340
341// -------------------------------------------------------------------------- 341// --------------------------------------------------------------------------
342// TicTacToe::newGameClicked() - SLOT 342// TicTacToe::newGameClicked() - SLOT
343// 343//
344// This slot is activated when the new game button is clicked. 344// This slot is activated when the new game button is clicked.
345// 345//
346 346
347void TicTacToe::newGameClicked() 347void TicTacToe::newGameClicked()
348{ 348{