diff options
Diffstat (limited to 'kexi/widget/kexismalltoolbutton.cpp')
-rw-r--r-- | kexi/widget/kexismalltoolbutton.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/kexi/widget/kexismalltoolbutton.cpp b/kexi/widget/kexismalltoolbutton.cpp index 085d4847..94a088a0 100644 --- a/kexi/widget/kexismalltoolbutton.cpp +++ b/kexi/widget/kexismalltoolbutton.cpp @@ -19,38 +19,38 @@ #include "kexismalltoolbutton.h" -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qstyle.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqstyle.h> #include <kiconloader.h> #include <kglobalsettings.h> #include <core/kexi.h> -KexiSmallToolButton::KexiSmallToolButton(QWidget* parent, const QString& text, - const QString& icon, const char* name) - : QToolButton(parent, name) +KexiSmallToolButton::KexiSmallToolButton(TQWidget* tqparent, const TQString& text, + const TQString& icon, const char* name) + : TQToolButton(tqparent, name) { init(); update(text, SmallIconSet(icon)); } -KexiSmallToolButton::KexiSmallToolButton(QWidget* parent, const QString& text, - const QIconSet& iconSet, const char* name) - : QToolButton(parent, name) +KexiSmallToolButton::KexiSmallToolButton(TQWidget* tqparent, const TQString& text, + const TQIconSet& iconSet, const char* name) + : TQToolButton(tqparent, name) { init(); update(text, iconSet); } -KexiSmallToolButton::KexiSmallToolButton(QWidget* parent, KAction* action) - : QToolButton(parent, action->name()) +KexiSmallToolButton::KexiSmallToolButton(TQWidget* tqparent, KAction* action) + : TQToolButton(tqparent, action->name()) , m_action(action) { init(); - connect(this, SIGNAL(clicked()), action, SLOT(activate())); - connect(action, SIGNAL(enabled(bool)), this, SLOT(setEnabled(bool))); + connect(this, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate())); + connect(action, TQT_SIGNAL(enabled(bool)), this, TQT_SLOT(setEnabled(bool))); updateAction(); } @@ -64,21 +64,21 @@ void KexiSmallToolButton::updateAction() return; update(m_action->text(), m_action->iconSet(KIcon::Small)); setAccel(m_action->shortcut()); - QToolTip::add(this, m_action->toolTip()); - QWhatsThis::add(this, m_action->whatsThis()); + TQToolTip::add(this, m_action->toolTip()); + TQWhatsThis::add(this, m_action->whatsThis()); } void KexiSmallToolButton::init() { - setPaletteBackgroundColor(palette().active().background()); - setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred); - QFont f(KGlobalSettings::toolBarFont()); + setPaletteBackgroundColor(tqpalette().active().background()); + tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + TQFont f(KGlobalSettings::toolBarFont()); f.setPixelSize(Kexi::smallFont().pixelSize()); setFont(f); setAutoRaise(true); } -void KexiSmallToolButton::update(const QString& text, const QIconSet& iconSet, bool tipToo) +void KexiSmallToolButton::update(const TQString& text, const TQIconSet& iconSet, bool tipToo) { int width = 0; if (text.isEmpty()) { @@ -86,47 +86,47 @@ void KexiSmallToolButton::update(const QString& text, const QIconSet& iconSet, b setUsesTextLabel(false); } else { - width += QFontMetrics(font()).width(text+" "); + width += TQFontMetrics(font()).width(text+" "); setUsesTextLabel(true); - setTextPosition(QToolButton::Right); - QToolButton::setTextLabel(text, tipToo); + setTextPosition(TQToolButton::Right); + TQToolButton::setTextLabel(text, tipToo); } if (!iconSet.isNull()) { width += IconSize(KIcon::Small); - QToolButton::setIconSet(iconSet); + TQToolButton::setIconSet(iconSet); } setFixedWidth( width ); } -void KexiSmallToolButton::setIconSet( const QIconSet& iconSet ) +void KexiSmallToolButton::setIconSet( const TQIconSet& iconSet ) { update(textLabel(), iconSet); } -void KexiSmallToolButton::setIconSet( const QString& icon ) +void KexiSmallToolButton::setIconSet( const TQString& icon ) { setIconSet( SmallIconSet(icon) ); } -void KexiSmallToolButton::setTextLabel( const QString & newLabel, bool tipToo ) +void KexiSmallToolButton::setTextLabel( const TQString & newLabel, bool tipToo ) { Q_UNUSED( tipToo ); update(newLabel, iconSet()); } -void KexiSmallToolButton::drawButton( QPainter *_painter ) +void KexiSmallToolButton::drawButton( TQPainter *_painter ) { - QToolButton::drawButton(_painter); - if (QToolButton::popup()) { - QStyle::SFlags arrowFlags = QStyle::Style_Default; + TQToolButton::drawButton(_painter); + if (TQToolButton::popup()) { + TQStyle::SFlags arrowFlags = TQStyle::Style_Default; if (isDown()) - arrowFlags |= QStyle::Style_Down; + arrowFlags |= TQStyle::Style_Down; if (isEnabled()) - arrowFlags |= QStyle::Style_Enabled; - style().drawPrimitive(QStyle::PE_ArrowDown, _painter, - QRect(width()-7, height()-7, 5, 5), colorGroup(), - arrowFlags, QStyleOption() ); + arrowFlags |= TQStyle::Style_Enabled; + tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter, + TQRect(width()-7, height()-7, 5, 5), tqcolorGroup(), + arrowFlags, TQStyleOption() ); } } |