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 KAction;
00025
class KToggleAction;
00026
class QObject;
00027
class KActionCollection;
00028
class KRecentFilesAction;
00029
class KSelectAction;
00030
00031
00032
00047
00048 class 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 KAction*
create( StdGameAction
id,
const char *name,
00081
const QObject *recvr,
const char *slot,
00082 KActionCollection* parent );
00083
00087 static KAction*
create( StdGameAction
id,
00088
const QObject *recvr,
const char *slot,
00089 KActionCollection* parent )
00090 {
return create(
id, 0, recvr, slot, parent ); }
00091
00092
00098
static KAction *
action(StdGameAction act_enum,
const QObject *recvr = 0,
00099
const char *slot = 0, KActionCollection *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 KAction *
gameNew(
const QObject *recvr = 0,
const char *slot = 0,
00118 KActionCollection *parent = 0,
const char *name = 0L );
00119
00123
static KAction *
load(
const QObject *recvr = 0,
const char *slot = 0,
00124 KActionCollection *parent = 0,
const char *name = 0L );
00125
00129
static KRecentFilesAction *
loadRecent(
const QObject *recvr = 0,
const char *slot = 0,
00130 KActionCollection *parent = 0,
const char *name = 0L );
00131
00135
static KAction *
save(
const QObject *recvr = 0,
const char *slot = 0,
00136 KActionCollection *parent = 0,
const char *name = 0L );
00137
00141
static KAction *
saveAs(
const QObject *recvr = 0,
const char *slot = 0,
00142 KActionCollection *parent = 0,
const char *name = 0L );
00143
00147
static KToggleAction *
pause(
const QObject *recvr = 0,
const char *slot = 0,
00148 KActionCollection *parent = 0,
const char *name = 0L );
00149
00153
static KAction *
highscores(
const QObject *recvr = 0,
const char *slot = 0,
00154 KActionCollection *parent = 0,
const char *name = 0L );
00155
00156
00161
static KAction *
end(
const QObject *recvr = 0,
const char *slot = 0,
00162 KActionCollection *parent = 0,
const char *name = 0L );
00163
00168
static KAction *
print(
const QObject *recvr = 0,
const char *slot = 0,
00169 KActionCollection *parent = 0,
const char *name = 0L );
00170
00174
static KAction *
quit(
const QObject *recvr = 0,
const char *slot = 0,
00175 KActionCollection *parent = 0,
const char *name = 0L );
00176
00177
00178
00182
static KAction *
repeat(
const QObject *recvr = 0,
const char *slot = 0,
00183 KActionCollection *parent = 0,
const char *name = 0L );
00184
00188
static KAction *
undo(
const QObject *recvr = 0,
const char *slot = 0,
00189 KActionCollection *parent = 0,
const char *name = 0L );
00190
00194
static KAction *
redo(
const QObject *recvr = 0,
const char *slot = 0,
00195 KActionCollection *parent = 0,
const char *name = 0L );
00196
00200
static KAction *
roll(
const QObject *recvr = 0,
const char *slot = 0,
00201 KActionCollection *parent = 0,
const char *name = 0L );
00202
00207
static KAction *
endTurn(
const QObject *recvr = 0,
const char *slot = 0,
00208 KActionCollection *parent = 0,
const char *name = 0L );
00209
00210
00214
static KAction *
carddecks(
const QObject *recvr = 0,
const char *slot = 0,
00215 KActionCollection *parent = 0,
const char *name = 0L );
00216
00221
static KAction *
configureHighscores(
const QObject *recvr = 0,
const char *slot = 0,
00222 KActionCollection *parent = 0,
const char *name = 0L );
00223
00228
static KAction *
hint(
const QObject *recvr = 0,
const char *slot = 0,
00229 KActionCollection *parent = 0,
const char *name = 0L );
00230
00235
static KToggleAction *
demo(
const QObject *recvr = 0,
const char *slot = 0,
00236 KActionCollection *parent = 0,
const char *name = 0L );
00237
00242
static KAction *
solve(
const QObject *recvr = 0,
const char *slot = 0,
00243 KActionCollection *parent = 0,
const char *name = 0L );
00244
00249
static KSelectAction *
chooseGameType(
const QObject *recvr = 0,
const char *slot = 0,
00250 KActionCollection *parent = 0,
const char *name = 0L );
00251
00256
static KAction *
restart(
const QObject *recvr = 0,
const char *slot = 0,
00257 KActionCollection *parent = 0,
const char *name = 0L );
00258
00259 };
00260
00261
#endif