summaryrefslogtreecommitdiff
path: root/noncore/games/kcheckers/kcheckers.cpp
Unidiff
Diffstat (limited to 'noncore/games/kcheckers/kcheckers.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/kcheckers/kcheckers.cpp5
1 files changed, 3 insertions, 2 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
@@ -13,67 +13,68 @@
13#include "kcheckers.h" 13#include "kcheckers.h"
14#include "echeckers.h" 14#include "echeckers.h"
15#include "rcheckers.h" 15#include "rcheckers.h"
16 16
17#include "pics/logo.xpm" 17#include "pics/logo.xpm"
18#include "pics/undo.xpm" 18#include "pics/undo.xpm"
19#include "pics/exit.xpm" 19#include "pics/exit.xpm"
20#include "pics/help.xpm" 20#include "pics/help.xpm"
21#include "pics/wood1.xpm" 21#include "pics/wood1.xpm"
22#include "pics/wood2.xpm" 22#include "pics/wood2.xpm"
23#include "pics/wood3.xpm" 23#include "pics/wood3.xpm"
24#include "pics/green1.xpm" 24#include "pics/green1.xpm"
25#include "pics/green2.xpm" 25#include "pics/green2.xpm"
26#include "pics/green3.xpm" 26#include "pics/green3.xpm"
27#include "pics/marble1.xpm" 27#include "pics/marble1.xpm"
28#include "pics/marble2.xpm" 28#include "pics/marble2.xpm"
29#include "pics/marble3.xpm" 29#include "pics/marble3.xpm"
30#include "pics/biglogo.xpm" 30#include "pics/biglogo.xpm"
31#include "pics/man_black.xpm" 31#include "pics/man_black.xpm"
32#include "pics/man_white.xpm" 32#include "pics/man_white.xpm"
33#include "pics/king_black.xpm" 33#include "pics/king_black.xpm"
34#include "pics/king_white.xpm" 34#include "pics/king_white.xpm"
35#include "pics/contexthelp.xpm" 35#include "pics/contexthelp.xpm"
36 36
37 37
38QString KCheckers::enNumeration="1 2 3 4 5 6 7 8 9 1011121314151617181920212223242526272829303132"; 38QString KCheckers::enNumeration="1 2 3 4 5 6 7 8 9 1011121314151617181920212223242526272829303132";
39QString KCheckers::ruNumeration="B8D8F8H8A7C7E7G7B6D6F6H6A5C5E5G5B4D4F4H4A3C3E3G3B2D2F2H2A1C1E1G1"; 39QString KCheckers::ruNumeration="B8D8F8H8A7C7E7G7B6D6F6H6A5C5E5G5B4D4F4H4A3C3E3G3B2D2F2H2A1C1E1G1";
40 40
41const int KCheckers::t[]={6,7,8,9,11,12,13,14,17,18,19,20,22,23, 41const int KCheckers::t[]={6,7,8,9,11,12,13,14,17,18,19,20,22,23,
42 24,25,28,29,30,31,33,34,35,36,39,40,41,42,44,45,46,47}; 42 24,25,28,29,30,31,33,34,35,36,39,40,41,42,44,45,46,47};
43 43
44 44
45KCheckers::KCheckers():QMainWindow(0,0,WStyle_DialogBorder) 45KCheckers::KCheckers(QWidget *p, const char* n, WFlags )
46 :QMainWindow(p,n,WStyle_DialogBorder)
46{ 47{
47 setCaption("KCheckers"); 48 setCaption(tr("KCheckers") );
48 setIcon(QPixmap(biglogo_xpm)); 49 setIcon(QPixmap(biglogo_xpm));
49 50
50 setToolBarsMovable(false); 51 setToolBarsMovable(false);
51 52
52 // Make a menubar 53 // Make a menubar
53 54
54 gameMenu=new QPopupMenu; 55 gameMenu=new QPopupMenu;
55 CHECK_PTR(gameMenu); 56 CHECK_PTR(gameMenu);
56 57
57 gameMenu->insertItem(QPixmap(logo_xpm),tr("&New"),this,SLOT(newGame()),CTRL+Key_N); 58 gameMenu->insertItem(QPixmap(logo_xpm),tr("&New"),this,SLOT(newGame()),CTRL+Key_N);
58 gameMenu->insertSeparator(); 59 gameMenu->insertSeparator();
59 undoID=gameMenu->insertItem(QPixmap(undo_xpm),tr("&Undo Move"),this,SLOT(undoMove()),CTRL+Key_Z); 60 undoID=gameMenu->insertItem(QPixmap(undo_xpm),tr("&Undo Move"),this,SLOT(undoMove()),CTRL+Key_Z);
60 gameMenu->insertSeparator(); 61 gameMenu->insertSeparator();
61 gameMenu->insertItem(QPixmap(exit_xpm),tr("&Quit"),qApp,SLOT(closeAllWindows()),CTRL+Key_Q); 62 gameMenu->insertItem(QPixmap(exit_xpm),tr("&Quit"),qApp,SLOT(closeAllWindows()),CTRL+Key_Q);
62 63
63 skillMenu=new QPopupMenu; 64 skillMenu=new QPopupMenu;
64 CHECK_PTR(skillMenu); 65 CHECK_PTR(skillMenu);
65 66
66 skillMenu->insertItem(tr("&Beginner"),this,SLOT(setSkillBeginner()),CTRL+Key_1,BEGINNER); 67 skillMenu->insertItem(tr("&Beginner"),this,SLOT(setSkillBeginner()),CTRL+Key_1,BEGINNER);
67 skillMenu->insertItem(tr("&Novice"), this,SLOT(setSkillNovice()), CTRL+Key_2,NOVICE); 68 skillMenu->insertItem(tr("&Novice"), this,SLOT(setSkillNovice()), CTRL+Key_2,NOVICE);
68 skillMenu->insertItem(tr("&Average"), this,SLOT(setSkillAverage()), CTRL+Key_3,AVERAGE); 69 skillMenu->insertItem(tr("&Average"), this,SLOT(setSkillAverage()), CTRL+Key_3,AVERAGE);
69 skillMenu->insertItem(tr("&Good"), this,SLOT(setSkillGood()), CTRL+Key_4,GOOD); 70 skillMenu->insertItem(tr("&Good"), this,SLOT(setSkillGood()), CTRL+Key_4,GOOD);
70 skillMenu->insertItem(tr("&Expert"), this,SLOT(setSkillExpert()), CTRL+Key_5,EXPERT); 71 skillMenu->insertItem(tr("&Expert"), this,SLOT(setSkillExpert()), CTRL+Key_5,EXPERT);
71 skillMenu->insertItem(tr("&Master"), this,SLOT(setSkillMaster()), CTRL+Key_6,MASTER); 72 skillMenu->insertItem(tr("&Master"), this,SLOT(setSkillMaster()), CTRL+Key_6,MASTER);
72 73
73 optionsMenu=new QPopupMenu; 74 optionsMenu=new QPopupMenu;
74 CHECK_PTR(optionsMenu); 75 CHECK_PTR(optionsMenu);
75 76
76 numID=optionsMenu->insertItem(tr("&Show Numeration"),this,SLOT(showNumeration())); 77 numID=optionsMenu->insertItem(tr("&Show Numeration"),this,SLOT(showNumeration()));
77 optionsMenu->insertSeparator(); 78 optionsMenu->insertSeparator();
78 optionsMenu->insertItem(tr("&English Rules"),this,SLOT(setRulesEnglish()),0,ENGLISH); 79 optionsMenu->insertItem(tr("&English Rules"),this,SLOT(setRulesEnglish()),0,ENGLISH);
79 optionsMenu->insertItem(tr("&Russian Rules"),this,SLOT(setRulesRussian()),0,RUSSIAN); 80 optionsMenu->insertItem(tr("&Russian Rules"),this,SLOT(setRulesRussian()),0,RUSSIAN);