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

libkdegames

  • libkdegames
kstdgameaction.h
1 /*
2  This file is part of the KDE 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 kdelibs/kdeui/kstdction.[cpp|h] and
20 // after that just edited for our needs
21 #ifndef KSTDGAMEACTION_H
22 #define KSTDGAMEACTION_H
23 
24 class KAction;
25 class KToggleAction;
26 class TQObject;
27 class KActionCollection;
28 class KRecentFilesAction;
29 class KSelectAction;
30 #include <kdemacros.h>
31 
32 //-----------------------------------------------------------------------------
47 // #### KDE4: transform in namespace
48 class KDE_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 KAction* create( StdGameAction id, const char *name,
81  const TQObject *recvr, const char *slot,
82  KActionCollection* parent );
83 
87  static KAction* create( StdGameAction id,
88  const TQObject *recvr, const char *slot,
89  KActionCollection* parent )
90  { return create( id, 0, recvr, slot, parent ); }
91 
92 
98  static KAction *action(StdGameAction act_enum, const TQObject *recvr = 0,
99  const char *slot = 0, KActionCollection *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 KAction *gameNew(const TQObject *recvr = 0, const char *slot = 0,
118  KActionCollection *parent = 0, const char *name = 0L );
119 
123  static KAction *load(const TQObject *recvr = 0, const char *slot = 0,
124  KActionCollection *parent = 0, const char *name = 0L );
125 
129  static KRecentFilesAction *loadRecent(const TQObject *recvr = 0, const char *slot = 0,
130  KActionCollection *parent = 0, const char *name = 0L );
131 
135  static KAction *save(const TQObject *recvr = 0, const char *slot = 0,
136  KActionCollection *parent = 0, const char *name = 0L );
137 
141  static KAction *saveAs(const TQObject *recvr = 0, const char *slot = 0,
142  KActionCollection *parent = 0, const char *name = 0L );
143 
147  static KToggleAction *pause(const TQObject *recvr = 0, const char *slot = 0,
148  KActionCollection *parent = 0, const char *name = 0L );
149 
153  static KAction *highscores(const TQObject *recvr = 0, const char *slot = 0,
154  KActionCollection *parent = 0, const char *name = 0L );
155 
156 
161  static KAction *end(const TQObject *recvr = 0, const char *slot = 0,
162  KActionCollection *parent = 0, const char *name = 0L );
163 
168  static KAction *print(const TQObject *recvr = 0, const char *slot = 0,
169  KActionCollection *parent = 0, const char *name = 0L );
170 
174  static KAction *quit(const TQObject *recvr = 0, const char *slot = 0,
175  KActionCollection *parent = 0, const char *name = 0L );
176 
177 
178 
182  static KAction *repeat(const TQObject *recvr = 0, const char *slot = 0,
183  KActionCollection *parent = 0, const char *name = 0L );
184 
188  static KAction *undo(const TQObject *recvr = 0, const char *slot = 0,
189  KActionCollection *parent = 0, const char *name = 0L );
190 
194  static KAction *redo(const TQObject *recvr = 0, const char *slot = 0,
195  KActionCollection *parent = 0, const char *name = 0L );
196 
200  static KAction *roll(const TQObject *recvr = 0, const char *slot = 0,
201  KActionCollection *parent = 0, const char *name = 0L );
202 
207  static KAction *endTurn(const TQObject *recvr = 0, const char *slot = 0,
208  KActionCollection *parent = 0, const char *name = 0L );
209 
210 
214  static KAction *carddecks(const TQObject *recvr = 0, const char *slot = 0,
215  KActionCollection *parent = 0, const char *name = 0L );
216 
221  static KAction *configureHighscores(const TQObject *recvr = 0, const char *slot = 0,
222  KActionCollection *parent = 0, const char *name = 0L );
223 
228  static KAction *hint(const TQObject *recvr = 0, const char *slot = 0,
229  KActionCollection *parent = 0, const char *name = 0L );
230 
235  static KToggleAction *demo(const TQObject *recvr = 0, const char *slot = 0,
236  KActionCollection *parent = 0, const char *name = 0L );
237 
242  static KAction *solve(const TQObject *recvr = 0, const char *slot = 0,
243  KActionCollection *parent = 0, const char *name = 0L );
244 
249  static KSelectAction *chooseGameType(const TQObject *recvr = 0, const char *slot = 0,
250  KActionCollection *parent = 0, const char *name = 0L );
251 
256  static KAction *restart(const TQObject *recvr = 0, const char *slot = 0,
257  KActionCollection *parent = 0, const char *name = 0L );
258 
259 };
260 
261 #endif

libkdegames

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

libkdegames

Skip menu "libkdegames"
  • libkdegames
Generated for libkdegames by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |