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

libtdegames

  • libtdegames
kcarddialog.h
1/*
2 This file is part of the TDE games library
3 Copyright (C) 2000 Martin Heni (martin@heni-online.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#ifndef __KCARDDIALOG_H_
20#define __KCARDDIALOG_H_
21
22#include <tqstring.h>
23#include <kdialogbase.h>
24#include <tqmap.h> // TODO: remove - it is in kcarddialog.cpp now; left here for source compatibility
25
26#include <tdemacros.h>
27class TQIconViewItem;
28
29class TDEConfig;
30
31class KCardDialogPrivate;
32
90class TDE_EXPORT KCardDialog : public KDialogBase
91{
92 TQ_OBJECT
93
94
95public:
96
102 enum CardFlags { Both=0, NoDeck=0x01, NoCards=0x02 };
103
111 KCardDialog (TQWidget* parent = NULL,const char* name = NULL,
112 CardFlags flags = Both);
116 ~KCardDialog();
117
157 static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=0,
158 CardFlags flags=Both, bool* randomDeck=0,
159 bool* randomCardDir=0, double* scale=0, TDEConfig* conf=0);
160
176 static void getConfigCardDeck(TDEConfig* conf, TQString& deck, TQString& cardDir, double& scale);
177
189 static TQString getDefaultDeck();
190
202 static TQString getDefaultCardDir();
203
211 static TQString getCardPath(const TQString &carddir, int index);
212
217 static TQString getRandomDeck();
218
223 static TQString getRandomCardDir();
224
229 void showRandomDeckBox(bool s);
230
235 void showRandomCardDirBox(bool s);
236
242 const TQString& deck() const;
243
248 void setDeck(const TQString& file);
249
253 const TQString& cardDir() const;
254
259 void setCardDir(const TQString& dir);
260
264 CardFlags flags() const;
265
271 void setupDialog(bool showResizeBox = false);
272
277 bool isRandomDeck() const;
278
283 bool isRandomCardDir() const;
284
288 bool isGlobalDeck() const;
289
293 bool isGlobalCardDir() const;
294
298 double cardScale() const;
299
304 void loadConfig(TDEConfig* conf);
305
312 void saveConfig(TDEConfig* conf);
313
314
315protected:
316 void insertCardIcons();
317 void insertDeckIcons();
318
319 static void getGlobalDeck(TQString& cardDir, bool& random);
320 static void getGlobalCardDir(TQString& deck, bool& random);
321
322 static TQString getDeckName(const TQString& desktop);
323
328 static TQString group();
329
330protected slots:
331 void slotDeckClicked(TQIconViewItem *);
332 void slotCardClicked(TQIconViewItem *);
333 void slotRandomCardDirToggled(bool on);
334 void slotRandomDeckToggled(bool on);
335 void slotCardResized(int);
336 void slotDefaultSize();
337 void slotSetGlobalDeck();
338 void slotSetGlobalCardDir();
339
340private:
341 static void init();
342
343 KCardDialogPrivate* d;
344};
345
346#endif
KCardDialog
A carddeck selection dialog for card games.
Definition: kcarddialog.h:91
KCardDialog::CardFlags
CardFlags
Definition: kcarddialog.h:102
KCardDialog::group
static TQString group()

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.9.4
This website is maintained by Timothy Pearson.