diff options
Diffstat (limited to 'malloryclient/mallorybutton.cpp')
-rw-r--r-- | malloryclient/mallorybutton.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/malloryclient/mallorybutton.cpp b/malloryclient/mallorybutton.cpp index ede2e7b..225bae3 100644 --- a/malloryclient/mallorybutton.cpp +++ b/malloryclient/mallorybutton.cpp @@ -10,9 +10,9 @@ // // -#include <qtooltip.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqtooltip.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include "enums.h" #include "mallorybutton.h" @@ -21,9 +21,9 @@ #include "embeddata.h" -MalloryButton::MalloryButton(MalloryClient *parent, const char *name, const QString& tip, ButtonType type) : QButton(parent->widget(), name), m_client(parent), m_lastMouse(0), m_type(type), hover(false), isOnAllDesktops(false), isMaximized(false) +MalloryButton::MalloryButton(MalloryClient *parent, const char *name, const TQString& tip, ButtonType type) : TQButton(parent->widget(), name), m_client(parent), m_lastMouse(0), m_type(type), hover(false), isOnAllDesktops(false), isMaximized(false) { - QToolTip::add(this, tip); + TQToolTip::add(this, tip); setCursor(arrowCursor); setBackgroundMode(NoBackground); setFixedSize(MalloryHandler::buttonSize(), MalloryHandler::buttonSize()); @@ -34,46 +34,46 @@ MalloryButton::~MalloryButton() { } -void MalloryButton::setTipText(const QString &tip) +void MalloryButton::setTipText(const TQString &tip) { - QToolTip::remove(this); - QToolTip::add(this, tip); + TQToolTip::remove(this); + TQToolTip::add(this, tip); } -QSize MalloryButton::sizeHint() const // MXLS +TQSize MalloryButton::sizeHint() const // MXLS { - return QSize(MalloryHandler::buttonSize(), MalloryHandler::buttonSize()); + return TQSize(MalloryHandler::buttonSize(), MalloryHandler::buttonSize()); } -void MalloryButton::enterEvent(QEvent *e) +void MalloryButton::enterEvent(TQEvent *e) { hover = true; repaint(false); - QButton::enterEvent(e); + TQButton::enterEvent(e); } -void MalloryButton::leaveEvent(QEvent *e) +void MalloryButton::leaveEvent(TQEvent *e) { hover = false; repaint(false); - QButton::enterEvent(e); + TQButton::enterEvent(e); } -void MalloryButton::mousePressEvent(QMouseEvent *e) +void MalloryButton::mousePressEvent(TQMouseEvent *e) { m_lastMouse = e->button(); - QMouseEvent me(e->type(), e->pos(), e->globalPos(), LeftButton, e->state()); - QButton::mousePressEvent(&me); + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), LeftButton, e->state()); + TQButton::mousePressEvent(&me); } -void MalloryButton::mouseReleaseEvent(QMouseEvent *e) +void MalloryButton::mouseReleaseEvent(TQMouseEvent *e) { m_lastMouse = e->button(); - QMouseEvent me(e->type(), e->pos(), e->globalPos(), LeftButton, e->state()); - QButton::mouseReleaseEvent(&me); + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), LeftButton, e->state()); + TQButton::mouseReleaseEvent(&me); } -void MalloryButton::drawButton(QPainter *painter) +void MalloryButton::drawButton(TQPainter *painter) { if (!MalloryHandler::initialized()) return; @@ -86,17 +86,17 @@ void MalloryButton::drawButton(QPainter *painter) // Crush the bug the hard way! if (ofy < 2) - ofy = 2; + ofy = 2; - QPixmap pufferPixmap; + TQPixmap pufferPixmap; pufferPixmap.resize(buttonSize, buttonSize); - QPainter pufferPainter(&pufferPixmap); + TQPainter pufferPainter(&pufferPixmap); pufferPainter.drawPixmap(0, 0, active ? *Pixmaps::active_button_ground : *Pixmaps::inactive_button_ground); if (m_type == ButtonMenu) { - QPixmap menu_icon = m_client->icon().pixmap(QIconSet::Small, QIconSet::Normal); + TQPixmap menu_icon = m_client->icon().pixmap(TQIconSet::Small, TQIconSet::Normal); pufferPainter.drawPixmap(ofx, ofy, menu_icon); } else |