From 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 30 Jun 2011 00:15:53 +0000 Subject: TQt4 port piklab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/common/gui/dialog.h | 53 ++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 25 deletions(-) (limited to 'src/common/gui/dialog.h') diff --git a/src/common/gui/dialog.h b/src/common/gui/dialog.h index 1227a7d..bc95d81 100644 --- a/src/common/gui/dialog.h +++ b/src/common/gui/dialog.h @@ -9,7 +9,7 @@ #ifndef DIALOG_H #define DIALOG_H -#include +#include #include #include @@ -17,51 +17,53 @@ class Dialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - Dialog(QWidget *parent, const char *name, bool modal, - const QString &caption, int buttonMask, ButtonCode defaultButton, bool separator, - const QSize &defaultSize = QSize()); - Dialog(DialogType type, const QString &caption, - int buttonMask, ButtonCode defaultButton, QWidget *parent, const char *name, - bool modal, bool separator, const QSize &defaultSize = QSize()); + Dialog(TQWidget *tqparent, const char *name, bool modal, + const TQString &caption, int buttonMask, ButtonCode defaultButton, bool separator, + const TQSize &defaultSize = TQSize()); + Dialog(DialogType type, const TQString &caption, + int buttonMask, ButtonCode defaultButton, TQWidget *tqparent, const char *name, + bool modal, bool separator, const TQSize &defaultSize = TQSize()); virtual ~Dialog(); private slots: void updateSize(); private: - QSize _defaultSize; + TQSize _defaultSize; }; //----------------------------------------------------------------------------- class TreeListDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - TreeListDialog(QWidget *parent, const char *name, bool modal, - const QString &caption, int buttonMask, ButtonCode defaultButton, bool separator); - QWidget *addPage(const QStringList &labels); - void showPage(QWidget *page); + TreeListDialog(TQWidget *tqparent, const char *name, bool modal, + const TQString &caption, int buttonMask, ButtonCode defaultButton, bool separator); + TQWidget *addPage(const TQStringList &labels); + void showPage(TQWidget *page); int activePageIndex() const; - int pageIndex(QWidget *page) const; + int pageIndex(TQWidget *page) const; protected slots: - virtual void currentChanged(QListViewItem *item); - void pageDestroyed(QObject *page); + virtual void currentChanged(TQListViewItem *item); + void pageDestroyed(TQObject *page); protected: - QFrame *_frame; + TQFrame *_frame; KListView *_listView; - QHBoxLayout *_titleBox; - QLabel *_label; - QWidgetStack *_stack; + TQHBoxLayout *_titleBox; + TQLabel *_label; + TQWidgetStack *_stack; class Item : public KListViewItem { public: - Item(const QString &label, QWidget *page, const QString &title, QListView *listview); - Item(const QString &label, QWidget *page, const QString &title, QListViewItem *item); - QWidget *_page; - QString _title; + Item(const TQString &label, TQWidget *page, const TQString &title, TQListView *listview); + Item(const TQString &label, TQWidget *page, const TQString &title, TQListViewItem *item); + TQWidget *_page; + TQString _title; }; }; @@ -69,9 +71,10 @@ protected: class TextEditorDialog : public Dialog { Q_OBJECT + TQ_OBJECT public: - TextEditorDialog(const QString &text, const QString &caption, - bool wrapAtWidgetWidth, QWidget *parent); + TextEditorDialog(const TQString &text, const TQString &caption, + bool wrapAtWidgetWidth, TQWidget *tqparent); }; #endif -- cgit v1.2.1