diff options
Diffstat (limited to 'lib/kofficeui/tktoolbarbutton.h')
-rw-r--r-- | lib/kofficeui/tktoolbarbutton.h | 67 |
1 files changed, 34 insertions, 33 deletions
diff --git a/lib/kofficeui/tktoolbarbutton.h b/lib/kofficeui/tktoolbarbutton.h index a4724672..680c19b1 100644 --- a/lib/kofficeui/tktoolbarbutton.h +++ b/lib/kofficeui/tktoolbarbutton.h @@ -22,23 +22,24 @@ #include <tkaction.h> -#include <qpixmap.h> -#include <qtoolbutton.h> +#include <tqpixmap.h> +#include <tqtoolbutton.h> #include <kglobal.h> class KToolBar; class KInstance; -class QPopupMenu; -class QPainter; +class TQPopupMenu; +class TQPainter; -class TKToolBarButton : public QToolButton +class TKToolBarButton : public TQToolButton { Q_OBJECT + TQ_OBJECT public: - TKToolBarButton(const QString& icon, const QString& txt, - QWidget* parent = 0, const char *name=0L, + TKToolBarButton(const TQString& icon, const TQString& txt, + TQWidget* tqparent = 0, const char *name=0L, KInstance *_instance = KGlobal::instance()); - TKToolBarButton(const QPixmap&, const QString&, QWidget* parent=0, const char* name=0); + TKToolBarButton(const TQPixmap&, const TQString&, TQWidget* tqparent=0, const char* name=0); ~TKToolBarButton(); void setIconMode(TK::IconMode); @@ -60,7 +61,7 @@ public: * * @param pixmap The active pixmap */ - virtual void setPixmap(const QPixmap &pixmap); + virtual void setPixmap(const TQPixmap &pixmap); /** * Set the pixmap directly for this button. This pixmap should be @@ -73,7 +74,7 @@ public: * @param generate If true, then the other pixmaps will be * automatically generated using configurable effects */ - virtual void setPixmap(const QPixmap &pixmap, bool generate); + virtual void setPixmap(const TQPixmap &pixmap, bool generate); /** * Force the button to use this pixmap as the default one rather @@ -81,7 +82,7 @@ public: * * @param pixmap The pixmap to use as the default (normal) one */ - virtual void setDefaultPixmap(const QPixmap& pixmap); + virtual void setDefaultPixmap(const TQPixmap& pixmap); /** * Force the button to use this pixmap when disabled one rather then @@ -89,7 +90,7 @@ public: * * @param pixmap The pixmap to use when disabled */ - virtual void setDisabledPixmap(const QPixmap& pixmap); + virtual void setDisabledPixmap(const TQPixmap& pixmap); /** * Set the text for this button. The text will be either used as a @@ -97,8 +98,8 @@ public: * * @param text The button (or tooltip) text */ - virtual void setText(const QString &text); - QString text(); + virtual void setText(const TQString &text); + TQString text(); /** * Set the icon for this button. This icon should be the active @@ -108,7 +109,7 @@ public: * * @param icon The name of the active pixmap */ - virtual void setIcon(const QString &icon); + virtual void setIcon(const TQString &icon); /** * Force the button to use this icon as the default one rather @@ -116,7 +117,7 @@ public: * * @param icon The icon to use as the default (normal) one */ - virtual void setDefaultIcon(const QString& icon); + virtual void setDefaultIcon(const TQString& icon); /** * Force the button to use this icon when disabled one rather then @@ -124,7 +125,7 @@ public: * * @param icon The icon to use when disabled */ - virtual void setDisabledIcon(const QString& icon); + virtual void setDisabledIcon(const TQString& icon); /** * Turn this button on or off @@ -150,7 +151,7 @@ public: /** * Return a pointer to this button's popup menu (if it exists) */ - QPopupMenu *popup(); + TQPopupMenu *popup(); /** * Give this button a popup menu. There will not be a delay when @@ -159,7 +160,7 @@ public: * * @param p The new popup menu */ - void setPopup (QPopupMenu *p); + void setPopup (TQPopupMenu *p); /** * Gives this button a delayed popup menu. @@ -175,12 +176,12 @@ public: * @param p the new popup menu * @param toggle if true, makes the button "sticky" (toggled) */ - void setDelayedPopup(QPopupMenu *p, bool toggle = false); + void setDelayedPopup(TQPopupMenu *p, bool toggle = false); - QPixmap getActivePixmap() const; + TQPixmap getActivePixmap() const; - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; signals: void buttonClicked(); @@ -192,26 +193,26 @@ public slots: void modeChange(); protected: - void paletteChange(const QPalette &); - void leaveEvent(QEvent *e); - void enterEvent(QEvent *e); - void drawButton(QPainter *p); - bool eventFilter (QObject *o, QEvent *e); + void paletteChange(const TQPalette &); + void leaveEvent(TQEvent *e); + void enterEvent(TQEvent *e); + void drawButton(TQPainter *p); + bool eventFilter (TQObject *o, TQEvent *e); void showMenu(); void makeDefaultPixmap(); void makeDisabledPixmap(); - bool arrowPressed( const QPoint& pos ) { + bool arrowPressed( const TQPoint& pos ) { int x = pos.x(); int y = pos.y(); return (x > width() - 12 && x <= width() && y > 0 && y < height()); } private: - QPixmap defaultPixmap; - QPixmap activePixmap; - QPixmap disabledPixmap; - virtual void setIcon(const QPixmap &p) { QButton::setIcon(p); } + TQPixmap defaultPixmap; + TQPixmap activePixmap; + TQPixmap disabledPixmap; + virtual void setIcon(const TQPixmap &p) { TQButton::setIcon(p); } class TKToolBarButtonPrivate; TKToolBarButtonPrivate *d; |