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 } |
| The standard menubar and toolbar actions. More... | |
Functions | |
| KAction * | create (StandardGameAction id, const QObject *recvr, const char *slot, QObject *parent) |
| Creates an action corresponding to the KStandardAction::StandardAction enum. | |
| const char * | name (StandardGameAction id) |
| This will return the internal name of a given standard action. | |
| KAction * | gameNew (const QObject *recvr, const char *slot, QObject *parent) |
| Start a new game. | |
| KAction * | load (const QObject *recvr, const char *slot, QObject *parent) |
| Load a previousely saved game. | |
| KRecentFilesAction * | loadRecent (const QObject *recvr, const char *slot, QObject *parent) |
| Load a recently loaded game. | |
| KAction * | save (const QObject *recvr, const char *slot, QObject *parent) |
| Save the current game. | |
| KAction * | saveAs (const QObject *recvr, const char *slot, QObject *parent) |
| Save the current game under a different filename. | |
| KAction * | end (const QObject *recvr, const char *slot, QObject *parent) |
| End the current game, but do not quit the program. | |
| KToggleAction * | pause (const QObject *recvr, const char *slot, QObject *parent) |
| Pause the game. | |
| KAction * | highscores (const QObject *recvr, const char *slot, QObject *parent) |
| Show the highscores. | |
| KAction * | statistics (const QObject *recvr, const char *slot, QObject *parent) |
| Show the statistics. | |
| KAction * | clearStatistics (const QObject *recvr, const char *slot, QObject *parent) |
| Clear statistics. | |
| KAction * | print (const QObject *recvr, const char *slot, QObject *parent) |
| Print current game. | |
| KAction * | quit (const QObject *recvr, const char *slot, QObject *parent) |
| Quit the game. | |
| KAction * | repeat (const QObject *recvr, const char *slot, QObject *parent) |
| Repeat the last move. | |
| KAction * | undo (const QObject *recvr, const char *slot, QObject *parent) |
| Undo the last move. | |
| KAction * | redo (const QObject *recvr, const char *slot, QObject *parent) |
| Redo the last move (which has been undone). | |
| KAction * | roll (const QObject *recvr, const char *slot, QObject *parent) |
| Roll die or dice. | |
| KAction * | endTurn (const QObject *recvr, const char *slot, QObject *parent) |
| End the current turn (not the game). | |
| KAction * | carddecks (const QObject *recvr, const char *slot, QObject *parent) |
| Display configure carddecks dialog. | |
| KAction * | configureHighscores (const QObject *recvr, const char *slot, QObject *parent) |
| Display configure highscores dialog. | |
| KAction * | hint (const QObject *recvr, const char *slot, QObject *parent) |
| Give an advice/hint. | |
| KToggleAction * | demo (const QObject *recvr, const char *slot, QObject *parent) |
| Show a demo. | |
| KAction * | solve (const QObject *recvr, const char *slot, QObject *parent) |
| Solve the game. | |
| KSelectAction * | chooseGameType (const QObject *recvr, const char *slot, QObject *parent) |
| Choose game type. | |
| KAction * | restart (const QObject *recvr, const char *slot, QObject *parent) |
| Restart the game. | |
| KDEGAMES_EXPORT KAction * | clearHighscores (const QObject *recvr, const char *slot, QObject *parent) |
| Clear highscores. | |
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.
KStandardActionThe standard menubar and toolbar actions.
Definition at line 54 of file kstandardgameaction.h.
| KDEGAMES_EXPORT KAction * KStandardGameAction::carddecks | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Display configure carddecks dialog.
Definition at line 204 of file kstandardgameaction.cpp.
References Carddecks, and create().

| 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.
References ChooseGameType, and create().

| KDEGAMES_EXPORT KAction* KStandardGameAction::clearHighscores | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Clear highscores.
| KDEGAMES_EXPORT KAction * KStandardGameAction::clearStatistics | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Clear statistics.
Definition at line 176 of file kstandardgameaction.cpp.
References ClearStatistics, and create().

