libkdegames
KStandardGameAction Namespace Reference
Detailed Description
Extension for KStandardAction in KDE Games.This class is an extension to the usual KStandardAction class which provides easy access to often used KDE actions.
Using these actions helps maintaining consistency among the games.
Games often use different menu entries than other programs, e.g. games use the menu "game" instead of "file". This class provides the entries which differ from the usual KStandardAction entries.
- See also:
KStandardAction
Enumerations | |
| enum | StandardGameAction { New = 1, Load, LoadRecent, Save, SaveAs, End, Pause, Highscores, Statistics, Print, Quit, Repeat, Undo, Redo, Roll, EndTurn, Carddecks, ChooseGameType, ConfigureHighscores, ClearHighscores, ClearStatistics, Restart, Hint, Demo, Solve, ActionNone } |
Functions | |
| KAction * | create (StandardGameAction id, const QObject *recvr, const char *slot, QObject *parent) |
| const char * | name (StandardGameAction id) |
| KAction * | gameNew (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | load (const QObject *recvr, const char *slot, QObject *parent) |
| KRecentFilesAction * | loadRecent (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | save (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | saveAs (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | end (const QObject *recvr, const char *slot, QObject *parent) |
| KToggleAction * | pause (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | highscores (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | statistics (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | clearStatistics (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | print (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | quit (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | repeat (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | undo (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | redo (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | roll (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | endTurn (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | carddecks (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | configureHighscores (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | hint (const QObject *recvr, const char *slot, QObject *parent) |
| KToggleAction * | demo (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | solve (const QObject *recvr, const char *slot, QObject *parent) |
| KSelectAction * | chooseGameType (const QObject *recvr, const char *slot, QObject *parent) |
| KAction * | restart (const QObject *recvr, const char *slot, QObject *parent) |
| KDEGAMES_EXPORT KAction * | clearHighscores (const QObject *recvr, const char *slot, QObject *parent) |
Enumeration Type Documentation
The standard menubar and toolbar actions.
- Enumerator:
Definition at line 54 of file kstandardgameaction.h.
Function Documentation
| KDEGAMES_EXPORT KSelectAction * KStandardGameAction::chooseGameType | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Choose game type.
The signature of slot is of the form slotGameTypeChosen(int)
Definition at line 219 of file kstandardgameaction.cpp.
| KDEGAMES_EXPORT KAction* KStandardGameAction::clearHighscores | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Clear highscores.
| KDEGAMES_EXPORT KAction * KStandardGameAction::create | ( | StandardGameAction | id, | |
| const QObject * | recvr, | |||
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Creates an action corresponding to the KStandardAction::StandardAction enum.
Definition at line 89 of file kstandardgameaction.cpp.
| KDEGAMES_EXPORT KAction * KStandardGameAction::end | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
End the current game, but do not quit the program.
Think of a "close" entry.
Definition at line 164 of file kstandardgameaction.cpp.
| KDEGAMES_EXPORT KAction * KStandardGameAction::endTurn | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
End the current turn (not the game).
Usually to let the next player start.
Definition at line 200 of file kstandardgameaction.cpp.
| KDEGAMES_EXPORT KRecentFilesAction * KStandardGameAction::loadRecent | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Load a recently loaded game.
The signature of slot is of the form slotURLSelected(const KUrl&)
Definition at line 155 of file kstandardgameaction.cpp.
| KDEGAMES_EXPORT const char * KStandardGameAction::name | ( | StandardGameAction | id | ) |
This will return the internal name of a given standard action.
Definition at line 143 of file kstandardgameaction.cpp.
| KDEGAMES_EXPORT KAction * KStandardGameAction::print | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Print current game.
Not useful in all games.
Definition at line 179 of file kstandardgameaction.cpp.
| KDEGAMES_EXPORT KAction * KStandardGameAction::saveAs | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Save the current game under a different filename.
Definition at line 161 of file kstandardgameaction.cpp.
KDE 4.0 API Reference