-rw-r--r-- | noncore/games/kcheckers/kcheckers.cpp | 5 | ||||
-rw-r--r-- | noncore/games/kcheckers/kcheckers.h | 3 | ||||
-rw-r--r-- | noncore/games/kcheckers/kcheckers.pro | 5 | ||||
-rw-r--r-- | noncore/games/kcheckers/main.cpp | 12 | ||||
-rw-r--r-- | noncore/games/kcheckers/opie-kcheckers.control | 2 |
5 files changed, 10 insertions, 17 deletions
diff --git a/noncore/games/kcheckers/kcheckers.cpp b/noncore/games/kcheckers/kcheckers.cpp index c2eba0d..2eb37e5 100644 --- a/noncore/games/kcheckers/kcheckers.cpp +++ b/noncore/games/kcheckers/kcheckers.cpp @@ -29,35 +29,36 @@ #include "pics/marble3.xpm" #include "pics/biglogo.xpm" #include "pics/man_black.xpm" #include "pics/man_white.xpm" #include "pics/king_black.xpm" #include "pics/king_white.xpm" #include "pics/contexthelp.xpm" QString KCheckers::enNumeration="1 2 3 4 5 6 7 8 9 1011121314151617181920212223242526272829303132"; QString KCheckers::ruNumeration="B8D8F8H8A7C7E7G7B6D6F6H6A5C5E5G5B4D4F4H4A3C3E3G3B2D2F2H2A1C1E1G1"; const int KCheckers::t[]={6,7,8,9,11,12,13,14,17,18,19,20,22,23, 24,25,28,29,30,31,33,34,35,36,39,40,41,42,44,45,46,47}; -KCheckers::KCheckers():QMainWindow(0,0,WStyle_DialogBorder) +KCheckers::KCheckers(QWidget *p, const char* n, WFlags ) + :QMainWindow(p,n,WStyle_DialogBorder) { - setCaption("KCheckers"); + setCaption(tr("KCheckers") ); setIcon(QPixmap(biglogo_xpm)); setToolBarsMovable(false); // Make a menubar gameMenu=new QPopupMenu; CHECK_PTR(gameMenu); gameMenu->insertItem(QPixmap(logo_xpm),tr("&New"),this,SLOT(newGame()),CTRL+Key_N); gameMenu->insertSeparator(); undoID=gameMenu->insertItem(QPixmap(undo_xpm),tr("&Undo Move"),this,SLOT(undoMove()),CTRL+Key_Z); gameMenu->insertSeparator(); gameMenu->insertItem(QPixmap(exit_xpm),tr("&Quit"),qApp,SLOT(closeAllWindows()),CTRL+Key_Q); skillMenu=new QPopupMenu; diff --git a/noncore/games/kcheckers/kcheckers.h b/noncore/games/kcheckers/kcheckers.h index ccf5bae..bd4afc7 100644 --- a/noncore/games/kcheckers/kcheckers.h +++ b/noncore/games/kcheckers/kcheckers.h @@ -16,33 +16,34 @@ #define RUSSIAN 12 #define BEGINNER 2 #define NOVICE 4 #define AVERAGE 6 #define GOOD 7 #define EXPERT 8 #define MASTER 9 class QToolButton; class KCheckers:public QMainWindow { Q_OBJECT public: - KCheckers(); + static QString appName() { return QString::fromLatin1("kcheckers"); } + KCheckers(QWidget *parent, const char* name, WFlags fl); protected: void closeEvent(QCloseEvent*); private slots: void help(); void about(); void aboutQt(); void newGame(); void undoMove(); void click(int); void showNumeration(); void setSkillBeginner() {setSkill(BEGINNER);}; void setSkillNovice() {setSkill(NOVICE);}; diff --git a/noncore/games/kcheckers/kcheckers.pro b/noncore/games/kcheckers/kcheckers.pro index a23e83a..0d417bf 100644 --- a/noncore/games/kcheckers/kcheckers.pro +++ b/noncore/games/kcheckers/kcheckers.pro @@ -1,20 +1,19 @@ -TEMPLATE = app -CONFIG = qt warn_on release +CONFIG = qt warn_on release quick-app HEADERS = checkers.h \ echeckers.h \ field.h \ kcheckers.h \ rcheckers.h SOURCES = checkers.cpp \ echeckers.cpp \ field.cpp \ kcheckers.cpp \ main.cpp \ rcheckers.cpp INTERFACES = INCLUDEPATH += $(OPIEDIR)/include LIBS += -lqpe -DESTDIR = $(OPIEDIR)/bin TARGET = kcheckers + include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/games/kcheckers/main.cpp b/noncore/games/kcheckers/main.cpp index b8dd620..6ac570a 100644 --- a/noncore/games/kcheckers/main.cpp +++ b/noncore/games/kcheckers/main.cpp @@ -1,18 +1,10 @@ #include <qpe/qpeapplication.h> #include <qfont.h> #include "kcheckers.h" +#include <opie/oapplicationfactory.h> +OPIE_EXPORT_APP( OApplicationFactory<KCheckers> ) -int main(int argc, char *argv[]) -{ - QPEApplication app(argc,argv); - - KCheckers kcheckers; - app.setMainWidget(&kcheckers); - kcheckers.showMaximized(); - - return app.exec(); -} diff --git a/noncore/games/kcheckers/opie-kcheckers.control b/noncore/games/kcheckers/opie-kcheckers.control index e228209..71f83af 100644 --- a/noncore/games/kcheckers/opie-kcheckers.control +++ b/noncore/games/kcheckers/opie-kcheckers.control @@ -1,10 +1,10 @@ Package: opie-kcheckers -Files: bin/kcheckers apps/Games/kcheckers.desktop pics/kcheckers +Files: plugins/application/libkcheckers.so* bin/kcheckers apps/Games/kcheckers.desktop pics/kcheckers Priority: optional Section: opie/games Maintainer: leseb <prudhomme@laposte.net> Architecture: arm Version: 0.3-$SUB_VERSION Depends: task-opie-minimal Description: The game of Checkers A game for the Opie environment. |