| KDEGAMES_EXPORT KAction * KStandardGameAction::configureHighscores | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Display configure highscores dialog.
Definition at line 207 of file kstandardgameaction.cpp.
References ConfigureHighscores, and create().

| 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.
References ChooseGameType, Demo, KStandardGameActionInfo::globalAccel, LoadRecent, Pause, KStandardGameActionInfo::psIconName, KStandardGameActionInfo::psLabel, KStandardGameActionInfo::psName, KStandardGameActionInfo::psToolTip, KStandardGameActionInfo::psWhatsThis, and KStandardGameActionInfo::shortcut.
Referenced by carddecks(), chooseGameType(), clearStatistics(), configureHighscores(), demo(), end(), endTurn(), gameNew(), highscores(), hint(), load(), loadRecent(), pause(), print(), quit(), redo(), repeat(), restart(), roll(), save(), saveAs(), solve(), statistics(), and undo().
| KDEGAMES_EXPORT KToggleAction * KStandardGameAction::demo | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Show a demo.
Definition at line 213 of file kstandardgameaction.cpp.
References create(), and Demo.

| 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.
References create(), and EndTurn.

| KDEGAMES_EXPORT KAction * KStandardGameAction::gameNew | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Start a new game.
Definition at line 149 of file kstandardgameaction.cpp.

| KDEGAMES_EXPORT KAction * KStandardGameAction::highscores | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Show the highscores.
Definition at line 170 of file kstandardgameaction.cpp.
References create(), and Highscores.

| KDEGAMES_EXPORT KAction * KStandardGameAction::hint | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Give an advice/hint.
Definition at line 210 of file kstandardgameaction.cpp.
References create(), and Hint.

| KDEGAMES_EXPORT KAction * KStandardGameAction::load | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Load a previousely saved game.
Definition at line 152 of file kstandardgameaction.cpp.
References create(), and Load.

| 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.
References create(), and LoadRecent.

| 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.
References KStandardGameActionInfo::psName.
Referenced by KCardThemeInfoStatic::readBacks(), and KCardThemeInfoStatic::readFronts().
| KDEGAMES_EXPORT KToggleAction * KStandardGameAction::pause | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Pause the game.
Definition at line 167 of file kstandardgameaction.cpp.
References create(), and Pause.

| 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.
References create(), and Print.

| KDEGAMES_EXPORT KAction * KStandardGameAction::quit | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Quit the game.
Definition at line 182 of file kstandardgameaction.cpp.
References create(), and Quit.

| KDEGAMES_EXPORT KAction * KStandardGameAction::redo | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Redo the last move (which has been undone).
Definition at line 193 of file kstandardgameaction.cpp.
References create(), and Redo.

| KDEGAMES_EXPORT KAction * KStandardGameAction::repeat | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Repeat the last move.
Definition at line 186 of file kstandardgameaction.cpp.
References create(), and Repeat.

| KDEGAMES_EXPORT KAction * KStandardGameAction::restart | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Restart the game.
Definition at line 222 of file kstandardgameaction.cpp.
References create(), and Restart.

| KDEGAMES_EXPORT KAction * KStandardGameAction::roll | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Roll die or dice.
Definition at line 197 of file kstandardgameaction.cpp.
References create(), and Roll.

| KDEGAMES_EXPORT KAction * KStandardGameAction::save | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Save the current game.
Definition at line 158 of file kstandardgameaction.cpp.
References create(), and Save.

| 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.
References create(), and SaveAs.

| KDEGAMES_EXPORT KAction * KStandardGameAction::solve | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Solve the game.
Definition at line 216 of file kstandardgameaction.cpp.
References create(), and Solve.

| KDEGAMES_EXPORT KAction * KStandardGameAction::statistics | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Show the statistics.
Definition at line 173 of file kstandardgameaction.cpp.
References create(), and Highscores.

| KDEGAMES_EXPORT KAction * KStandardGameAction::undo | ( | const QObject * | recvr, | |
| const char * | slot, | |||
| QObject * | parent | |||
| ) |
Undo the last move.
Definition at line 189 of file kstandardgameaction.cpp.
References create(), and Undo.

1.5.3