diff options
Diffstat (limited to 'src/common/gui/misc_gui.h')
-rw-r--r-- | src/common/gui/misc_gui.h | 86 |
1 files changed, 46 insertions, 40 deletions
diff --git a/src/common/gui/misc_gui.h b/src/common/gui/misc_gui.h index 2d58569..7003f91 100644 --- a/src/common/gui/misc_gui.h +++ b/src/common/gui/misc_gui.h @@ -9,12 +9,12 @@ #ifndef MISC_GUI_H #define MISC_GUI_H -#include <qlayout.h> -#include <qsplitter.h> -#include <qvaluevector.h> -#include <qvalidator.h> -#include <qcombobox.h> -#include <qwidgetstack.h> +#include <tqlayout.h> +#include <tqsplitter.h> +#include <tqvaluevector.h> +#include <tqvalidator.h> +#include <tqcombobox.h> +#include <tqwidgetstack.h> #include <klocale.h> #include <kpushbutton.h> @@ -29,11 +29,11 @@ class KAction; #include "common/common/number.h" //----------------------------------------------------------------------------- -class BusyCursor +class PBusyCursor { public: - BusyCursor() { start(); } - ~BusyCursor() { stop(); } + PBusyCursor() { start(); } + ~PBusyCursor() { stop(); } static void start(); static void stop(); static void pause(); @@ -46,32 +46,33 @@ private: //----------------------------------------------------------------------------- namespace MessageBox { -extern void information(const QString &text, Log::ShowMode show, const QString &dontShowAgainName = QString::null); -extern void detailedSorry(const QString &text, const QString &details, Log::ShowMode show); -inline void sorry(const QString &text, Log::ShowMode show) { detailedSorry(text, QString::null, show); } -extern bool askContinue(const QString &text, const KGuiItem &continueButton = KStdGuiItem::cont(), - const QString &caption = i18n("Warning")); -extern bool questionYesNo(const QString &text, const KGuiItem &yesButton, const KGuiItem &noButton, - const QString &caption = i18n("Warning")); +extern void information(const TQString &text, Log::ShowMode show, const TQString &dontShowAgainName = TQString()); +extern void detailedSorry(const TQString &text, const TQString &details, Log::ShowMode show); +inline void sorry(const TQString &text, Log::ShowMode show) { detailedSorry(text, TQString(), show); } +extern bool askContinue(const TQString &text, const KGuiItem &continueButton = KStdGuiItem::cont(), + const TQString &caption = i18n("Warning")); +extern bool questionYesNo(const TQString &text, const KGuiItem &yesButton, const KGuiItem &noButton, + const TQString &caption = i18n("Warning")); enum Result { Yes, No, Cancel }; -extern Result questionYesNoCancel(const QString &text, const KGuiItem &yesButton, const KGuiItem &noButton, - const QString &caption = i18n("Warning")); -extern void text(const QString &text, Log::ShowMode show); +extern Result questionYesNoCancel(const TQString &text, const KGuiItem &yesButton, const KGuiItem &noButton, + const TQString &caption = i18n("Warning")); +extern void text(const TQString &text, Log::ShowMode show); } //---------------------------------------------------------------------------- class PopupButton : public KPushButton { Q_OBJECT + TQ_OBJECT public: - PopupButton(QWidget *parent = 0, const char *name = 0); - PopupButton(const QString &text, QWidget *parent = 0, const char *name = 0); + PopupButton(TQWidget *tqparent = 0, const char *name = 0); + PopupButton(const TQString &text, TQWidget *tqparent = 0, const char *name = 0); void appendAction(KAction *action); - void appendAction(const QString &label, const QString &icon = QString::null, - QObject *receiver = 0, const char *slot = 0); - int appendItem(const QString &label, uint id) { return appendItem(label, QPixmap(), id); } - int appendItem(const QString &label, const QString &icon, int id = -1); - int appendItem(const QString &label, const QPixmap &icon, int id = -1); + void appendAction(const TQString &label, const TQString &icon = TQString(), + TQObject *receiver = 0, const char *slot = 0); + int appendItem(const TQString &label, uint id) { return appendItem(label, TQPixmap(), id); } + int appendItem(const TQString &label, const TQString &icon, int id = -1); + int appendItem(const TQString &label, const TQPixmap &icon, int id = -1); void appendSeparator() { _separator = true; } signals: @@ -84,19 +85,20 @@ private: }; //----------------------------------------------------------------------------- -class Splitter : public QSplitter +class Splitter : public TQSplitter { Q_OBJECT + TQ_OBJECT public: - Splitter(const QValueList<int> &defaultSizes, Orientation orientation, - QWidget *parent, const char *name); + Splitter(const TQValueList<int> &defaultSizes, Qt::Orientation orientation, + TQWidget *tqparent, const char *name); virtual ~Splitter(); private slots: void updateSizes(); private: - QValueList<int> _defaultSizes; + TQValueList<int> _defaultSizes; }; //----------------------------------------------------------------------------- @@ -107,12 +109,13 @@ public: }; //----------------------------------------------------------------------------- -class SeparatorWidget : public QFrame +class SeparatorWidget : public TQFrame { Q_OBJECT + TQ_OBJECT public: - SeparatorWidget(QWidget *parent) : QFrame(parent, "separator") { - setFrameStyle(QFrame::Panel | QFrame::Sunken); + SeparatorWidget(TQWidget *tqparent) : TQFrame(tqparent, "separator") { + setFrameStyle(TQFrame::Panel | TQFrame::Sunken); setMargin(2); setFixedHeight(2*2); } @@ -122,11 +125,12 @@ public: class TabBar : public KTabBar { Q_OBJECT + TQ_OBJECT public: - TabBar(QWidget *parent = 0, const char *name = 0); + TabBar(TQWidget *tqparent = 0, const char *name = 0); protected: - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); private: bool _ignoreWheelEvent; @@ -137,25 +141,27 @@ private: class TabWidget : public KTabWidget { Q_OBJECT + TQ_OBJECT public: - TabWidget(QWidget *parent = 0, const char *name = 0); + TabWidget(TQWidget *tqparent = 0, const char *name = 0); void setIgnoreWheelEvent(bool ignore); protected: - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); void setTabBar(TabBar *tabbar); }; //----------------------------------------------------------------------------- -class ComboBox : public QComboBox +class ComboBox : public TQComboBox { Q_OBJECT + TQ_OBJECT public: - ComboBox(QWidget *parent = 0, const char *name = 0); + ComboBox(TQWidget *tqparent = 0, const char *name = 0); void setIgnoreWheelEvent(bool ignore) { _ignoreWheelEvent = ignore; } protected: - virtual void wheelEvent(QWheelEvent *e); + virtual void wheelEvent(TQWheelEvent *e); private: bool _ignoreWheelEvent; |