libkdegames Library API Documentation

kstdgameaction.h

00001 /* 00002 This file is part of the KDE games library 00003 Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de) 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 // this class was shamelessy stolen from kdelibs/kdeui/kstdction.[cpp|h] and 00020 // after that just edited for our needs 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 // #### KDE4: transform in namespace 00048 class KStdGameAction 00049 { 00050 public: 00054 enum StdGameAction { 00055 // Game menu 00056 New=1, Load, LoadRecent, Save, SaveAs, End, Pause, Highscores, 00057 Print, Quit, 00058 // Move menu 00059 Repeat, Undo, Redo, Roll, EndTurn, 00060 // Settings menu 00061 Carddecks, 00062 ChooseGameType, // @since 3.2 00063 ConfigureHighscores, // @since 3.2 00064 00065 Restart, // @since 3.2 00066 Hint, // @since 3.2 00067 Demo, // @since 3.2 00068 Solve, // @since 3.2 00069 ActionNone // @since 3.2 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
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 Wed Jul 28 14:18:46 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003