[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdegames/kpat
From: Inge Wallin <inge () lysator ! liu ! se>
Date: 2004-11-20 15:50:14
Message-ID: 20041120155014.379CA16EDC () office ! kde ! org
[Download RAW message or body]
CVS commit by ingwa:
Some minor cleaning
M +1 -0 CHANGES 1.16
M +18 -10 pwidget.cpp 1.122
M +17 -9 pwidget.h 1.38
--- kdegames/kpat/CHANGES #1.15:1.16
@@ -3,4 +3,5 @@
Continue the code cleaning
- card.h, card.cpp
+
2004-11-04 Inge Wallin <inge@lysator.liu.se>
--- kdegames/kpat/pwidget.cpp #1.121:1.122
@@ -23,13 +23,10 @@
#include <qregexp.h>
#include <qtimer.h>
+#include <qimage.h>
#include <kapplication.h>
#include <klocale.h>
-#include "pwidget.h"
-#include "version.h"
#include <kaction.h>
-#include "dealer.h"
#include <kdebug.h>
-#include "cardmaps.h"
#include <kcarddialog.h>
#include <kinputdialog.h>
@@ -39,9 +36,13 @@
#include <kio/netaccess.h>
#include <kmessagebox.h>
-#include <qimage.h>
#include <kstatusbar.h>
-#include "speeds.h"
#include <kaccelmanager.h>
#include <kmenubar.h>
+
+#include "pwidget.h"
+#include "version.h"
+#include "dealer.h"
+#include "cardmaps.h"
+#include "speeds.h"
#include "gamestatsimpl.h"
@@ -290,5 +293,8 @@ void pWidget::enableAutoDrop()
}
-void pWidget::newGame() {
+void pWidget::newGame()
+{
+ // Check if the user is already running a game, and if she is,
+ // then ask if she wants to abort it.
if (!dill->isGameWon()
&& KMessageBox::warningYesNo(0,
@@ -308,5 +314,7 @@ void pWidget::newGame() {
}
-void pWidget::restart() {
+
+void pWidget::restart()
+{
statusBar()->clear();
dill->resetMoves();
@@ -488,5 +496,5 @@ void pWidget::gameLost()
QTimer::singleShot(0, this, SLOT(newGame()));
}
- }
+}
void pWidget::openGame(const KURL &url)
--- kdegames/kpat/pwidget.h #1.37:1.38
@@ -69,9 +69,17 @@ private:
virtual void showEvent(QShowEvent *e);
- Dealer* dill;
- KSelectAction *games, *wallpapers;
- KAction *backs, *undo;
- KToggleAction *animation, *dropaction;
+private:
+ // Members
+
+ Dealer *dill; // The current patience
+
+ KSelectAction *games;
+ KSelectAction *wallpapers;
+ KAction *backs;
+ KAction *undo;
+ KToggleAction *animation;
+ KToggleAction *dropaction;
KAction *stats;
+
QPixmap background;
QColor midcolor;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic