libkdegames Library API Documentation

KStdGameAction Class Reference

Replacement for KStdAction for KDE Games. More...

#include <kstdgameaction.h>

List of all members.

Public Types

enum  StdGameAction {
  New = 1, Load, LoadRecent, Save,
  SaveAs, End, Pause, Highscores,
  Print, Quit, Repeat, Undo,
  Redo, Roll, EndTurn, Carddecks,
  ChooseGameType, ConfigureHighscores, Restart, Hint,
  Demo, Solve, ActionNone
}

Static Public Member Functions

KAction * create (StdGameAction id, const char *name, const QObject *recvr, const char *slot, KActionCollection *parent)
KAction * create (StdGameAction id, const QObject *recvr, const char *slot, KActionCollection *parent)
KAction * action (StdGameAction act_enum, const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
const char * name (StdGameAction id)
const char * stdName (StdGameAction act_enum)
KAction * gameNew (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * load (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KRecentFilesAction * loadRecent (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * save (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * saveAs (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KToggleAction * pause (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * highscores (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * end (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * print (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * quit (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * repeat (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * undo (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * redo (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * roll (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * endTurn (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * carddecks (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * configureHighscores (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * hint (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KToggleAction * demo (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * solve (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KSelectAction * chooseGameType (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)
KAction * restart (const QObject *recvr=0, const char *slot=0, KActionCollection *parent=0, const char *name=0L)


Detailed Description

Replacement for KStdAction for KDE Games.

This class is an extension to the usual KStdAction class which provides easy access to often used KDE actions

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 KStdAction entries.

See also:
KStdAction
Author:
Andreas Beckermann <b_mann@gmx.de>

Definition at line 48 of file kstdgameaction.h.


Member Enumeration Documentation

enum KStdGameAction::StdGameAction
 

The standard menubar and toolbar actions.

Definition at line 54 of file kstdgameaction.h.


Member Function Documentation

KAction * KStdGameAction::create StdGameAction  id,
const char *  name,
const QObject recvr,
const char *  slot,
KActionCollection *  parent
[static]
 

Creates an action corresponding to the KStdAction::StdAction enum.

Since:
3.2

Definition at line 98 of file kstdgameaction.cpp.

References create().

Referenced by action(), carddecks(), chooseGameType(), configureHighscores(), create(), demo(), end(), endTurn(), gameNew(), highscores(), hint(), load(), loadRecent(), pause(), print(), quit(), redo(), repeat(), restart(), roll(), save(), saveAs(), solve(), and undo().

KAction* KStdGameAction::create StdGameAction  id,
const QObject recvr,
const char *  slot,
KActionCollection *  parent
[inline, static]
 

Since:
3.2

Definition at line 87 of file kstdgameaction.h.

KAction * KStdGameAction::action StdGameAction  act_enum,
const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Retrieve the action corresponding to the KStdGameAction::StdGameAction enum.

Deprecated:

Definition at line 35 of file kstdgameaction.cpp.

References action(), and create().

Referenced by action().

const char * KStdGameAction::name StdGameAction  id  )  [static]
 

This will return the internal name of a given standard action.

Since:
3.2

Definition at line 134 of file kstdgameaction.cpp.

References name().

Referenced by name(), and stdName().

const char * KStdGameAction::stdName StdGameAction  act_enum  )  [static]
 

This will return the internal name of a given standard action.

Deprecated:

Definition at line 42 of file kstdgameaction.cpp.

References name(), and stdName().

Referenced by stdName().

KAction * KStdGameAction::gameNew const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Start a new game.

Definition at line 140 of file kstdgameaction.cpp.

References create(), and gameNew().

Referenced by gameNew().

KAction * KStdGameAction::load const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Load a previousely saved game.

Definition at line 143 of file kstdgameaction.cpp.

References create(), and load().

Referenced by load().

KRecentFilesAction * KStdGameAction::loadRecent const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Load a recently loaded game.

Definition at line 146 of file kstdgameaction.cpp.

References create(), and loadRecent().

Referenced by loadRecent().

KAction * KStdGameAction::save const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Save the current game.

Definition at line 149 of file kstdgameaction.cpp.

References create(), and save().

Referenced by save().

KAction * KStdGameAction::saveAs const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Save the current game under a different filename.

Definition at line 152 of file kstdgameaction.cpp.

References create(), and saveAs().

Referenced by saveAs().

KToggleAction * KStdGameAction::pause const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Pause the game.

Definition at line 158 of file kstdgameaction.cpp.

References create(), and pause().

Referenced by pause().

KAction * KStdGameAction::highscores const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Show the highscores.

Definition at line 161 of file kstdgameaction.cpp.

References create(), and highscores().

Referenced by highscores().

KAction * KStdGameAction::end const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

End the current game, but do not quit the program.

Think of a "close" entry.

Definition at line 155 of file kstdgameaction.cpp.

References create(), and end().

Referenced by end().

KAction * KStdGameAction::print const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Print the current screen? Game? Whatever - hardly used in games but there is at least one example (ktuberling).

Definition at line 164 of file kstdgameaction.cpp.

References create(), and print().

Referenced by print().

KAction * KStdGameAction::quit const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Quit the game.

Definition at line 167 of file kstdgameaction.cpp.

References create(), and quit().

Referenced by quit().

KAction * KStdGameAction::repeat const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Repeat the last move.

Definition at line 171 of file kstdgameaction.cpp.

References create(), and repeat().

Referenced by repeat().

KAction * KStdGameAction::undo const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Undo the last move.

Definition at line 174 of file kstdgameaction.cpp.

References create(), and undo().

Referenced by undo().

KAction * KStdGameAction::redo const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Redo the last move (which has been undone).

Definition at line 178 of file kstdgameaction.cpp.

References create(), and redo().

Referenced by redo().

KAction * KStdGameAction::roll const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Roll die or dice.

Definition at line 182 of file kstdgameaction.cpp.

References create(), and roll().

Referenced by roll().

KAction * KStdGameAction::endTurn const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

End the current turn (not the game).

Usually to let the next player start

Definition at line 185 of file kstdgameaction.cpp.

References create(), and endTurn().

Referenced by endTurn().

KAction * KStdGameAction::carddecks const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Display configure carddecks dialog.

Definition at line 189 of file kstdgameaction.cpp.

References carddecks(), and create().

Referenced by carddecks().

KAction * KStdGameAction::configureHighscores const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Display configure highscores dialog.

Since:
3.2

Definition at line 192 of file kstdgameaction.cpp.

References configureHighscores(), and create().

Referenced by configureHighscores().

KAction * KStdGameAction::hint const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Give an advice/hint.

Since:
3.2

Definition at line 195 of file kstdgameaction.cpp.

References create(), and hint().

Referenced by hint().

KToggleAction * KStdGameAction::demo const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Show a demo.

Since:
3.2

Definition at line 198 of file kstdgameaction.cpp.

References create(), and demo().

Referenced by demo().

KAction * KStdGameAction::solve const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Solve the game.

Since:
3.2

Definition at line 201 of file kstdgameaction.cpp.

References create(), and solve().

Referenced by solve().

KSelectAction * KStdGameAction::chooseGameType const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Choose game type.

Since:
3.2

Definition at line 204 of file kstdgameaction.cpp.

References chooseGameType(), and create().

Referenced by chooseGameType().

KAction * KStdGameAction::restart const QObject recvr = 0,
const char *  slot = 0,
KActionCollection *  parent = 0,
const char *  name = 0L
[static]
 

Restart game.

Since:
3.2

Definition at line 207 of file kstdgameaction.cpp.

References create(), and restart().

Referenced by restart().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for libkdegames Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 13 12:49:02 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003