• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • @topname@
  • Sitemap
  • Contact Us
 

libkdegames

kcarddialog.h

00001 /*
00002     This file is part of the KDE games library
00003     Copyright (C) 2000 Martin Heni (martin@heni-online.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., 51 Franklin Street, Fifth Floor,
00017     Boston, MA 02110-1301, USA.
00018 */
00019 #ifndef __KCARDDIALOG_H_
00020 #define __KCARDDIALOG_H_
00021 
00022 #include <tqstring.h>
00023 #include <kdialogbase.h>
00024 #include <tqmap.h> // TODO: remove - it is in kcarddialog.cpp now; left here for source compatibility
00025 
00026 #include <kdemacros.h>
00027 class TQIconViewItem;
00028 
00029 class KConfig;
00030 
00031 class KCardDialogPrivate;
00032 
00090 class KDE_EXPORT KCardDialog : public KDialogBase
00091 {
00092   Q_OBJECT
00093 
00094 public:
00095 
00101    enum CardFlags { Both=0, NoDeck=0x01, NoCards=0x02 };
00102 
00110    KCardDialog (TQWidget* parent = NULL,const char* name = NULL,
00111                 CardFlags flags = Both);
00115    ~KCardDialog();
00116 
00156    static int getCardDeck(TQString &deck,TQString &carddir, TQWidget *parent=0,
00157                           CardFlags flags=Both, bool* randomDeck=0,
00158                           bool* randomCardDir=0, double* scale=0, KConfig* conf=0);
00159 
00175    static void getConfigCardDeck(KConfig* conf, TQString& deck, TQString& cardDir, double& scale);
00176 
00188    static TQString getDefaultDeck();
00189 
00201    static TQString getDefaultCardDir();
00202 
00210     static TQString getCardPath(const TQString &carddir, int index);
00211 
00216     static TQString getRandomDeck();
00217 
00222     static TQString getRandomCardDir();
00223 
00228    void showRandomDeckBox(bool s);
00229 
00234    void showRandomCardDirBox(bool s);
00235 
00241    const TQString& deck() const;
00242 
00247    void setDeck(const TQString& file);
00248 
00252    const TQString& cardDir() const;
00253 
00258    void setCardDir(const TQString& dir);
00259 
00263    CardFlags flags() const;
00264 
00270    void setupDialog(bool showResizeBox = false);
00271 
00276    bool isRandomDeck() const;
00277 
00282    bool isRandomCardDir() const;
00283 
00287    bool isGlobalDeck() const;
00288 
00292    bool isGlobalCardDir() const;
00293 
00297    double cardScale() const;
00298 
00303    void loadConfig(KConfig* conf);
00304 
00311    void saveConfig(KConfig* conf);
00312 
00313 
00314 protected:
00315     void insertCardIcons();
00316     void insertDeckIcons();
00317 
00318     static void getGlobalDeck(TQString& cardDir, bool& random);
00319     static void getGlobalCardDir(TQString& deck, bool& random);
00320 
00321     static TQString getDeckName(const TQString& desktop);
00322 
00327     static TQString group();
00328 
00329 protected slots:
00330    void slotDeckClicked(TQIconViewItem *);
00331    void slotCardClicked(TQIconViewItem *);
00332    void slotRandomCardDirToggled(bool on);
00333    void slotRandomDeckToggled(bool on);
00334    void slotCardResized(int);
00335    void slotDefaultSize();
00336    void slotSetGlobalDeck();
00337    void slotSetGlobalCardDir();
00338 
00339 private:
00340    static void init();
00341 
00342    KCardDialogPrivate* d;
00343 };
00344 
00345 #endif

libkdegames

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

@topname@

Skip menu "@topname@"
  • libkdegames
Generated for @topname@ by doxygen 1.5.6
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal