• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

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
Author:
Andreas Beckermann <b_mann@gmx.de>


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

enum KStandardGameAction::StandardGameAction

The standard menubar and toolbar actions.

Enumerator:
New 
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 

Definition at line 54 of file kstandardgameaction.h.


Function Documentation

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.

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::clearStatistics ( const QObject *  recvr,
const char *  slot,
QObject *  parent 
)

Clear statistics.

Definition at line 176 of file kstandardgameaction.cpp.

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.

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 KToggleAction * KStandardGameAction::demo ( const QObject *  recvr,
const char *  slot,
QObject *  parent 
)

Show a demo.

Definition at line 213 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 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.

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.

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.

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 KToggleAction * KStandardGameAction::pause ( const QObject *  recvr,
const char *  slot,
QObject *  parent 
)

Pause the game.

Definition at line 167 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::quit ( const QObject *  recvr,
const char *  slot,
QObject *  parent 
)

Quit the game.

Definition at line 182 of file kstandardgameaction.cpp.

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.

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.

KDEGAMES_EXPORT KAction * KStandardGameAction::restart ( const QObject *  recvr,
const char *  slot,
QObject *  parent 
)

Restart the game.

Definition at line 222 of file kstandardgameaction.cpp.

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.

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.

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.

KDEGAMES_EXPORT KAction * KStandardGameAction::solve ( const QObject *  recvr,
const char *  slot,
QObject *  parent 
)

Solve the game.

Definition at line 216 of file kstandardgameaction.cpp.

KDEGAMES_EXPORT KAction * KStandardGameAction::statistics ( const QObject *  recvr,
const char *  slot,
QObject *  parent 
)

Show the statistics.

Definition at line 173 of file kstandardgameaction.cpp.

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.

libkdegames

Skip menu "libkdegames"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • kblackbox
  • kgoldrunner
  • kmahjongg
  • ksquares
  • libkdegames
  •   highscore
  •   kgame
  •   kggzgames
  •   kggzmod
  •   kggznet
  • libkmahjongg
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal