00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KSTDGAMEACTION_H
00022 #define KSTDGAMEACTION_H
00023
00024 class TDEAction;
00025 class TDEToggleAction;
00026 class TQObject;
00027 class TDEActionCollection;
00028 class TDERecentFilesAction;
00029 class TDESelectAction;
00030 #include <kdemacros.h>
00031
00032
00047
00048 class KDE_EXPORT KStdGameAction
00049 {
00050 public:
00054 enum StdGameAction {
00055
00056 New=1, Load, LoadRecent, Save, SaveAs, End, Pause, Highscores,
00057 Print, Quit,
00058
00059 Repeat, Undo, Redo, Roll, EndTurn,
00060
00061 Carddecks,
00062 ChooseGameType,
00063 ConfigureHighscores,
00064
00065 Restart,
00066 Hint,
00067 Demo,
00068 Solve,
00069 ActionNone
00070 };
00071
00072 KStdGameAction();
00073 ~KStdGameAction();
00074
00080 static TDEAction* create( StdGameAction id, const char *name,
00081 const TQObject *recvr, const char *slot,
00082 TDEActionCollection* parent );
00083
00087 static TDEAction* create( StdGameAction id,
00088 const TQObject *recvr, const char *slot,
00089 TDEActionCollection* parent )
00090 { return create( id, 0, recvr, slot, parent ); }
00091
00092
00098 static TDEAction *action(StdGameAction act_enum, const TQObject *recvr = 0,
00099 const char *slot = 0, TDEActionCollection *parent = 0,
00100 const char *name = 0L );
00101
00106 static const char* name( StdGameAction id );
00107
00112 static const char* stdName(StdGameAction act_enum);
00113
00117 static TDEAction *gameNew(const TQObject *recvr = 0, const char *slot = 0,
00118 TDEActionCollection *parent = 0, const char *name = 0L );
00119
00123 static TDEAction *load(const TQObject *recvr = 0, const char *slot = 0,
00124 TDEActionCollection *parent = 0, const char *name = 0L );
00125
00129 static TDERecentFilesAction *loadRecent(const TQObject *recvr = 0, const char *slot = 0,
00130 TDEActionCollection *parent = 0, const char *name = 0L );
00131
00135 static TDEAction *save(const TQObject *recvr = 0, const char *slot = 0,
00136 TDEActionCollection *parent = 0, const char *name = 0L );
00137
00141 static TDEAction *saveAs(const TQObject *recvr = 0, const char *slot = 0,
00142 TDEActionCollection *parent = 0, const char *name = 0L );
00143
00147 static TDEToggleAction *pause(const TQObject *recvr = 0, const char *slot = 0,
00148 TDEActionCollection *parent = 0, const char *name = 0L );
00149
00153 static TDEAction *highscores(const TQObject *recvr = 0, const char *slot = 0,
00154 TDEActionCollection *parent = 0, const char *name = 0L );
00155
00156
00161 static TDEAction *end(const TQObject *recvr = 0, const char *slot = 0,
00162 TDEActionCollection *parent = 0, const char *name = 0L );
00163
00168 static TDEAction *print(const TQObject *recvr = 0, const char *slot = 0,
00169 TDEActionCollection *parent = 0, const char *name = 0L );
00170
00174 static TDEAction *quit(const TQObject *recvr = 0, const char *slot = 0,
00175 TDEActionCollection *parent = 0, const char *name = 0L );
00176
00177
00178
00182 static TDEAction *repeat(const TQObject *recvr = 0, const char *slot = 0,
00183 TDEActionCollection *parent = 0, const char *name = 0L );
00184
00188 static TDEAction *undo(const TQObject *recvr = 0, const char *slot = 0,
00189 TDEActionCollection *parent = 0, const char *name = 0L );
00190
00194 static TDEAction *redo(const TQObject *recvr = 0, const char *slot = 0,
00195 TDEActionCollection *parent = 0, const char *name = 0L );
00196
00200 static TDEAction *roll(const TQObject *recvr = 0, const char *slot = 0,
00201 TDEActionCollection *parent = 0, const char *name = 0L );
00202
00207 static TDEAction *endTurn(const TQObject *recvr = 0, const char *slot = 0,
00208 TDEActionCollection *parent = 0, const char *name = 0L );
00209
00210
00214 static TDEAction *carddecks(const TQObject *recvr = 0, const char *slot = 0,
00215 TDEActionCollection *parent = 0, const char *name = 0L );
00216
00221 static TDEAction *configureHighscores(const TQObject *recvr = 0, const char *slot = 0,
00222 TDEActionCollection *parent = 0, const char *name = 0L );
00223
00228 static TDEAction *hint(const TQObject *recvr = 0, const char *slot = 0,
00229 TDEActionCollection *parent = 0, const char *name = 0L );
00230
00235 static TDEToggleAction *demo(const TQObject *recvr = 0, const char *slot = 0,
00236 TDEActionCollection *parent = 0, const char *name = 0L );
00237
00242 static TDEAction *solve(const TQObject *recvr = 0, const char *slot = 0,
00243 TDEActionCollection *parent = 0, const char *name = 0L );
00244
00249 static TDESelectAction *chooseGameType(const TQObject *recvr = 0, const char *slot = 0,
00250 TDEActionCollection *parent = 0, const char *name = 0L );
00251
00256 static TDEAction *restart(const TQObject *recvr = 0, const char *slot = 0,
00257 TDEActionCollection *parent = 0, const char *name = 0L );
00258
00259 };
00260
00261 #endif