kstandardgameaction.h

Go to the documentation of this file.
00001 /*
00002     This file is part of the KDE games library
00003     Copyright (C) 2001 Andreas Beckermann <b_mann@gmx.de>
00004     Copyright (C) 2007 Simon Hürlimann <simon.huerlimann@huerlisi.ch>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License version 2 as published by the Free Software Foundation.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018     Boston, MA 02110-1301, USA.
00019 */
00020 // this class was shamelessy stolen from kdelibs/kdeui/kstdction.[cpp|h] and
00021 // after that just edited for our needs
00022 #ifndef KSTANDARDGAMEACTION_H
00023 #define KSTANDARDGAMEACTION_H
00024 
00025 #include <libkdegames_export.h>
00026 
00027 class KAction;
00028 class KToggleAction;
00029 class QObject;
00030 class KRecentFilesAction;
00031 class KSelectAction;
00032 
00049 namespace KStandardGameAction
00050 {
00054     enum StandardGameAction {
00055         // Game menu
00056         New=1, Load, LoadRecent, Save, SaveAs, End, Pause, Highscores, Statistics,
00057         Print, Quit,
00058         // Move menu
00059         Repeat, Undo, Redo, Roll, EndTurn,
00060         // Settings menu
00061         Carddecks,
00062         ChooseGameType,
00063         ConfigureHighscores,
00064         ClearHighscores,
00065         ClearStatistics,
00066         Restart,
00067         Hint,
00068         Demo,
00069         Solve,
00070         ActionNone
00071     };
00072 
00077     KDEGAMES_EXPORT KAction* create( StandardGameAction id, const QObject *recvr, const char *slot,
00078                             QObject* parent );
00079 
00080 
00084     KDEGAMES_EXPORT const char* name( StandardGameAction id );
00085 
00089     KDEGAMES_EXPORT KAction *gameNew(const QObject *recvr, const char *slot,
00090                             QObject *parent );
00091 
00095     KDEGAMES_EXPORT KAction *load(const QObject *recvr, const char *slot,
00096                          QObject *parent );
00097 
00098     // FIXME why not to delete this and use just KStandardAction::openRecent???
00099     // loadRecent seems to mimic its behaviour
00104     KDEGAMES_EXPORT KRecentFilesAction *loadRecent(const QObject *recvr, const char *slot,
00105                                           QObject *parent );
00106 
00110     KDEGAMES_EXPORT KAction *save(const QObject *recvr, const char *slot,
00111                          QObject *parent);
00112 
00116     KDEGAMES_EXPORT KAction *saveAs(const QObject *recvr, const char *slot,
00117                            QObject *parent );
00118 
00122     KDEGAMES_EXPORT KToggleAction *pause(const QObject *recvr, const char *slot,
00123                                 QObject *parent );
00124 
00128     KDEGAMES_EXPORT KAction *highscores(const QObject *recvr, const char *slot,
00129                                QObject *parent );
00130 
00134     KDEGAMES_EXPORT KAction *clearHighscores(const QObject *recvr, const char *slot,
00135                                QObject *parent );
00136 
00140     KDEGAMES_EXPORT KAction *statistics(const QObject *recvr, const char *slot,
00141                                QObject *parent );
00142 
00146     KDEGAMES_EXPORT KAction *clearStatistics(const QObject *recvr, const char *slot,
00147                                QObject *parent );
00148 
00149 
00154     KDEGAMES_EXPORT KAction *end(const QObject *recvr, const char *slot,
00155                         QObject *parent );
00156 
00161     KDEGAMES_EXPORT KAction *print(const QObject *recvr, const char *slot,
00162                           QObject *parent );
00163 
00167     KDEGAMES_EXPORT KAction *quit(const QObject *recvr, const char *slot,
00168                          QObject *parent );
00169 
00173     KDEGAMES_EXPORT KAction *repeat(const QObject *recvr, const char *slot,
00174                            QObject *parent );
00175 
00179     KDEGAMES_EXPORT KAction *undo(const QObject *recvr, const char *slot,
00180                          QObject *parent );
00181 
00185     KDEGAMES_EXPORT KAction *redo(const QObject *recvr, const char *slot,
00186                          QObject *parent );
00187 
00191     KDEGAMES_EXPORT KAction *roll(const QObject *recvr, const char *slot,
00192                          QObject *parent );
00193 
00198     KDEGAMES_EXPORT KAction *endTurn(const QObject *recvr, const char *slot,
00199                             QObject *parent );
00200 
00204     KDEGAMES_EXPORT KAction *carddecks(const QObject *recvr, const char *slot,
00205                               QObject *parent );
00206 
00210     KDEGAMES_EXPORT KAction *configureHighscores(const QObject *recvr, const char *slot,
00211                                         QObject *parent );
00212 
00216     KDEGAMES_EXPORT KAction *hint(const QObject *recvr, const char *slot,
00217                          QObject *parent );
00218 
00222     KDEGAMES_EXPORT KToggleAction *demo(const QObject *recvr, const char *slot,
00223                                QObject *parent );
00224 
00228     KDEGAMES_EXPORT KAction *solve(const QObject *recvr, const char *slot,
00229                           QObject *parent );
00230 
00235     KDEGAMES_EXPORT KSelectAction *chooseGameType(const QObject *recvr, const char *slot,
00236                                          QObject *parent );
00237 
00241     KDEGAMES_EXPORT KAction *restart(const QObject *recvr, const char *slot,
00242                             QObject *parent );
00243 
00244 }
00245 
00246 #endif

Generated on Sun Mar 16 08:02:53 2008 for Libkdegames by  doxygen 1.5.3