author | tille <tille> | 2002-07-10 13:05:07 (UTC) |
---|---|---|
committer | tille <tille> | 2002-07-10 13:05:07 (UTC) |
commit | 5d989e509abecf74aaa4eb88abf52a6821d19501 (patch) (side-by-side diff) | |
tree | 3e61348802a9ea05980e91e13344a45be509b7d1 /noncore/games/solitaire/canvascardwindow.cpp | |
parent | 32954f729822e2d25f9e116400cbf2522a88ce42 (diff) | |
download | opie-5d989e509abecf74aaa4eb88abf52a6821d19501.zip opie-5d989e509abecf74aaa4eb88abf52a6821d19501.tar.gz opie-5d989e509abecf74aaa4eb88abf52a6821d19501.tar.bz2 |
cam implemented new game teeclub and pile resizing
Diffstat (limited to 'noncore/games/solitaire/canvascardwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/solitaire/canvascardwindow.cpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/noncore/games/solitaire/canvascardwindow.cpp b/noncore/games/solitaire/canvascardwindow.cpp index e1c021e..450b4db 100644 --- a/noncore/games/solitaire/canvascardwindow.cpp +++ b/noncore/games/solitaire/canvascardwindow.cpp @@ -25,2 +25,3 @@ #include "harpcardgame.h" +#include "teeclubcardgame.h" @@ -65,2 +66,3 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) file->insertItem(tr("Harp"), this, SLOT(initHarp()), CTRL+Key_F); + file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub()), CTRL+Key_F); menu->insertItem(tr("&Game"), file); @@ -89,2 +91,3 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) file->insertItem(tr("Harp"), this, SLOT(initHarp())); + file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub())); menu->insertItem(tr("Play"), file); @@ -131,3 +134,2 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) setCentralWidget(cardGame); - //cardGame->newGame(); // Until we know how to handle reading freecell config cardGame->readConfig( cfg ); @@ -139,3 +141,9 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) setCentralWidget(cardGame); - //cardGame->newGame(); // Until we know how to handle reading freecell config + cardGame->readConfig( cfg ); + setCardBacks(); + } else if ( gameType == 4 ) { + cardGame = new TeeclubCardGame( &canvas, snapOn, this ); + cardGame->setNumberToDraw(1); + setCaption(tr("Teeclub")); + setCentralWidget(cardGame); cardGame->readConfig( cfg ); @@ -236,2 +244,18 @@ void CanvasCardWindow::initHarp() +void CanvasCardWindow::initTeeclub() +{ + // Create New Game + if ( cardGame ) { + delete cardGame; + } + cardGame = new TeeclubCardGame( &canvas, snapOn, this ); + cardGame->setNumberToDraw(1); + gameType = 4; + setCaption(tr("Teeclub")); + setCentralWidget(cardGame); + cardGame->newGame(); + setCardBacks(); +} + + void CanvasCardWindow::snapToggle() |