22 #include <QApplication>
23 #include <QDesktopWidget>
24 #include <QSignalMapper>
26 #include <QKeySequence>
30 #include <kshortcutsdialog.h>
31 #include <KStandardDirs>
34 #include <kconfiggroup.h>
43 #include <kactioncollection.h>
44 #include <ktoggleaction.h>
45 #include <ktogglefullscreenaction.h>
46 #include <kstandardaction.h>
47 #include <kstandardgameaction.h>
50 #include <KCmdLineArgs>
53 #include <libkdegames_capabilities.h>
61 #define ACTION(x) (actionCollection()->action(x))
77 if (! getDirectories()) {
78 fprintf (stderr,
"getDirectories() FAILED\n");
85 "The games data and handbook should be in the following locations:\n");
86 fprintf (stderr,
"System games: %s\nUser data: %s\nHandbook: %s\n",
87 qPrintable(systemDataDir), qPrintable(userDataDir), qPrintable(systemHTMLDir));
99 dw = qMin ((4 * dh + 1) / 3, dw);
100 dh = (3 * dw + 2) / 4;
105 game =
new KGrGame (view, systemDataDir, userDataDir);
118 KGlobal::locale()->insertCatalog (
QLatin1String(
"libkdegames" ));
121 setCentralWidget (view);
134 setupGUI (static_cast<StandardWindowOption> (Default &
135 (~StatusBar) & (~ToolBar) & (~Keys)));
140 adjustHintAction (
false);
144 connect (game, SIGNAL (quitGame()), SLOT (close()));
145 connect (game, SIGNAL (setEditMenu(
bool)), SLOT (setEditMenu(
bool)));
146 connect (game, SIGNAL (showLives(
long)), scene, SLOT (showLives(
long)));
147 connect (game, SIGNAL (showScore(
long)), scene, SLOT (showScore(
long)));
148 connect (game, SIGNAL (hintAvailable(
bool)), SLOT (adjustHintAction(
bool)));
149 connect (game, SIGNAL (gameFreeze(
bool)), SLOT (gameFreeze(
bool)));
151 connect (game, SIGNAL (
setAvail(
const char*,
bool)),
153 connect (game, SIGNAL (
setToggle(
const char*,
bool)),
161 setAutoSaveSettings();
166 toolBar (
"editToolbar")->hide();
171 kDebug() <<
"QMetaObject::invokeMethod (this, \"KGoldrunner_2\") done ... ";
172 kDebug() <<
"1st scan of event-queue ...";
175 void KGoldrunner::KGoldrunner_2()
177 kDebug() <<
"Entered constructor extension ...";
183 kDebug() <<
"QMetaObject::invokeMethod (game, \"initGame\") done ... ";
184 kDebug() <<
"2nd scan of event-queue ...";
191 void KGoldrunner::setupActions()
198 connect (gameMapper, SIGNAL (mapped(
int)), game, SLOT (gameActions(
int)));
199 tempMapper = gameMapper;
205 KAction * a = KStandardGameAction::gameNew (gameMapper, SLOT(map()),
this);
206 actionCollection()->addAction (a->objectName(), a);
208 a->setText (i18n (
"&New Game..."));
211 i18n (
"Pla&y Next Level"),
212 i18n (
"Play next level."),
213 i18n (
"Try the next level in the game "
217 a = KStandardGameAction::load (gameMapper, SLOT(map()),
this);
218 actionCollection()->addAction (a->objectName(), a);
220 a->setText (i18n (
"&Load Saved Game..."));
226 saveGame = KStandardGameAction::save (gameMapper, SLOT(map()),
this);
227 actionCollection()->addAction (saveGame->objectName(), saveGame);
229 saveGame->setText (i18n (
"&Save Game..."));
230 saveGame->setShortcut (Qt::Key_S);
238 myPause = KStandardGameAction::pause (gameMapper, SLOT(map()),
this);
239 actionCollection()->addAction (myPause->objectName(), myPause);
243 KShortcut pauseShortcut = myPause->shortcut();
244 pauseShortcut.setAlternate (Qt::Key_Escape);
245 myPause->setShortcut (pauseShortcut);
247 highScore = KStandardGameAction::highscores (gameMapper, SLOT(map()),
this);
248 actionCollection()->addAction (highScore->objectName(), highScore);
251 hintAction = KStandardGameAction::hint (gameMapper, SLOT (map()),
this);
252 actionCollection()->addAction (hintAction->objectName(), hintAction);
255 a = KStandardGameAction::demo (gameMapper, SLOT (map()),
this);
256 actionCollection()->addAction (a->objectName(), a);
259 a = KStandardGameAction::solve (gameMapper, SLOT (map()),
this);
260 actionCollection()->addAction (a->objectName(), a);
262 a->setText (i18n (
"&Show A Solution"));
263 a->setToolTip (i18n (
"Show how to win this level."));
264 a->setWhatsThis (i18n (
"Play a recording of how to win this level, if "
265 "there is one available."));
268 i18n (
"&Instant Replay"),
269 i18n (
"Instant replay."),
270 i18n (
"Show a recording of the level "
271 "you are currently playing."),
275 i18n (
"Replay &Last Level"),
276 i18n (
"Replay last level."),
277 i18n (
"Show a recording of the last level you "
278 "played and finished, regardless of whether "
283 i18n (
"&Replay Any Level"),
284 i18n (
"Replay any level."),
285 i18n (
"Show a recording of any level you have "
289 killHero = gameAction (
"kill_hero",
KILL_HERO,
292 i18n (
"Kill the hero, in case he finds himself in "
293 "a situation from which he cannot escape."),
299 KStandardGameAction::quit (
this, SLOT (close()), actionCollection());
306 connect (editMapper, SIGNAL (mapped(
int)), game, SLOT (editActions(
int)));
307 tempMapper = editMapper;
313 KAction * ed = editAction (
"create_level",
CREATE_LEVEL,
314 i18n (
"&Create Level"),
315 i18n (
"Create level."),
316 i18n (
"Create a completely new level."));
318 ed->setIconText (i18n (
"Create"));
320 ed = editAction (
"edit_any",
EDIT_ANY,
321 i18n (
"&Edit Level..."),
322 i18n (
"Edit level..."),
323 i18n (
"Edit any level..."));
325 ed->setIconText (i18n (
"Edit"));
332 saveEdits = editAction (
"save_edits",
SAVE_EDITS,
333 i18n (
"&Save Edits..."),
334 i18n (
"Save edits..."),
335 i18n (
"Save your level after editing..."));
336 saveEdits->setIcon (KIcon (
QLatin1String(
"document-save" )));
337 saveEdits->setIconText (i18n (
"Save"));
338 saveEdits->setEnabled (
false);
341 i18n (
"&Move Level..."),
342 i18n (
"Move level..."),
343 i18n (
"Change a level's number or move "
344 "it to another game..."));
347 i18n (
"&Delete Level..."),
348 i18n (
"Delete level..."),
349 i18n (
"Delete a level..."));
356 i18n (
"Create &Game..."),
357 i18n (
"Create game..."),
358 i18n (
"Create a completely new game..."));
361 i18n (
"Edit Game &Info..."),
362 i18n (
"Edit game info..."),
363 i18n (
"Change the name, rules or description "
371 QAction * themes = actionCollection()->addAction (
"select_theme");
372 themes->
setText (i18n (
"Change &Theme..."));
373 themes->
setToolTip (i18n (
"Change the graphics theme..."));
374 themes->
setWhatsThis (i18n (
"Alter the visual appearance of the runners "
375 "and background scene..."));
376 connect (themes, SIGNAL (triggered(
bool)),
this, SLOT (changeTheme()));
379 KToggleFullScreenAction * fullScreen = KStandardAction::fullScreen
380 (
this, SLOT (viewFullScreen(
bool)),
this,
this);
381 actionCollection()->addAction (fullScreen->objectName(), fullScreen);
385 connect (settingMapper, SIGNAL (mapped(
int)), game, SLOT (settings(
int)));
386 tempMapper = settingMapper;
388 #ifdef KGAUDIO_BACKEND_OPENAL
391 i18n (
"&Play Sounds"),
392 i18n (
"Play sound effects."),
393 i18n (
"Play sound effects during the game."));
396 i18n (
"Play &Footstep Sounds"),
397 i18n (
"Make sounds of player's footsteps."),
398 i18n (
"Make sounds of player's footsteps."));
403 i18n (
"&Demo At Start"),
404 i18n (
"Run a demo when the game starts."),
405 i18n (
"Run a demo when the game starts."));
412 KToggleAction * setMouse = settingAction (
"mouse_mode",
MOUSE,
413 i18n (
"&Mouse Controls Hero"),
414 i18n (
"Mouse controls hero."),
415 i18n (
"Use the mouse to control "
416 "the hero's moves."));
418 KToggleAction * setKeyboard = settingAction (
"keyboard_mode",
KEYBOARD,
419 i18n (
"&Keyboard Controls Hero"),
420 i18n (
"Keyboard controls hero."),
421 i18n (
"Use the keyboard to control "
422 "the hero's moves."));
424 KToggleAction * setLaptop = settingAction (
"laptop_mode",
LAPTOP,
425 i18n (
"Hybrid Control (&Laptop)"),
426 i18n (
"Pointer controls hero; dig "
428 i18n (
"Use the laptop's pointer device "
429 "to control the hero's moves, and use "
430 "the keyboard to dig left and right."));
442 KToggleAction * clickKey = settingAction (
"click_key",
CLICK_KEY,
443 i18n (
"&Click Key To Move"),
444 i18n (
"Click Key To Move."),
445 i18n (
"In keyboard mode, click a "
446 "direction-key to start moving "
447 "and keep on going until you "
448 "click another key."));
450 KToggleAction * holdKey = settingAction (
"hold_key",
HOLD_KEY,
451 i18n (
"&Hold Key To Move"),
452 i18n (
"Hold Key To Move."),
453 i18n (
"In keyboard mode, hold down a "
454 "direction-key to move "
455 "and release it to stop."));
469 KToggleAction * nSpeed = settingAction (
"normal_speed",
NORMAL_SPEED,
470 i18n (
"Normal Speed"),
471 i18n (
"Set normal speed."),
472 i18n (
"Set normal game speed."));
474 KToggleAction * bSpeed = settingAction (
"beginner_speed",
476 i18n (
"Beginner Speed"),
477 i18n (
"Set beginners' speed."),
478 i18n (
"Set beginners' game speed "
479 "(0.5 times normal)."));
481 KToggleAction * cSpeed = settingAction (
"champion_speed",
483 i18n (
"Champion Speed"),
484 i18n (
"Set champions' speed."),
485 i18n (
"Set champions' game speed "
486 "(1.5 times normal)."));
488 a = gameAction (
"increase_speed",
INC_SPEED,
489 i18n (
"Increase Speed"),
490 i18n (
"Increase speed."),
491 i18n (
"Increase the game speed by 0.1 "
492 "(maximum is 2.0 times normal)."),
495 a = gameAction (
"decrease_speed",
DEC_SPEED,
496 i18n (
"Decrease Speed"),
497 i18n (
"Decrease speed."),
498 i18n (
"Decrease the game speed by 0.1 "
499 "(minimum is 0.2 times normal)."),
511 KStandardAction::keyBindings (
512 this, SLOT (optionsConfigureKeys()),
522 connect (kbMapper, SIGNAL (mapped(
int)), game, SLOT(kbControl(
int)));
523 tempMapper = kbMapper;
532 keyControl (
"stop", i18n (
"Stop"), Qt::Key_Space,
STAND);
533 keyControl (
"move_right", i18n (
"Move Right"), Qt::Key_Right,
RIGHT,
true);
534 keyControl (
"move_left", i18n (
"Move Left"), Qt::Key_Left,
LEFT,
true);
535 keyControl (
"move_up", i18n (
"Move Up"), Qt::Key_Up,
UP,
true);
536 keyControl (
"move_down", i18n (
"Move Down"), Qt::Key_Down,
DOWN,
true);
537 keyControl (
"dig_right", i18n (
"Dig Right"), Qt::Key_C,
DIG_RIGHT);
538 keyControl (
"dig_left", i18n (
"Dig Left"), Qt::Key_Z,
DIG_LEFT);
550 setupEditToolbarActions();
556 KConfigGroup debugGroup (KGlobal::config(),
"Debugging");
557 bool addDebuggingShortcuts = debugGroup.readEntry
558 (
"DebuggingShortcuts",
false);
559 if (! addDebuggingShortcuts)
563 connect (dbgMapper, SIGNAL (mapped(
int)), game, SLOT(dbgControl(
int)));
564 tempMapper = dbgMapper;
566 keyControl (
"do_step", i18n (
"Do a Step"), Qt::Key_Period,
DO_STEP);
567 keyControl (
"bug_fix", i18n (
"Test Bug Fix"), Qt::Key_B,
BUG_FIX);
568 keyControl (
"show_positions", i18n (
"Show Positions"), Qt::Key_W,
S_POSNS);
569 keyControl (
"logging", i18n (
"Start Logging"), Qt::Key_G,
LOGGING);
570 keyControl (
"show_hero", i18n (
"Show Hero"), Qt::Key_E,
S_HERO);
571 keyControl (
"show_obj", i18n (
"Show Object"), Qt::Key_Slash,
S_OBJ);
573 keyControl (
"show_enemy_0", i18n (
"Show Enemy") +
'0', Qt::Key_0,
ENEMY_0);
574 keyControl (
"show_enemy_1", i18n (
"Show Enemy") +
'1', Qt::Key_1,
ENEMY_1);
575 keyControl (
"show_enemy_2", i18n (
"Show Enemy") +
'2', Qt::Key_2,
ENEMY_2);
576 keyControl (
"show_enemy_3", i18n (
"Show Enemy") +
'3', Qt::Key_3,
ENEMY_3);
577 keyControl (
"show_enemy_4", i18n (
"Show Enemy") +
'4', Qt::Key_4,
ENEMY_4);
578 keyControl (
"show_enemy_5", i18n (
"Show Enemy") +
'5', Qt::Key_5,
ENEMY_5);
579 keyControl (
"show_enemy_6", i18n (
"Show Enemy") +
'6', Qt::Key_6,
ENEMY_6);
582 KAction * KGoldrunner::gameAction (
const QString & name,
589 KAction * ga = actionCollection()->addAction (name);
591 ga->setToolTip (toolTip);
592 ga->setWhatsThis (whatsThis);
594 ga->setShortcut (key);
596 connect (ga, SIGNAL (triggered(
bool)), tempMapper, SLOT (
map()));
601 KAction * KGoldrunner::editAction (
const QString & name,
607 KAction * ed = actionCollection()->addAction (name);
609 ed->setToolTip (toolTip);
610 ed->setWhatsThis (whatsThis);
611 connect (ed, SIGNAL (triggered(
bool)), tempMapper, SLOT (
map()));
616 KToggleAction * KGoldrunner::settingAction (
const QString & name,
622 KToggleAction * s =
new KToggleAction (text,
this);
623 actionCollection()->addAction (name, s);
624 s->setToolTip (toolTip);
625 s->setWhatsThis (whatsThis);
626 connect (s, SIGNAL (triggered(
bool)), tempMapper, SLOT (
map()));
631 KToggleAction * KGoldrunner::editToolbarAction (
const QString & name,
639 KToggleAction * ed =
new KToggleAction (text,
this);
640 actionCollection()->addAction (name, ed);
641 ed->setIconText (shortText);
642 ed->setToolTip (toolTip);
643 ed->setWhatsThis (whatsThis);
644 connect (ed, SIGNAL (triggered(
bool)), tempMapper, SLOT (
map()));
649 void KGoldrunner::keyControl (
const QString & name,
const QString & text,
653 KAction * a = actionCollection()->addAction (name);
655 a->setShortcut (shortcut);
659 a->setEnabled (
false);
662 a->setAutoRepeat (
false);
665 connect (a, SIGNAL (triggered(
bool)), tempMapper, SLOT (
map()));
675 if (! identifyMoveAction (event,
true)) {
682 if (! identifyMoveAction (event,
false)) {
687 bool KGoldrunner::identifyMoveAction (
QKeyEvent * event,
bool pressed)
694 if ((
ACTION (
"move_left"))->shortcuts().contains(keystroke)) {
697 else if ((
ACTION (
"move_right"))->shortcuts().contains(keystroke)) {
700 else if ((
ACTION (
"move_up"))->shortcuts().contains(keystroke)) {
703 else if ((
ACTION (
"move_down"))->shortcuts().contains(keystroke)) {
713 void KGoldrunner::viewFullScreen (
bool activation)
715 KToggleFullScreenAction::setFullScreen (
this, activation);
718 void KGoldrunner::gameFreeze (
bool on_off)
720 myPause->setChecked (on_off);
723 foreach (
const QKeySequence &s, myPause->shortcut().toList()) {
728 if (pauseKeys.
size() == 0) {
729 msg = i18n(
"The game is paused");
730 }
else if (pauseKeys.
size() == 1) {
731 msg = i18n(
"Press \"%1\" to RESUME", pauseKeys.
at(0));
733 msg = i18n(
"Press \"%1\" or \"%2\" to RESUME", pauseKeys.
at(0),
737 if (pauseKeys.
size() == 0) {
739 }
else if (pauseKeys.
size() == 1) {
740 msg = i18n(
"Press \"%1\" to PAUSE", pauseKeys.
at(0));
742 msg = i18n(
"Press \"%1\" or \"%2\" to PAUSE", pauseKeys.
at(0),
749 void KGoldrunner::adjustHintAction (
bool hintAvailable)
751 hintAction->setEnabled (hintAvailable);
754 msg = hintAvailable ? i18n(
"Has hint") : i18n(
"No hint");
760 ((KToggleAction *)
ACTION (actionName))->setChecked (onOff);
765 ((KAction *)
ACTION (actionName))->setEnabled (onOff);
768 void KGoldrunner::setEditMenu (
bool on_off)
770 saveEdits->setEnabled (on_off);
772 saveGame->setEnabled (! on_off);
773 hintAction->setEnabled (! on_off);
774 killHero->setEnabled (! on_off);
775 highScore->setEnabled (! on_off);
776 setAvail (
"instant_replay", (! on_off));
777 setAvail (
"game_pause", (! on_off));
781 kDebug() <<
"ToolBar icon size:" << scene->
tileSize ();
782 toolBar (
"editToolbar")->setIconSize (scene->
tileSize ());
785 setEditIcon (
"brickbg",
BRICK);
786 setEditIcon (
"fbrickbg",
FBRICK);
787 setEditIcon (
"freebg",
FREE);
788 setEditIcon (
"nuggetbg",
NUGGET);
789 setEditIcon (
"polebg",
BAR);
790 setEditIcon (
"concretebg",
CONCRETE);
791 setEditIcon (
"ladderbg",
LADDER);
792 setEditIcon (
"hladderbg",
HLADDER);
793 setEditIcon (
"edherobg",
HERO);
794 setEditIcon (
"edenemybg",
ENEMY);
797 toolBar (
"editToolbar")->show();
800 toolBar (
"editToolbar")->hide();
804 void KGoldrunner::setEditIcon (
const QString & actionName,
const char iconType)
806 ((KToggleAction *) (actionCollection()->action (actionName)))->
807 setIcon (KIcon (renderer->
getPixmap (iconType)));
814 void KGoldrunner::changeTheme ()
833 kDebug() <<
"I am in KGoldrunner::saveProperties.";
843 kDebug() <<
"I am in KGoldrunner::readProperties.";
846 void KGoldrunner::optionsConfigureKeys()
849 KShortcutsDialog::configure (actionCollection(),
850 KShortcutsEditor::LetterShortcutsAllowed,
857 bool KGoldrunner::getDirectories()
875 KStandardDirs * dirs =
new KStandardDirs();
880 systemHTMLDir = dirs->findResourceDir (
"html",
"en/" + myDir +
'/');
881 if (systemHTMLDir.
length() <= 0) {
883 i18n (
"Cannot find documentation sub-folder 'en/%1/' "
884 "in area '%2' of the KDE folder ($KDEDIRS).",
885 myDir, dirs->resourceDirs (
"html").join (
QLatin1String(
":" ))));
889 systemHTMLDir.
append (
"en/" + myDir +
'/');
892 systemDataDir = dirs->findResourceDir (
"data", myDir +
"/system/");
893 if (systemDataDir.
length() <= 0) {
895 i18n (
"Cannot find system games sub-folder '%1/system/' "
896 "in area '%2' of the KDE folder ($KDEDIRS).",
897 myDir, dirs->resourceDirs (
"data").join (
QLatin1String(
":" ))));
901 systemDataDir.
append (myDir +
"/system/");
905 userDataDir = dirs->saveLocation (
"data", myDir +
"/user/", create);
906 if (userDataDir.
length() <= 0) {
908 i18n (
"Cannot find or create user games sub-folder '%1/user/' "
909 "in area '%2' of the KDE user area ($KDEHOME).",
910 myDir, dirs->resourceDirs (
"data").join (
QLatin1String(
":" ))));
914 create = dirs->makeDir (userDataDir +
"levels/");
917 i18n (
"Cannot find or create 'levels/' folder in "
918 "sub-folder '%1/user/' in the KDE user area ($KDEHOME).", myDir));
942 void KGoldrunner::setupEditToolbarActions()
945 connect (editToolbarMapper, SIGNAL (mapped(
int)),
946 game, SLOT (editToolbarActions(
int)));
947 tempMapper = editToolbarMapper;
949 KAction * ed = editAction (
"edit_hint",
EDIT_HINT,
950 i18n (
"Edit Name/Hint"),
951 i18n (
"Edit level name or hint"),
952 i18n (
"Edit text for the name or hint "
955 ed->setIconText (i18n (
"Name/Hint"));
957 KToggleAction * free = editToolbarAction (
"freebg",
FREE,
958 i18n (
"Erase"), i18n (
"Space/Erase"),
959 i18n (
"Paint empty squares or erase"),
960 i18n (
"Erase objects or paint empty squares"));
962 KToggleAction * edhero = editToolbarAction (
"edherobg",
HERO,
963 i18n(
"Hero"), i18n (
"Hero"),
965 i18n (
"Change the hero's starting position"));
967 KToggleAction * edenemy = editToolbarAction (
"edenemybg",
ENEMY,
968 i18n (
"Enemy"), i18n (
"Enemy"),
969 i18n (
"Paint enemies"),
970 i18n (
"Paint enemies at their starting positions")
973 KToggleAction * brick = editToolbarAction (
"brickbg",
BRICK,
974 i18n (
"Brick"), i18n (
"Brick"),
975 i18n (
"Paint bricks (can dig)"),
976 i18n (
"Paint bricks (diggable objects)"));
978 KToggleAction* concrete = editToolbarAction (
"concretebg",
CONCRETE,
979 i18n (
"Concrete"), i18n (
"Concrete"),
980 i18n (
"Paint concrete (cannot dig)"),
981 i18n (
"Paint concrete objects (not diggable)"));
983 KToggleAction * fbrick = editToolbarAction (
"fbrickbg",
FBRICK,
984 i18n (
"Trap"), i18n (
"Trap/False Brick"),
985 i18n (
"Paint traps or false bricks "
986 "(can fall through)"),
987 i18n (
"Paint traps or false bricks "
988 "(can fall through)"));
990 KToggleAction * ladder = editToolbarAction (
"ladderbg",
LADDER,
991 i18n (
"Ladder"), i18n (
"Ladder"),
992 i18n (
"Paint ladders"),
993 i18n (
"Paint ladders (ways to go up or down)"));
995 KToggleAction * hladder = editToolbarAction (
"hladderbg",
HLADDER,
996 i18n (
"H Ladder"), i18n (
"Hidden Ladder"),
997 i18n (
"Paint hidden ladders"),
998 i18n (
"Paint hidden ladders, which appear "
999 "when all the gold is gone"));
1001 KToggleAction * bar = editToolbarAction (
"polebg",
BAR,
1002 i18n (
"Bar"), i18n (
"Bar/Pole"),
1003 i18n (
"Paint bars or poles"),
1004 i18n (
"Paint bars or poles (can fall from these)")
1007 KToggleAction * nugget = editToolbarAction (
"nuggetbg",
NUGGET,
1008 i18n (
"Gold"), i18n (
"Gold/Treasure"),
1009 i18n (
"Paint gold (or other treasure)"),
1010 i18n (
"Paint gold pieces (or other treasure)"));
1028 QSize KGoldrunner::sizeHint()
const
1030 return QSize (640, 600);
1033 #include "kgoldrunner.moc"
virtual ~KGoldrunner()
Default Destructor.
void setText(const QString &text)
QString & append(QChar ch)
QPixmap getPixmap(const char picType)
void setToggle(const char *actionName, const bool onOff)
const T & at(int i) const
KGrScene * gameScene() const
QSize tileSize() const
Get the current size of the squared region occupied by a single visual element (characters, ladders, bricks etc.).
QAction * addAction(QAction *action)
bool isAutoRepeat() const
void setMapping(QObject *sender, int id)
void keyReleaseEvent(QKeyEvent *event)
void append(const T &value)
void setAvail(const char *actionName, const bool onOff)
KGoldrunner()
Default Constructor.
void setPauseResumeText(const QString &msg)
void setHasHintText(const QString &msg)
static void information(QWidget *parent, const QString &caption, const QString &text, const QString &dontShowAgain=QString())
bool queryClose()
To save edits before closing.
void kbControl(const int dirn, const bool pressed=true)
QFuture< void > map(Sequence &sequence, MapFunction function)
void showScore(long score)
KGrRenderer * renderer() const
Get a pointer to the scene's renderer.
void setWhatsThis(const QString &what)
QString toString(SequenceFormat format) const
QDesktopWidget * desktop()
void readProperties(const KConfigGroup &)
This function is called when this app is restored.
void showLives(long lives)
void saveProperties(KConfigGroup &)
This function is called when it is time for the app to save its properties for session management pur...
void keyPressEvent(QKeyEvent *event)