diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 04:58:26 +0000 |
commit | 838baf3f99ec5ab81b063eb5449a3381d860f377 (patch) | |
tree | dd31abcfde08ca92e4623b8f50b3d762a87c997a /kgoldrunner/src/kgrdialog.h | |
parent | 2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff) | |
download | tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip |
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kgoldrunner/src/kgrdialog.h')
-rw-r--r-- | kgoldrunner/src/kgrdialog.h | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/kgoldrunner/src/kgrdialog.h b/kgoldrunner/src/kgrdialog.h index 860328eb..cbf4735a 100644 --- a/kgoldrunner/src/kgrdialog.h +++ b/kgoldrunner/src/kgrdialog.h @@ -7,15 +7,15 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -#ifndef KGRDIALOG_QT_H -#define KGRDIALOG_QT_H +#ifndef KGRDIALOG_TQT_H +#define KGRDIALOG_TQT_H // If portable version, use TQDialog and TQMessageBox. // If KDE version, use KDialogBase and KMessageBox. #ifdef KGR_PORTABLE #include <tqdialog.h> -#define KGR_DIALOG QDialog +#define KGR_DIALOG TQDialog #include <tqmessagebox.h> #else @@ -55,13 +55,14 @@ class KGrThumbNail; /******************* DIALOG TO SELECT A GAME AND LEVEL *******************/ /******************************************************************************/ -class KGrSLDialog : public KGR_DIALOG // KGR_PORTABLE sets QDialog/KDialogBase +class KGrSLDialog : public KGR_DIALOG // KGR_PORTABLE sets TQDialog/KDialogBase { Q_OBJECT + TQ_OBJECT public: KGrSLDialog (int action, int requestedLevel, int collnIndex, TQPtrList<KGrCollection> & gamesList, KGrGame * theGame, - TQWidget * parent = 0, const char *name = 0); + TQWidget * tqparent = 0, const char *name = 0); ~KGrSLDialog(); int selectedLevel() {return (number->value());} @@ -110,16 +111,17 @@ private: *************** DIALOG BOX TO CREATE/EDIT A LEVEL NAME AND HINT **************** *******************************************************************************/ -class KGrNHDialog : public KGR_DIALOG // KGR_PORTABLE sets QDialog/KDialogBase +class KGrNHDialog : public KGR_DIALOG // KGR_PORTABLE sets TQDialog/KDialogBase { Q_OBJECT + TQ_OBJECT public: KGrNHDialog (const TQString & levelName, const TQString & levelHint, - TQWidget * parent = 0, const char * name = 0); + TQWidget * tqparent = 0, const char * name = 0); ~KGrNHDialog(); - QString getName() {return (nhName->text());} - QString getHint() {return (mle->text());} + TQString getName() {return (nhName->text());} + TQString getHint() {return (mle->text());} private: TQLineEdit * nhName; @@ -134,19 +136,20 @@ private: ***************** DIALOG TO CREATE OR EDIT A GAME (COLLECTION) ***************** *******************************************************************************/ -class KGrECDialog : public KGR_DIALOG // KGR_PORTABLE sets QDialog/KDialogBase +class KGrECDialog : public KGR_DIALOG // KGR_PORTABLE sets TQDialog/KDialogBase { Q_OBJECT + TQ_OBJECT public: KGrECDialog (int action, int collnIndex, TQPtrList<KGrCollection> & gamesList, - TQWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); ~KGrECDialog(); - QString getName() {return (ecName->text());} - QString getPrefix() {return (ecPrefix->text());} + TQString getName() {return (ecName->text());} + TQString getPrefix() {return (ecPrefix->text());} bool isTrad() {return (ecTradB->isChecked());} - QString getAboutText() {return (mle->text());} + TQString getAboutText() {return (mle->text());} private slots: void ecSetRules (const char settings); @@ -186,12 +189,13 @@ private: #include <tqfile.h> #include <tqtextstream.h> -class KGrLGDialog : public KGR_DIALOG // KGR_PORTABLE sets QDialog/KDialogBase +class KGrLGDialog : public KGR_DIALOG // KGR_PORTABLE sets TQDialog/KDialogBase { Q_OBJECT + TQ_OBJECT public: KGrLGDialog (TQFile * savedGames, TQPtrList<KGrCollection> & collections, - TQWidget * parent, const char * name); + TQWidget * tqparent, const char * name); TQString getCurrentText() {return (lgList->currentText());} private slots: @@ -203,16 +207,16 @@ private: }; /******************************************************************************* -****************** PORTABLE MESSAGE FUNCTIONS (Qt Version) ******************* +****************** PORTABLE MESSAGE FUNCTIONS (TQt Version) ******************* *******************************************************************************/ -class KGrMessage : public QDialog +class KGrMessage : public TQDialog { public: - static void information (TQWidget * parent, const TQString &caption, const TQString &text); - static int warning (TQWidget * parent, TQString caption, TQString text, + static void information (TQWidget * tqparent, const TQString &caption, const TQString &text); + static int warning (TQWidget * tqparent, TQString caption, TQString text, TQString label0, TQString label1, TQString label2 = ""); - static void wrapped (TQWidget * parent, TQString caption, TQString text); + static void wrapped (TQWidget * tqparent, TQString caption, TQString text); }; #endif |