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 | |||
@@ -24,4 +24,5 @@ | |||
24 | #include "chicanecardgame.h" | 24 | #include "chicanecardgame.h" |
25 | #include "harpcardgame.h" | 25 | #include "harpcardgame.h" |
26 | #include "teeclubcardgame.h" | ||
26 | 27 | ||
27 | #include <qpe/resource.h> | 28 | #include <qpe/resource.h> |
@@ -64,4 +65,5 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) | |||
64 | file->insertItem(tr("Chicane"), this, SLOT(initChicane()), CTRL+Key_F); | 65 | file->insertItem(tr("Chicane"), this, SLOT(initChicane()), CTRL+Key_F); |
65 | file->insertItem(tr("Harp"), this, SLOT(initHarp()), CTRL+Key_F); | 66 | file->insertItem(tr("Harp"), this, SLOT(initHarp()), CTRL+Key_F); |
67 | file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub()), CTRL+Key_F); | ||
66 | menu->insertItem(tr("&Game"), file); | 68 | menu->insertItem(tr("&Game"), file); |
67 | 69 | ||
@@ -88,4 +90,5 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) | |||
88 | file->insertItem(tr("Chicane"), this, SLOT(initChicane())); | 90 | file->insertItem(tr("Chicane"), this, SLOT(initChicane())); |
89 | file->insertItem(tr("Harp"), this, SLOT(initHarp())); | 91 | file->insertItem(tr("Harp"), this, SLOT(initHarp())); |
92 | file->insertItem(tr("Teeclub"), this, SLOT(initTeeclub())); | ||
90 | menu->insertItem(tr("Play"), file); | 93 | menu->insertItem(tr("Play"), file); |
91 | 94 | ||
@@ -130,5 +133,4 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) | |||
130 | setCaption(tr("Chicane")); | 133 | setCaption(tr("Chicane")); |
131 | setCentralWidget(cardGame); | 134 | setCentralWidget(cardGame); |
132 | //cardGame->newGame(); // Until we know how to handle reading freecell config | ||
133 | cardGame->readConfig( cfg ); | 135 | cardGame->readConfig( cfg ); |
134 | setCardBacks(); | 136 | setCardBacks(); |
@@ -138,5 +140,11 @@ CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) | |||
138 | setCaption(tr("Harp")); | 140 | setCaption(tr("Harp")); |
139 | setCentralWidget(cardGame); | 141 | setCentralWidget(cardGame); |
140 | //cardGame->newGame(); // Until we know how to handle reading freecell config | 142 | cardGame->readConfig( cfg ); |
143 | setCardBacks(); | ||
144 | } else if ( gameType == 4 ) { | ||
145 | cardGame = new TeeclubCardGame( &canvas, snapOn, this ); | ||
146 | cardGame->setNumberToDraw(1); | ||
147 | setCaption(tr("Teeclub")); | ||
148 | setCentralWidget(cardGame); | ||
141 | cardGame->readConfig( cfg ); | 149 | cardGame->readConfig( cfg ); |
142 | setCardBacks(); | 150 | setCardBacks(); |
@@ -235,4 +243,20 @@ void CanvasCardWindow::initHarp() | |||
235 | 243 | ||
236 | 244 | ||
245 | void CanvasCardWindow::initTeeclub() | ||
246 | { | ||
247 | // Create New Game | ||
248 | if ( cardGame ) { | ||
249 | delete cardGame; | ||
250 | } | ||
251 | cardGame = new TeeclubCardGame( &canvas, snapOn, this ); | ||
252 | cardGame->setNumberToDraw(1); | ||
253 | gameType = 4; | ||
254 | setCaption(tr("Teeclub")); | ||
255 | setCentralWidget(cardGame); | ||
256 | cardGame->newGame(); | ||
257 | setCardBacks(); | ||
258 | } | ||
259 | |||
260 | |||
237 | void CanvasCardWindow::snapToggle() | 261 | void CanvasCardWindow::snapToggle() |
238 | { | 262 | { |