Diffstat (limited to 'noncore/games/solitaire/canvascardwindow.cpp') (more/less context) (show 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() |