• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • libtdegames
 

libtdegames

  • libtdegames
kstdgameaction.h
1 /*
2  This file is part of the TDE games library
3  Copyright (C) 2001 Andreas Beckermann (b_mann@gmx.de)
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License version 2 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 // this class was shamelessy stolen from tdelibs/tdeui/kstdction.[cpp|h] and
20 // after that just edited for our needs
21 #ifndef KSTDGAMEACTION_H
22 #define KSTDGAMEACTION_H
23 
24 class TDEAction;
25 class TDEToggleAction;
26 class TQObject;
27 class TDEActionCollection;
28 class TDERecentFilesAction;
29 class TDESelectAction;
30 #include <tdemacros.h>
31 
32 //-----------------------------------------------------------------------------
47 // #### KDE4: transform in namespace
48 class TDE_EXPORT KStdGameAction
49 {
50 public:
54  enum StdGameAction {
55  // Game menu
56  New=1, Load, LoadRecent, Save, SaveAs, End, Pause, Highscores,
57  Print, Quit,
58  // Move menu
59  Repeat, Undo, Redo, Roll, EndTurn,
60  // Settings menu
61  Carddecks,
62  ChooseGameType, // @since 3.2
63  ConfigureHighscores, // @since 3.2
64 
65  Restart, // @since 3.2
66  Hint, // @since 3.2
67  Demo, // @since 3.2
68  Solve, // @since 3.2
69  ActionNone // @since 3.2
70  };
71 
72  KStdGameAction();
73  ~KStdGameAction();
74 
80  static TDEAction* create( StdGameAction id, const char *name,
81  const TQObject *recvr, const char *slot,
82  TDEActionCollection* parent );
83 
87  static TDEAction* create( StdGameAction id,
88  const TQObject *recvr, const char *slot,
89  TDEActionCollection* parent )
90  { return create( id, 0, recvr, slot, parent ); }
91 
92 
98  static TDEAction *action(StdGameAction act_enum, const TQObject *recvr = 0,
99  const char *slot = 0, TDEActionCollection *parent = 0,
100  const char *name = 0L );
101 
106  static const char* name( StdGameAction id );
107 
112  static const char* stdName(StdGameAction act_enum);
113 
117  static TDEAction *gameNew(const TQObject *recvr = 0, const char *slot = 0,
118  TDEActionCollection *parent = 0, const char *name = 0L );
119 
123  static TDEAction *load(const TQObject *recvr = 0, const char *slot = 0,
124  TDEActionCollection *parent = 0, const char *name = 0L );
125 
129  static TDERecentFilesAction *loadRecent(const TQObject *recvr = 0, const char *slot = 0,
130  TDEActionCollection *parent = 0, const char *name = 0L );
131 
135  static TDEAction *save(const TQObject *recvr = 0, const char *slot = 0,
136  TDEActionCollection *parent = 0, const char *name = 0L );
137 
141  static TDEAction *saveAs(const TQObject *recvr = 0, const char *slot = 0,
142  TDEActionCollection *parent = 0, const char *name = 0L );
143 
147  static TDEToggleAction *pause(const TQObject *recvr = 0, const char *slot = 0,
148  TDEActionCollection *parent = 0, const char *name = 0L );
149 
153  static TDEAction *highscores(const TQObject *recvr = 0, const char *slot = 0,
154  TDEActionCollection *parent = 0, const char *name = 0L );
155 
156 
161  static TDEAction *end(const TQObject *recvr = 0, const char *slot = 0,
162  TDEActionCollection *parent = 0, const char *name = 0L );
163 
168  static TDEAction *print(const TQObject *recvr = 0, const char *slot = 0,
169  TDEActionCollection *parent = 0, const char *name = 0L );
170 
174  static TDEAction *quit(const TQObject *recvr = 0, const char *slot = 0,
175  TDEActionCollection *parent = 0, const char *name = 0L );
176 
177 
178 
182  static TDEAction *repeat(const TQObject *recvr = 0, const char *slot = 0,
183  TDEActionCollection *parent = 0, const char *name = 0L );
184 
188  static TDEAction *undo(const TQObject *recvr = 0, const char *slot = 0,
189  TDEActionCollection *parent = 0, const char *name = 0L );
190 
194  static TDEAction *redo(const TQObject *recvr = 0, const char *slot = 0,
195  TDEActionCollection *parent = 0, const char *name = 0L );
196 
200  static TDEAction *roll(const TQObject *recvr = 0, const char *slot = 0,
201  TDEActionCollection *parent = 0, const char *name = 0L );
202 
207  static TDEAction *endTurn(const TQObject *recvr = 0, const char *slot = 0,
208  TDEActionCollection *parent = 0, const char *name = 0L );
209 
210 
214  static TDEAction *carddecks(const TQObject *recvr = 0, const char *slot = 0,
215  TDEActionCollection *parent = 0, const char *name = 0L );
216 
221  static TDEAction *configureHighscores(const TQObject *recvr = 0, const char *slot = 0,
222  TDEActionCollection *parent = 0, const char *name = 0L );
223 
228  static TDEAction *hint(const TQObject *recvr = 0, const char *slot = 0,
229  TDEActionCollection *parent = 0, const char *name = 0L );
230 
235  static TDEToggleAction *demo(const TQObject *recvr = 0, const char *slot = 0,
236  TDEActionCollection *parent = 0, const char *name = 0L );
237 
242  static TDEAction *solve(const TQObject *recvr = 0, const char *slot = 0,
243  TDEActionCollection *parent = 0, const char *name = 0L );
244 
249  static TDESelectAction *chooseGameType(const TQObject *recvr = 0, const char *slot = 0,
250  TDEActionCollection *parent = 0, const char *name = 0L );
251 
256  static TDEAction *restart(const TQObject *recvr = 0, const char *slot = 0,
257  TDEActionCollection *parent = 0, const char *name = 0L );
258 
259 };
260 
261 #endif
KStdGameAction::create
static TDEAction * create(StdGameAction id, const TQObject *recvr, const char *slot, TDEActionCollection *parent)
Definition: kstdgameaction.h:87
KStdGameAction::StdGameAction
StdGameAction
The standard menubar and toolbar actions.
Definition: kstdgameaction.h:54
KStdGameAction
Replacement for KStdAction for TDE Games.
Definition: kstdgameaction.h:48

libtdegames

Skip menu "libtdegames"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

libtdegames

Skip menu "libtdegames"
  • libtdegames
Generated for libtdegames by doxygen 1.8.13
This website is maintained by Timothy Pearson.