author | zecke <zecke> | 2004-02-06 12:14:56 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-06 12:14:56 (UTC) |
commit | 0c74629e8f5c12a9b5a282b817f884fa10dee491 (patch) (unidiff) | |
tree | 3294663b92023f8d24d68a01022e011a3c94002d /noncore/games/solitaire | |
parent | 46ce5afcfbe7be19f4d5ac0fed6886a0759f1a25 (diff) | |
download | opie-0c74629e8f5c12a9b5a282b817f884fa10dee491.zip opie-0c74629e8f5c12a9b5a282b817f884fa10dee491.tar.gz opie-0c74629e8f5c12a9b5a282b817f884fa10dee491.tar.bz2 |
Merge from the 1.0.x release
-rw-r--r-- | noncore/games/solitaire/canvascardwindow.cpp | 1 | ||||
-rw-r--r-- | noncore/games/solitaire/canvascardwindow.h | 1 | ||||
-rw-r--r-- | noncore/games/solitaire/carddeck.cpp | 2 | ||||
-rw-r--r-- | noncore/games/solitaire/main.cpp | 14 | ||||
-rwxr-xr-x | noncore/games/solitaire/solitaire.pro | 5 |
5 files changed, 7 insertions, 16 deletions
diff --git a/noncore/games/solitaire/canvascardwindow.cpp b/noncore/games/solitaire/canvascardwindow.cpp index dec5591..c12344a 100644 --- a/noncore/games/solitaire/canvascardwindow.cpp +++ b/noncore/games/solitaire/canvascardwindow.cpp | |||
@@ -34,12 +34,13 @@ | |||
34 | 34 | ||
35 | CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) : | 35 | CanvasCardWindow::CanvasCardWindow(QWidget* parent, const char* name, WFlags f) : |
36 | QMainWindow(parent, name, f), canvas(230, 260), snapOn(TRUE), cardBack(4), gameType(0), | 36 | QMainWindow(parent, name, f), canvas(230, 260), snapOn(TRUE), cardBack(4), gameType(0), |
37 | cardGame(NULL) | 37 | cardGame(NULL) |
38 | { | 38 | { |
39 | setIcon( Resource::loadPixmap( "cards" ) ); | 39 | setIcon( Resource::loadPixmap( "cards" ) ); |
40 | setCaption(tr("Patience")); | ||
40 | 41 | ||
41 | // Create Playing Area for Games | 42 | // Create Playing Area for Games |
42 | if ( QPixmap::defaultDepth() < 12 ) { | 43 | if ( QPixmap::defaultDepth() < 12 ) { |
43 | // canvas.setBackgroundColor(QColor(0x51, 0x74, 0x6B)); | 44 | // canvas.setBackgroundColor(QColor(0x51, 0x74, 0x6B)); |
44 | // canvas.setBackgroundColor(QColor(0x20, 0xb0, 0x50)); | 45 | // canvas.setBackgroundColor(QColor(0x20, 0xb0, 0x50)); |
45 | canvas.setBackgroundColor(QColor(0x08, 0x98, 0x2D)); | 46 | canvas.setBackgroundColor(QColor(0x08, 0x98, 0x2D)); |
diff --git a/noncore/games/solitaire/canvascardwindow.h b/noncore/games/solitaire/canvascardwindow.h index eddb184..abd6af6 100644 --- a/noncore/games/solitaire/canvascardwindow.h +++ b/noncore/games/solitaire/canvascardwindow.h | |||
@@ -30,12 +30,13 @@ class QPopupMenu; | |||
30 | 30 | ||
31 | 31 | ||
32 | class CanvasCardWindow : public QMainWindow { | 32 | class CanvasCardWindow : public QMainWindow { |
33 | Q_OBJECT | 33 | Q_OBJECT |
34 | 34 | ||
35 | public: | 35 | public: |
36 | static QString appName() { return QString::fromLatin1("patience"); } | ||
36 | CanvasCardWindow(QWidget* parent=0, const char* name=0, WFlags f=0); | 37 | CanvasCardWindow(QWidget* parent=0, const char* name=0, WFlags f=0); |
37 | virtual ~CanvasCardWindow(); | 38 | virtual ~CanvasCardWindow(); |
38 | 39 | ||
39 | public slots: | 40 | public slots: |
40 | void setCardBacks(); | 41 | void setCardBacks(); |
41 | void changeCardBacks(); | 42 | void changeCardBacks(); |
diff --git a/noncore/games/solitaire/carddeck.cpp b/noncore/games/solitaire/carddeck.cpp index a2d0076..b130131 100644 --- a/noncore/games/solitaire/carddeck.cpp +++ b/noncore/games/solitaire/carddeck.cpp | |||
@@ -22,13 +22,13 @@ | |||
22 | #include "card.h" | 22 | #include "card.h" |
23 | #include "carddeck.h" | 23 | #include "carddeck.h" |
24 | 24 | ||
25 | 25 | ||
26 | CardDeck::CardDeck(int jokers, int numOfDecks) : numberOfJokers(jokers), numberOfDecks(numOfDecks), deckCreated(FALSE) | 26 | CardDeck::CardDeck(int jokers, int numOfDecks) : numberOfJokers(jokers), numberOfDecks(numOfDecks), deckCreated(FALSE) |
27 | { | 27 | { |
28 | cards = new (Card *)[getNumberOfCards()]; | 28 | cards = new Card *[getNumberOfCards()]; |
29 | } | 29 | } |
30 | 30 | ||
31 | 31 | ||
32 | CardDeck::~CardDeck() | 32 | CardDeck::~CardDeck() |
33 | { | 33 | { |
34 | for (int i = 0; i < getNumberOfCards(); i++) | 34 | for (int i = 0; i < getNumberOfCards(); i++) |
diff --git a/noncore/games/solitaire/main.cpp b/noncore/games/solitaire/main.cpp index f81aa3c..bd3cf8b 100644 --- a/noncore/games/solitaire/main.cpp +++ b/noncore/games/solitaire/main.cpp | |||
@@ -18,19 +18,9 @@ | |||
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "canvascardwindow.h" | 21 | #include "canvascardwindow.h" |
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <opie/oapplicationfactory.h> | ||
24 | 25 | ||
25 | 26 | OPIE_EXPORT_APP( OApplicationFactory<CanvasCardWindow> ) \ No newline at end of file | |
26 | int main( int argc, char ** argv ) | ||
27 | { | ||
28 | QPEApplication a( argc, argv ); | ||
29 | |||
30 | CanvasCardWindow m; | ||
31 | m.setCaption( CanvasCardWindow::tr("Patience") ); | ||
32 | a.showMainWidget( &m ); | ||
33 | |||
34 | return a.exec(); | ||
35 | } | ||
36 | |||
diff --git a/noncore/games/solitaire/solitaire.pro b/noncore/games/solitaire/solitaire.pro index 1ac62c3..b1b8bda 100755 --- a/noncore/games/solitaire/solitaire.pro +++ b/noncore/games/solitaire/solitaire.pro | |||
@@ -1,10 +1,8 @@ | |||
1 | TEMPLATE = app | ||
2 | 1 | ||
3 | CONFIG += qt warn_on release | 2 | CONFIG += qt warn_on release quick-app |
4 | DESTDIR = $(OPIEDIR)/bin | ||
5 | 3 | ||
6 | HEADERS = canvascard.h canvasshapes.h cardgame.h cardgamelayout.h cardpile.h card.h carddeck.h \ | 4 | HEADERS = canvascard.h canvasshapes.h cardgame.h cardgamelayout.h cardpile.h card.h carddeck.h \ |
7 | canvascardgame.h freecellcardgame.h chicanecardgame.h harpcardgame.h teeclubcardgame.h \ | 5 | canvascardgame.h freecellcardgame.h chicanecardgame.h harpcardgame.h teeclubcardgame.h \ |
8 | patiencecardgame.h canvascardwindow.h | 6 | patiencecardgame.h canvascardwindow.h |
9 | 7 | ||
10 | SOURCES = canvascard.cpp canvasshapes.cpp cardgame.cpp cardgamelayout.cpp \ | 8 | SOURCES = canvascard.cpp canvasshapes.cpp cardgame.cpp cardgamelayout.cpp \ |
@@ -15,7 +13,8 @@ SOURCES = canvascard.cpp canvasshapes.cpp cardgame.cpp cardgamelayout.cpp \ | |||
15 | TARGET = patience | 13 | TARGET = patience |
16 | 14 | ||
17 | INCLUDEPATH += $(OPIEDIR)/include | 15 | INCLUDEPATH += $(OPIEDIR)/include |
18 | DEPENDPATH += $(OPIEDIR)/include | 16 | DEPENDPATH += $(OPIEDIR)/include |
19 | LIBS += -lqpe | 17 | LIBS += -lqpe |
20 | 18 | ||
19 | |||
21 | include ( $(OPIEDIR)/include.pro ) | 20 | include ( $(OPIEDIR)/include.pro ) |