diff options
Diffstat (limited to 'lib/kofficeui/KoTooluButton.cpp')
-rw-r--r-- | lib/kofficeui/KoTooluButton.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp index 7260bbea..abe449b2 100644 --- a/lib/kofficeui/KoTooluButton.cpp +++ b/lib/kofficeui/KoTooluButton.cpp @@ -53,12 +53,12 @@ KoColorPanel::~KoColorPanel() { } -TQSize KoColorPanel::tqsizeHint() const +TQSize KoColorPanel::sizeHint() const { - return tqminimumSizeHint(); + return minimumSizeHint(); } -TQSize KoColorPanel::tqminimumSizeHint() const +TQSize KoColorPanel::minimumSizeHint() const { return TQSize( COLS << 4, lines() << 4 ); } @@ -109,7 +109,7 @@ void KoColorPanel::clear() if ( m_colorMap.isEmpty() ) return; - TQSize area( tqminimumSizeHint() ); + TQSize area( minimumSizeHint() ); m_colorMap.clear(); init(); updateGeometry(); @@ -136,7 +136,7 @@ void KoColorPanel::insertDefaultColors() return; m_defaultsAdded = true; - int currentRow = m_nextPosition.y; // we have to tqrepaint this row below + int currentRow = m_nextPosition.y; // we have to repaint this row below // Note: No checking for duplicates, so take care when you modify that list insertColor(TQColor( 255 , 0 , 0 ), i18n( "color", "Red" ), false); @@ -294,9 +294,9 @@ void KoColorPanel::insertDefaultColors() insertColor(TQColor( 0 , 0 , 205 ), i18n( "color", "MediumBlue" ), false); insertColor(TQColor( 0 , 0 , 128 ), i18n( "color", "Navy" ), false); - finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we tqrepaint anyway + finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we repaint anyway updateGeometry(); - // we have to tqrepaint the "old" current row explicitly due + // we have to repaint the "old" current row explicitly due // to WStaticContents update( 0, currentRow << 4, COLS << 4, 16 ); } @@ -369,7 +369,7 @@ void KoColorPanel::paintEvent( TQPaintEvent* e ) if ( hasFocus() && m_focusPosition.x != -1 && m_focusPosition.y != -1 && mapFromPosition( m_focusPosition ).intersects( e->rect() ) ) tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ), - tqcolorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); + colorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); --lns; // Attention: We just avoid some lns - 1 statements @@ -580,7 +580,7 @@ void KoColorPanel::updateFocusPosition( const Position& newPosition ) if ( it != m_colorMap.end() ) { // draw at the new focus position tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ), - tqcolorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); + colorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); p.fillRect( ( m_focusPosition.x << 4 ) + 2, ( m_focusPosition.y << 4 ) + 2, 12, 12, it.data() ); } @@ -663,21 +663,21 @@ KoToolButton::~KoToolButton() { } -TQSize KoToolButton::tqsizeHint() const +TQSize KoToolButton::sizeHint() const { - return tqminimumSizeHint(); + return minimumSizeHint(); } -TQSize KoToolButton::tqminimumSizeHint() const +TQSize KoToolButton::minimumSizeHint() const { - TQSize size = KToolBarButton::tqminimumSizeHint(); + TQSize size = KToolBarButton::minimumSizeHint(); size.setWidth( size.width() + ARROW_WIDTH ); return size; } -TQSize KoToolButton::tqminimumSize() const +TQSize KoToolButton::minimumSize() const { - return tqminimumSizeHint(); + return minimumSizeHint(); } void KoToolButton::colorSelected( const TQColor& color ) @@ -691,7 +691,7 @@ void KoToolButton::drawButton(TQPainter *_painter) TQStyle::SCFlags active = TQStyle::SC_None; TQStyle::SCFlags arrowActive = TQStyle::SC_None; TQStyleOption opt; - TQColorGroup cg( tqcolorGroup() ); + TQColorGroup cg( colorGroup() ); if ( isEnabled() ) { flags |= TQStyle::Style_Enabled; @@ -712,10 +712,10 @@ void KoToolButton::drawButton(TQPainter *_painter) // Draw styled toolbuttons _painter->setClipRect( 0, 0, width() - ARROW_WIDTH, height() ); - tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( 0, 0, width() - ARROW_WIDTH, height() ), cg, + tqstyle().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( 0, 0, width() - ARROW_WIDTH, height() ), cg, flags, TQStyle::SC_ToolButton, active, opt ); _painter->setClipRect( width() - ARROW_WIDTH, 0, ARROW_WIDTH, height() ); - tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( width(), 0, ARROW_WIDTH, height() ), cg, + tqstyle().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( width(), 0, ARROW_WIDTH, height() ), cg, arrowFlags, TQStyle::SC_ToolButton, arrowActive, opt ); _painter->setClipping( false ); @@ -724,7 +724,7 @@ void KoToolButton::drawButton(TQPainter *_painter) cg, flags, opt ); if ( KToolBarButton::isRaised() || m_arrowPressed ) - qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, tqcolorGroup(), true ); + qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, colorGroup(), true ); int dx, dy; TQFont tmp_font( KGlobalSettings::toolBarFont() ); @@ -798,11 +798,11 @@ void KoToolButton::drawButton(TQPainter *_painter) if (!textLabel().isNull() && !textRect.isNull()) { _painter->setFont( KGlobalSettings::toolBarFont() ); if ( !isEnabled() ) - _painter->setPen( tqpalette().disabled().dark() ); + _painter->setPen( palette().disabled().dark() ); else if( KToolBarButton::isRaised() ) _painter->setPen( KGlobalSettings::toolBarHighlightColor() ); else - _painter->setPen( tqcolorGroup().buttonText() ); + _painter->setPen( colorGroup().buttonText() ); _painter->drawText( textRect, textFlags, textLabel() ); } } @@ -838,15 +838,15 @@ void KoToolButton::init() // We are interested in the mouse clicks on the arrow button m_popup->installEventFilter( this ); - ARROW_WIDTH = tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator) + 4; + ARROW_WIDTH = tqstyle().pixelMetric(TQStyle::PM_MenuButtonIndicator) + 4; kdDebug() << "##################### Arrow: " << ARROW_WIDTH << endl; } void KoToolButton::buttonShift( int& dx, int& dy ) { if ( isDown() && !m_arrowPressed ) { - dx += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ); - dy += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ); + dx += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ); + dy += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical ); } } |