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 abe449b2..7260bbea 100644 --- a/lib/kofficeui/KoTooluButton.cpp +++ b/lib/kofficeui/KoTooluButton.cpp @@ -53,12 +53,12 @@ KoColorPanel::~KoColorPanel() { } -TQSize KoColorPanel::sizeHint() const +TQSize KoColorPanel::tqsizeHint() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } -TQSize KoColorPanel::minimumSizeHint() const +TQSize KoColorPanel::tqminimumSizeHint() const { return TQSize( COLS << 4, lines() << 4 ); } @@ -109,7 +109,7 @@ void KoColorPanel::clear() if ( m_colorMap.isEmpty() ) return; - TQSize area( minimumSizeHint() ); + TQSize area( tqminimumSizeHint() ); m_colorMap.clear(); init(); updateGeometry(); @@ -136,7 +136,7 @@ void KoColorPanel::insertDefaultColors() return; m_defaultsAdded = true; - int currentRow = m_nextPosition.y; // we have to repaint this row below + int currentRow = m_nextPosition.y; // we have to tqrepaint 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 repaint anyway + finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we tqrepaint anyway updateGeometry(); - // we have to repaint the "old" current row explicitly due + // we have to tqrepaint 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 ), - colorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); + tqcolorGroup(), 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 ), - colorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); + tqcolorGroup(), 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::sizeHint() const +TQSize KoToolButton::tqsizeHint() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } -TQSize KoToolButton::minimumSizeHint() const +TQSize KoToolButton::tqminimumSizeHint() const { - TQSize size = KToolBarButton::minimumSizeHint(); + TQSize size = KToolBarButton::tqminimumSizeHint(); size.setWidth( size.width() + ARROW_WIDTH ); return size; } -TQSize KoToolButton::minimumSize() const +TQSize KoToolButton::tqminimumSize() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } 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( colorGroup() ); + TQColorGroup cg( tqcolorGroup() ); 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().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( 0, 0, width() - ARROW_WIDTH, height() ), cg, + tqstyle().tqdrawComplexControl( 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().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( width(), 0, ARROW_WIDTH, height() ), cg, + tqstyle().tqdrawComplexControl( 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, colorGroup(), true ); + qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, tqcolorGroup(), 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( palette().disabled().dark() ); + _painter->setPen( tqpalette().disabled().dark() ); else if( KToolBarButton::isRaised() ) _painter->setPen( KGlobalSettings::toolBarHighlightColor() ); else - _painter->setPen( colorGroup().buttonText() ); + _painter->setPen( tqcolorGroup().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().pixelMetric(TQStyle::PM_MenuButtonIndicator) + 4; + ARROW_WIDTH = tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator) + 4; kdDebug() << "##################### Arrow: " << ARROW_WIDTH << endl; } void KoToolButton::buttonShift( int& dx, int& dy ) { if ( isDown() && !m_arrowPressed ) { - dx += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ); - dy += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical ); + dx += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ); + dy += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ); } } |