From c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:56:31 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 94844816550ad672ccfcdc25659c625546239998. --- lib/kofficeui/tktoolbarbutton.cpp | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'lib/kofficeui/tktoolbarbutton.cpp') diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp index 5f829589..b0520a2c 100644 --- a/lib/kofficeui/tktoolbarbutton.cpp +++ b/lib/kofficeui/tktoolbarbutton.cpp @@ -182,7 +182,7 @@ void TKToolBarButton::setEnabled( bool enabled ) void TKToolBarButton::setText( const TQString& text) { d->m_text = text; - repaint(false); + tqrepaint(false); } void TKToolBarButton::setIcon( const TQString& icon ) @@ -281,7 +281,7 @@ void TKToolBarButton::setDelayedPopup (TQPopupMenu *p, bool toggle ) void TKToolBarButton::setRaised(bool f) { d->m_isRaised = f; - repaint(false); + tqrepaint(false); } void TKToolBarButton::setAutoRaised(bool f) @@ -308,7 +308,7 @@ void TKToolBarButton::enterEvent(TQEvent *) } else { TQToolButton::setPixmap(disabledPixmap); } - repaint(false); + tqrepaint(false); } } @@ -332,7 +332,7 @@ bool TKToolBarButton::eventFilter(TQObject *o, TQEvent *ev) case TQEvent::Hide: on(false); setDown(false); - if ( !geometry().contains(parentWidget()->mapFromGlobal(TQCursor::pos())) ) + if ( !tqgeometry().contains(parentWidget()->mapFromGlobal(TQCursor::pos())) ) leaveEvent(0L); return false; break; @@ -353,14 +353,14 @@ void TKToolBarButton::drawButton( TQPainter* p ) #define DRAW_PIXMAP_AND_TEXT \ int x = 3;\ if (pixmap()) {\ - tqstyle().drawItem( p, TQRect( x, 0, pixmap()->width(), height() ), AlignCenter, colorGroup(), isEnabled(), pixmap(), TQString() );\ + tqstyle().drawItem( p, TQRect( x, 0, pixmap()->width(), height() ), AlignCenter, tqcolorGroup(), isEnabled(), pixmap(), TQString() );\ if (d->m_iconMode==TK::IconAndText && !d->m_text.isEmpty()) {\ x += pixmap()->width() + 3;\ }\ }\ if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty()) {\ TQFontMetrics fm(KGlobalSettings::toolBarFont());\ - tqstyle().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, colorGroup(), isEnabled(), 0, d->m_text );\ + tqstyle().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, tqcolorGroup(), isEnabled(), 0, d->m_text );\ } const char* arrow[] = { @@ -384,20 +384,20 @@ void TKToolBarButton::drawButton( TQPainter* p ) if (d->m_isRaised) flags |= TQStyle::Style_Raised; if (hasFocus()) flags |= TQStyle::Style_HasFocus; - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( 0, 0, width()-12, height() ), colorGroup(), flags, TQStyle::SC_ToolButton ); - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( width()-13, 0, 13, height() ), colorGroup(), flags, TQStyle::SC_ToolButton ); - tqstyle().drawItem( p, TQRect( width()-13, 0, 13, height() ), AlignCenter, colorGroup(), isEnabled(), &arrow_pix, TQString() ); + tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( 0, 0, width()-12, height() ), tqcolorGroup(), flags, TQStyle::SC_ToolButton ); + tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( width()-13, 0, 13, height() ), tqcolorGroup(), flags, TQStyle::SC_ToolButton ); + tqstyle().drawItem( p, TQRect( width()-13, 0, 13, height() ), AlignCenter, tqcolorGroup(), isEnabled(), &arrow_pix, TQString() ); if ( d->m_isRaised ) - qDrawShadeLine( p, width()-12, 0, width()-12, height(), colorGroup(), true ); + qDrawShadeLine( p, width()-12, 0, width()-12, height(), tqcolorGroup(), true ); DRAW_PIXMAP_AND_TEXT } else { - tqstyle().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : palette().disabled(), f ); + tqstyle().tqdrawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? tqcolorGroup() : tqpalette().disabled(), f ); DRAW_PIXMAP_AND_TEXT int z = f ? 1:0; p->drawPixmap(width()-11+z,(height()-4)/2+z ,arrow_pix); } } else { - tqstyle().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : palette().disabled(), f ); + tqstyle().tqdrawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? tqcolorGroup() : tqpalette().disabled(), f ); DRAW_PIXMAP_AND_TEXT } } @@ -409,7 +409,7 @@ void TKToolBarButton::paletteChange(const TQPalette &) TQToolButton::setPixmap( disabledPixmap ); else TQToolButton::setPixmap( defaultPixmap ); - repaint(false); + tqrepaint(false); } void TKToolBarButton::makeDefaultPixmap() @@ -430,14 +430,14 @@ void TKToolBarButton::makeDisabledPixmap() disabledPixmap = effect.apply(activePixmap, KIcon::Toolbar, KIcon::DisabledState); } -TQSize TKToolBarButton::sizeHint() const +TQSize TKToolBarButton::tqsizeHint() const { - return minimumSize(); + return tqminimumSize(); } -TQSize TKToolBarButton::minimumSizeHint() const +TQSize TKToolBarButton::tqminimumSizeHint() const { - return minimumSize(); + return tqminimumSize(); } void TKToolBarButton::showMenu() @@ -502,7 +502,7 @@ void TKToolBarButton::slotToggled() void TKToolBarButton::on(bool flag) { d->m_isOn = flag; - repaint(); + tqrepaint(); } void TKToolBarButton::toggle() @@ -519,14 +519,14 @@ void TKToolBarButton::setToggle(bool flag) disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); modeChange(); - repaint(); + tqrepaint(); } void TKToolBarButton::setIconMode( TK::IconMode m ) { d->m_iconMode = m; modeChange(); - repaint(); + tqrepaint(); } #include -- cgit v1.2.1