diff options
Diffstat (limited to 'lib/kofficeui')
29 files changed, 148 insertions, 148 deletions
diff --git a/lib/kofficeui/KoCharSelectDia.cpp b/lib/kofficeui/KoCharSelectDia.cpp index c8b104a9..4095ae09 100644 --- a/lib/kofficeui/KoCharSelectDia.cpp +++ b/lib/kofficeui/KoCharSelectDia.cpp @@ -58,7 +58,7 @@ void KoCharSelectDia::initDialog(const TQChar &_chr, const TQString &_font, bool charSelect = new KCharSelect( page, "", _font, _chr ); connect(charSelect, TQT_SIGNAL(doubleClicked()),this, TQT_SLOT(slotDoubleClicked())); - charSelect->resize( charSelect->tqsizeHint() ); + charSelect->resize( charSelect->sizeHint() ); charSelect->enableFontCombo( true ); grid->addWidget( charSelect, 0, 0 ); diff --git a/lib/kofficeui/KoCommandHistory.cpp b/lib/kofficeui/KoCommandHistory.cpp index 27c51e79..9f071db9 100644 --- a/lib/kofficeui/KoCommandHistory.cpp +++ b/lib/kofficeui/KoCommandHistory.cpp @@ -53,7 +53,7 @@ void KoListBox::contentsMouseMoveEvent ( TQMouseEvent * e) } } -TQSize KoListBox::tqsizeHint() const +TQSize KoListBox::sizeHint() const { return TQSize(TQMIN(maxItemWidth() + verticalScrollBar()->width() + 4, 400), TQMIN(count() * itemHeight() + horizontalScrollBar()->height() + 4,300)); diff --git a/lib/kofficeui/KoCommandHistory.h b/lib/kofficeui/KoCommandHistory.h index 8522da3b..89b83744 100644 --- a/lib/kofficeui/KoCommandHistory.h +++ b/lib/kofficeui/KoCommandHistory.h @@ -39,7 +39,7 @@ public: KoListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); protected: virtual void contentsMouseMoveEvent ( TQMouseEvent * ); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; signals: void changeNumberOfSelectedItem( int ); }; diff --git a/lib/kofficeui/KoContextCelp.cpp b/lib/kofficeui/KoContextCelp.cpp index 82f786e8..2b1a2cbe 100644 --- a/lib/kofficeui/KoContextCelp.cpp +++ b/lib/kofficeui/KoContextCelp.cpp @@ -61,7 +61,7 @@ void KoVerticalLabel::paintEvent( TQPaintEvent* ) KPixmap pm; pm.resize( height(), width() ); TQPainter p( &pm ); - p.fillRect( 0, 0, height(), width(), tqcolorGroup().background() ); + p.fillRect( 0, 0, height(), width(), colorGroup().background() ); p.setFont( font() ); p.drawText( 0, 0, height(), width(), AlignCenter, m_text ); p.end(); @@ -90,9 +90,9 @@ void KoHelpNavButton::paintEvent( TQPaintEvent* ) if ( isEnabled() ) { if ( m_pressed ) - p.setPen( tqcolorGroup().highlight() ); + p.setPen( colorGroup().highlight() ); else - p.setPen( tqcolorGroup().text() ); + p.setPen( colorGroup().text() ); p.drawPixmap( 1, 1, m_bitmap ); } } // KoHelpNavButton::paintEvent @@ -142,9 +142,9 @@ void KoTinyButton::paintEvent( TQPaintEvent* ) if ( isEnabled() ) { if ( m_pressed ) - p.setPen( tqcolorGroup().highlight() ); + p.setPen( colorGroup().highlight() ); else - p.setPen( tqcolorGroup().text() ); + p.setPen( colorGroup().text() ); p.drawPixmap( width() / 2 - 2, 1, m_bitmap ); } } // KoTinyButton::paintEvent @@ -265,7 +265,7 @@ bool KoHelpView::eventFilter( TQObject*, TQEvent* e ) void KoHelpView::paintEvent( TQPaintEvent* ) { TQPainter p( this ); - currentText->draw( &p, 0, 0, TQRect(), tqcolorGroup() ); + currentText->draw( &p, 0, 0, TQRect(), colorGroup() ); } // KoHelpView::paintEvent KoHelpWidget::KoHelpWidget( TQString help, TQWidget* parent ) @@ -450,7 +450,7 @@ void KoContextHelpPopup::resizeEvent( TQResizeEvent* ) void KoContextHelpPopup::paintEvent( TQPaintEvent* ) { TQPainter p( this ); - p.fillRect( 0, 0, width(), height(), tqcolorGroup().light() ); + p.fillRect( 0, 0, width(), height(), colorGroup().light() ); p.setPen( black ); p.drawRect( 0, 0, width(), height() ); p.fillRect( width() - 3, 0, width() - 1, height() - 1, black ); diff --git a/lib/kofficeui/KoEditPath.cpp b/lib/kofficeui/KoEditPath.cpp index 19fd8c92..51afb24b 100644 --- a/lib/kofficeui/KoEditPath.cpp +++ b/lib/kofficeui/KoEditPath.cpp @@ -75,7 +75,7 @@ KoChangePathDia::KoChangePathDia( const TQString & _path, TQWidget *parent, cons TQVBox *page =makeVBoxMainWidget(); new TQLabel( i18n("Location:"), page); m_urlReq = new KURLRequester(page); - m_urlReq->setMinimumWidth( m_urlReq->tqsizeHint().width() * 3 ); + m_urlReq->setMinimumWidth( m_urlReq->sizeHint().width() * 3 ); m_urlReq->lineEdit()->setText( _path ); m_urlReq->fileDialog()->setMode(KFile::Directory | KFile::LocalOnly); diff --git a/lib/kofficeui/KoGeneralPropertyUi.ui b/lib/kofficeui/KoGeneralPropertyUi.ui index 688688c2..5d3d6e4f 100644 --- a/lib/kofficeui/KoGeneralPropertyUi.ui +++ b/lib/kofficeui/KoGeneralPropertyUi.ui @@ -157,7 +157,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>21</height> diff --git a/lib/kofficeui/KoGuides.cpp b/lib/kofficeui/KoGuides.cpp index 01f6e745..c11e6745 100644 --- a/lib/kofficeui/KoGuides.cpp +++ b/lib/kofficeui/KoGuides.cpp @@ -69,10 +69,10 @@ private: int m_pos; }; -const KoGuides::SnaptqStatus KoGuides::SNAP_NONE = 0; -const KoGuides::SnaptqStatus KoGuides::SNAP_HORIZ = 1; -const KoGuides::SnaptqStatus KoGuides::SNAP_VERT = 2; -const KoGuides::SnaptqStatus KoGuides::SNAP_BOTH = 3; +const KoGuides::SnapStatus KoGuides::SNAP_NONE = 0; +const KoGuides::SnapStatus KoGuides::SNAP_HORIZ = 1; +const KoGuides::SnapStatus KoGuides::SNAP_VERT = 2; +const KoGuides::SnapStatus KoGuides::SNAP_BOTH = 3; KoGuides::KoGuides( KoView *view, KoZoomHandler *zoomHandler ) : m_view( view ) @@ -365,11 +365,11 @@ void KoGuides::getGuideLines( TQValueList<double> &horizontalPos, TQValueList<do } -void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff ) +void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnapStatus &snapStatus, KoPoint &diff ) { - if( !(snaptqStatus & SNAP_VERT)) + if( !(snapStatus & SNAP_VERT)) diff.setX(10000); - if( !(snaptqStatus & SNAP_HORIZ)) + if( !(snapStatus & SNAP_HORIZ)) diff.setY(10000); for ( int i = 0; i < GL_END; ++i ) @@ -380,60 +380,60 @@ void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnaptqStatus &snaptqSta if ( ( *it )->orientation == Qt::Horizontal ) { double tmp = (*it)->position - rect.top(); - if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) + if ( snapStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) { if(TQABS( tmp ) < TQABS(diff.y())) { diff.setY( tmp ); - snaptqStatus |= SNAP_HORIZ; + snapStatus |= SNAP_HORIZ; } } tmp = (*it)->position - rect.bottom(); - if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) + if ( snapStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) { if(TQABS( tmp ) < TQABS(diff.y())) { diff.setY( tmp ); - snaptqStatus |= SNAP_HORIZ; + snapStatus |= SNAP_HORIZ; } } } else { double tmp = (*it)->position - rect.left(); - if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) + if ( snapStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) { if(TQABS( tmp ) < TQABS(diff.x())) { diff.setX( tmp ); - snaptqStatus |= SNAP_VERT; + snapStatus |= SNAP_VERT; } } tmp = (*it)->position - rect.right(); - if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) + if ( snapStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) { if(TQABS( tmp ) < TQABS(diff.x())) { diff.setX( tmp ); - snaptqStatus |= SNAP_VERT; + snapStatus |= SNAP_VERT; } } } } } - if(!(snaptqStatus & SNAP_VERT)) + if(!(snapStatus & SNAP_VERT)) diff.setX( 0 ); - if(!(snaptqStatus & SNAP_HORIZ)) + if(!(snapStatus & SNAP_HORIZ)) diff.setY( 0 ); } -void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff ) +void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus, KoPoint &diff ) { - if( !(snaptqStatus & SNAP_VERT)) + if( !(snapStatus & SNAP_VERT)) diff.setX(10000); - if( !(snaptqStatus & SNAP_HORIZ)) + if( !(snapStatus & SNAP_HORIZ)) diff.setY(10000); for ( int i = 0; i < GL_END; ++i ) @@ -444,34 +444,34 @@ void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnaptqStatus &snaptqSta if ( ( *it )->orientation == Qt::Horizontal ) { double tmp = (*it)->position - pos.y(); - if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) + if ( snapStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) { if(TQABS( tmp ) < TQABS(diff.y())) { diff.setY( tmp ); - snaptqStatus |= SNAP_HORIZ; + snapStatus |= SNAP_HORIZ; } } } else { double tmp = (*it)->position - pos.x(); - if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) + if ( snapStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) { if(TQABS( tmp ) < TQABS(diff.x())) { diff.setX( tmp ); - snaptqStatus |= SNAP_VERT; + snapStatus |= SNAP_VERT; } } } } } - if(!(snaptqStatus & SNAP_VERT)) + if(!(snapStatus & SNAP_VERT)) diff.setX( 0 ); - if(!(snaptqStatus & SNAP_HORIZ)) + if(!(snapStatus & SNAP_HORIZ)) diff.setY( 0 ); } @@ -530,7 +530,7 @@ void KoGuides::repaintSnapping( const KoRect &snappedRect ) } -void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnaptqStatus snaptqStatus ) +void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStatus ) { bool needRepaint = false; for ( int i = 0; i < GL_END; ++i ) @@ -538,7 +538,7 @@ void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnaptqStatus snaptq TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin(); for ( ; it != m_guideLines[i].end(); ++it ) { - if ( ( *it )->orientation == Qt::Horizontal && ( snaptqStatus & SNAP_HORIZ ) ) + if ( ( *it )->orientation == Qt::Horizontal && ( snapStatus & SNAP_HORIZ ) ) { if( virtuallyEqual( snappedPoint.y(), (*it)->position ) ) { @@ -556,7 +556,7 @@ void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnaptqStatus snaptq } else { - if ( snaptqStatus & SNAP_VERT ) + if ( snapStatus & SNAP_VERT ) { if( virtuallyEqual( snappedPoint.x(), (*it)->position ) ) { diff --git a/lib/kofficeui/KoGuides.h b/lib/kofficeui/KoGuides.h index b98b0472..7a28962f 100644 --- a/lib/kofficeui/KoGuides.h +++ b/lib/kofficeui/KoGuides.h @@ -58,8 +58,8 @@ public: */ void paintGuides( TQPainter &painter ); - typedef int SnaptqStatus; - static const SnaptqStatus SNAP_NONE, SNAP_HORIZ, SNAP_VERT, SNAP_BOTH; + typedef int SnapStatus; + static const SnapStatus SNAP_NONE, SNAP_HORIZ, SNAP_VERT, SNAP_BOTH; /** * @brief Handle mousePressEvent @@ -148,17 +148,17 @@ public: * @brief Snap rect to guidelines * * This looks for a guide which is in reach for the guide as defined in snap. - * This method has the abillity to combine more calls. The snaptqStatus and diff args are both input and - * output. On first call you should set snaptqStatus to 0. The return value would then show in which + * This method has the abillity to combine more calls. The snapStatus and diff args are both input and + * output. On first call you should set snapStatus to 0. The return value would then show in which * directions it has snapped. If you combine several KoGuides you can let these output arguments * be input for the next koGuide. That way you'll always catch the nearest guide. * * @param rect the rect which should be snapped * @param snap the distance within the guide should snap - but always snap if already snapped - * @param snaptqStatus if horiz,vert or both directions are snapped (both in and out param). + * @param snapStatus if horiz,vert or both directions are snapped (both in and out param). * @param diff distance away from guide. Only valid if status is snapping (both in and out param) */ - void snapToGuideLines( KoRect &rect, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff ); + void snapToGuideLines( KoRect &rect, int snap, SnapStatus &snapStatus, KoPoint &diff ); /** * @brief Snap rect to guidelines @@ -167,10 +167,10 @@ public: * * @param pos the position which should be snapped * @param snap the distance wherein the guide should snap - but always snap if already snapped - * @param snaptqStatus if horiz,vert or both directions are snapped (both in and out param) + * @param snapStatus if horiz,vert or both directions are snapped (both in and out param) * @param diff distance away from guide. Only valid if status is snapping (both in and out param) */ - void snapToGuideLines( KoPoint &pos, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff ); + void snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus, KoPoint &diff ); /** * @brief tqrepaint guides if any changed snapping status @@ -188,7 +188,7 @@ public: * * @param snappedPoint the point after it has been snapped */ - void repaintSnapping( const KoPoint &snappedPoint, SnaptqStatus snaptqStatus ); + void repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStatus ); /** * @brief tqrepaint guides so none is snapped diff --git a/lib/kofficeui/KoInsertLink.cpp b/lib/kofficeui/KoInsertLink.cpp index 342889c4..098a4880 100644 --- a/lib/kofficeui/KoInsertLink.cpp +++ b/lib/kofficeui/KoInsertLink.cpp @@ -484,7 +484,7 @@ fileLinkPage::fileLinkPage( TQWidget *parent , char *name ) else recentFile->insertStringList( lst); - recentFile->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + recentFile->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); connect( recentFile , TQT_SIGNAL(highlighted ( const TQString &)), this, TQT_SLOT( slotSelectRecentFile( const TQString & ))); diff --git a/lib/kofficeui/KoKoolBar.cpp b/lib/kofficeui/KoKoolBar.cpp index 5f42caae..1db0ee9b 100644 --- a/lib/kofficeui/KoKoolBar.cpp +++ b/lib/kofficeui/KoKoolBar.cpp @@ -218,7 +218,7 @@ KoKoolBarBox::KoKoolBarBox( KoKoolBar *_bar ) : setFrameShape( StyledPanel ); setFrameShadow( Sunken ); // setBackgroundMode( PaletteBase ); - setBackgroundColor( tqcolorGroup().background() ); + setBackgroundColor( colorGroup().background() ); } void KoKoolBarBox::setActiveGroup( KoKoolBarGroup *_grp ) diff --git a/lib/kofficeui/KoPageLayoutColumnsBase.ui b/lib/kofficeui/KoPageLayoutColumnsBase.ui index 325fe45e..07cced25 100644 --- a/lib/kofficeui/KoPageLayoutColumnsBase.ui +++ b/lib/kofficeui/KoPageLayoutColumnsBase.ui @@ -56,7 +56,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> diff --git a/lib/kofficeui/KoPageLayoutHeaderBase.ui b/lib/kofficeui/KoPageLayoutHeaderBase.ui index b3bd7978..41246d84 100644 --- a/lib/kofficeui/KoPageLayoutHeaderBase.ui +++ b/lib/kofficeui/KoPageLayoutHeaderBase.ui @@ -61,7 +61,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>21</width> <height>20</height> @@ -136,7 +136,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>41</width> <height>20</height> @@ -187,7 +187,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> diff --git a/lib/kofficeui/KoPageLayoutSize.cpp b/lib/kofficeui/KoPageLayoutSize.cpp index 6ddf9409..111ba21b 100644 --- a/lib/kofficeui/KoPageLayoutSize.cpp +++ b/lib/kofficeui/KoPageLayoutSize.cpp @@ -160,9 +160,9 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayou // ------------- spacers ----------- TQWidget* spacer1 = new TQWidget( this ); TQWidget* spacer2 = new TQWidget( this ); - spacer1->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + spacer1->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); - spacer2->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + spacer2->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); grid1->addWidget( spacer1, 4, 0 ); grid1->addWidget( spacer2, 4, 1 ); diff --git a/lib/kofficeui/KoPartSelectAction.cpp b/lib/kofficeui/KoPartSelectAction.cpp index ca24b89a..17bda1e3 100644 --- a/lib/kofficeui/KoPartSelectAction.cpp +++ b/lib/kofficeui/KoPartSelectAction.cpp @@ -64,7 +64,7 @@ void KoPartSelectAction::init() // Called when selecting a part void KoPartSelectAction::slotActionActivated() { - TQString servName = TQString::tqfromLatin1( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ); + TQString servName = TQString::fromLatin1( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ); KService::Ptr serv = KService::serviceByName( servName ); m_documentEntry = KoDocumentEntry( serv ); emit activated(); diff --git a/lib/kofficeui/KoPartSelectDia.cpp b/lib/kofficeui/KoPartSelectDia.cpp index b5271b97..144b8a08 100644 --- a/lib/kofficeui/KoPartSelectDia.cpp +++ b/lib/kofficeui/KoPartSelectDia.cpp @@ -56,7 +56,7 @@ KoPartSelectDia::KoPartSelectDia( TQWidget* parent, const char* name ) : selectionChanged( 0 ); setFocus(); - resize( listview->tqsizeHint().width() + 20, 300 ); + resize( listview->sizeHint().width() + 20, 300 ); } void KoPartSelectDia::selectionChanged( TQListViewItem *item ) diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp index 212becd7..cc8f5189 100644 --- a/lib/kofficeui/KoRuler.cpp +++ b/lib/kofficeui/KoRuler.cpp @@ -209,12 +209,12 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Use a double-buffer pixmap TQPainter p( &buffer ); - p.fillRect( 0, 0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) ); + p.fillRect( 0, 0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); int totalw = tqRound( zoomIt(d->tqlayout.ptWidth) ); TQString str; - p.setBrush( tqcolorGroup().brush( TQColorGroup::Base ) ); + p.setBrush( colorGroup().brush( TQColorGroup::Base ) ); // Draw white rect TQRect r; @@ -279,13 +279,13 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Draw ending bar (at page width) //int constant=zoomIt(1); //p.drawLine( totalw - diffx + constant, 1, totalw - diffx + constant, height() - 1 ); - //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); + //p.setPen( colorGroup().color( TQColorGroup::Base ) ); //p.drawLine( totalw - diffx, 1, totalw - diffx, height() - 1 ); // Draw starting bar (at 0) - //p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); + //p.setPen( colorGroup().color( TQColorGroup::Text ) ); //p.drawLine( -diffx, 1, -diffx, height() - 1 ); - //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); + //p.setPen( colorGroup().color( TQColorGroup::Base ) ); //p.drawLine( -diffx - constant, 1, -diffx - constant, height() - 1 ); // Draw the indents triangles @@ -307,7 +307,7 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Show the mouse position if ( d->action == A_NONE && showMPos ) { - p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); + p.setPen( colorGroup().color( TQColorGroup::Text ) ); p.drawLine( mposX, 1, mposX, height() - 1 ); } hasToDelete = false; @@ -325,7 +325,7 @@ void KoRuler::drawTabs( TQPainter &_painter ) { int ptPos = 0; - _painter.setPen( TQPen( tqcolorGroup().color( TQColorGroup::Text ), 2, SolidLine ) ); + _painter.setPen( TQPen( colorGroup().color( TQColorGroup::Text ), 2, SolidLine ) ); // Check if we're in a mousemove event, removing a tab. // In that case, we'll have to skip drawing that one. bool willRemove = d->mousePressed && willRemoveTab( d->oldMy ) && d->currTab.type != T_INVALID; @@ -356,7 +356,7 @@ void KoRuler::drawTabs( TQPainter &_painter ) _painter.drawLine( ptPos + 4, height() - 4, ptPos + 20 - 4, height() - 4 ); _painter.drawLine( ptPos + 20 / 2, 4, ptPos + 20 / 2, height() - 4 ); _painter.fillRect( ptPos + 20 / 2 + 2, height() - 9, 3, 3, - tqcolorGroup().color( TQColorGroup::Text ) ); + colorGroup().color( TQColorGroup::Text ) ); } break; default: break; } @@ -371,7 +371,7 @@ void KoRuler::drawVertical( TQPainter *_painter ) resize( TQMAX( fm.height() + 4, 20 ), height() ); TQPainter p( &buffer ); - p.fillRect( 0, 0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) ); + p.fillRect( 0, 0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); int totalh = tqRound( zoomIt(d->tqlayout.ptHeight) ); // Clip rect - this gives basically always a rect like (2,2,width-2,height-2) @@ -382,7 +382,7 @@ void KoRuler::drawVertical( TQPainter *_painter ) if ( paintRect.intersects( rulerRect ) ) { TQString str; - p.setBrush( tqcolorGroup().brush( TQColorGroup::Base ) ); + p.setBrush( colorGroup().brush( TQColorGroup::Base ) ); // Draw white rect TQRect r; @@ -454,19 +454,19 @@ void KoRuler::drawVertical( TQPainter *_painter ) // Draw ending bar (at page height) //p.drawLine( 1, totalh - diffy + 1, width() - 1, totalh - diffy + 1 ); - //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); + //p.setPen( colorGroup().color( TQColorGroup::Base ) ); //p.drawLine( 1, totalh - diffy, width() - 1, totalh - diffy ); // Draw starting bar (at 0) - //p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); + //p.setPen( colorGroup().color( TQColorGroup::Text ) ); //p.drawLine( 1, -diffy, width() - 1, -diffy ); - //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); + //p.setPen( colorGroup().color( TQColorGroup::Base ) ); //p.drawLine( 1, -diffy - 1, width() - 1, -diffy - 1 ); } // Show the mouse position if ( d->action == A_NONE && showMPos ) { - p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); + p.setPen( colorGroup().color( TQColorGroup::Text ) ); p.drawLine( 1, mposY, width() - 1, mposY ); } hasToDelete = false; @@ -1176,7 +1176,7 @@ void KoRuler::slotMenuActivated( int i ) } } -TQSize KoRuler::tqminimumSizeHint() const +TQSize KoRuler::minimumSizeHint() const { TQSize size; TQFont font = KGlobalSettings::toolBarFont(); @@ -1188,9 +1188,9 @@ TQSize KoRuler::tqminimumSizeHint() const return size; } -TQSize KoRuler::tqsizeHint() const +TQSize KoRuler::sizeHint() const { - return tqminimumSizeHint(); + return minimumSizeHint(); } void KoRuler::setPageLayout( const KoPageLayout& _layout ) diff --git a/lib/kofficeui/KoRuler.h b/lib/kofficeui/KoRuler.h index 5cea5678..52dcecd0 100644 --- a/lib/kofficeui/KoRuler.h +++ b/lib/kofficeui/KoRuler.h @@ -246,12 +246,12 @@ public: /** * Reimplemented from TQWidget */ - virtual TQSize tqminimumSizeHint() const; + virtual TQSize minimumSizeHint() const; /** * Reimplemented from TQWidget */ - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; signals: void newPageLayout( const KoPageLayout & ); diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp index e33ce12c..a7ffe145 100644 --- a/lib/kofficeui/KoTabBar.cpp +++ b/lib/kofficeui/KoTabBar.cpp @@ -273,20 +273,20 @@ void KoTabBarPrivate::drawTab( TQPainter& painter, TQRect& rect, const TQString& painter.save(); // fill it first - TQBrush bg = tabbar->tqcolorGroup().background(); - if( active ) bg = TQBrush(tabbar->tqcolorGroup().base()); + TQBrush bg = tabbar->colorGroup().background(); + if( active ) bg = TQBrush(tabbar->colorGroup().base()); painter.setBrush( bg ); painter.setPen( TQPen( TQt::NoPen ) ); painter.drawPolygon( polygon ); // draw the lines - painter.setPen( tabbar->tqcolorGroup().dark() ); + painter.setPen( tabbar->colorGroup().dark() ); if( !active ) painter.drawLine( rect.x()-25, rect.y(), rect.right()+25, rect.top() ); // TQt4: painter.setRenderHint( TQPainter::Antialiasing ); painter.drawPolyline( polygon ); - painter.setPen( tabbar->tqcolorGroup().buttonText() ); + painter.setPen( tabbar->colorGroup().buttonText() ); TQFont f = painter.font(); if( active ) f.setBold( true ); painter.setFont( f ); @@ -660,10 +660,10 @@ void KoTabBar::paintEvent( TQPaintEvent* ) TQPainter painter; TQPixmap pm( size() ); - pm.fill( tqcolorGroup().background() ); + pm.fill( colorGroup().background() ); painter.tqbegin( TQT_TQPAINTDEVICE(&pm), this ); - painter.setPen( tqcolorGroup().dark() ); + painter.setPen( colorGroup().dark() ); painter.drawLine( 0, 0, width(), 0 ); if( !d->reverseLayout ) @@ -722,9 +722,9 @@ void KoTabBar::resizeEvent( TQResizeEvent* ) update(); } -TQSize KoTabBar::tqsizeHint() const +TQSize KoTabBar::sizeHint() const { - return TQSize( 40, tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent, this ) ); + return TQSize( 40, tqstyle().pixelMetric( TQStyle::PM_ScrollBarExtent, this ) ); } void KoTabBar::renameTab( const TQString& old_name, const TQString& new_name ) diff --git a/lib/kofficeui/KoTabBar.h b/lib/kofficeui/KoTabBar.h index 39cf03b8..0c4233b4 100644 --- a/lib/kofficeui/KoTabBar.h +++ b/lib/kofficeui/KoTabBar.h @@ -219,7 +219,7 @@ public slots: */ void clear(); - TQSize tqsizeHint() const; + TQSize sizeHint() const; signals: diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp index 1e526133..880c447b 100644 --- a/lib/kofficeui/KoTemplateChooseDia.cpp +++ b/lib/kofficeui/KoTemplateChooseDia.cpp @@ -433,7 +433,7 @@ void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayou KoTCDIconCanvas *canvas = new KoTCDIconCanvas( frame ); tqlayout->addWidget(canvas,0,0); - canvas->setBackgroundColor( tqcolorGroup().base() ); + canvas->setBackgroundColor( colorGroup().base() ); canvas->setResizeMode(TQIconView::Adjust); canvas->setWordWrapIconText( true ); canvas->show(); @@ -642,7 +642,7 @@ void KoTemplateChooseDia::slotOk() static const char* const s_returnTypes[] = { 0 /*Cancel ;)*/, "Template", "File", "Empty" }; if ( d->m_returnType <= Empty ) { - grp.writeEntry( "LastReturnType", TQString::tqfromLatin1(s_returnTypes[d->m_returnType]) ); + grp.writeEntry( "LastReturnType", TQString::fromLatin1(s_returnTypes[d->m_returnType]) ); if (d->m_returnType == Template) { grp.writeEntry( "TemplateTab", d->m_jwidget->activePageIndex() ); @@ -793,12 +793,12 @@ void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item ) // and another one for deciding what's the text of the tooltip... const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo(); TQString toolTipText = fi->url().prettyURL( 0, KURL::StripFileProtocol ); - toolTip = new TQLabel( TQString::tqfromLatin1(" %1 ").tqarg(toolTipText), 0, + toolTip = new TQLabel( TQString::fromLatin1(" %1 ").tqarg(toolTipText), 0, "myToolTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); toolTip->setLineWidth( 1 ); - toolTip->tqsetAlignment( AlignLeft | AlignTop ); + toolTip->setAlignment( AlignLeft | AlignTop ); toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) ); toolTip->adjustSize(); TQRect screen = TQApplication::desktop()->screenGeometry( @@ -810,7 +810,7 @@ void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item ) toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); } toolTip->setFont( TQToolTip::font() ); - toolTip->tqsetPalette( TQToolTip::palette(), TRUE ); + toolTip->setPalette( TQToolTip::palette(), TRUE ); toolTip->show(); } diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp index 7260bbea..3ac7cb45 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(); @@ -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() ); @@ -802,7 +802,7 @@ void KoToolButton::drawButton(TQPainter *_painter) 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 ); } } diff --git a/lib/kofficeui/KoTooluButton.h b/lib/kofficeui/KoTooluButton.h index 1374f6d2..804b270b 100644 --- a/lib/kofficeui/KoTooluButton.h +++ b/lib/kofficeui/KoTooluButton.h @@ -34,8 +34,8 @@ public: KoColorPanel( TQWidget* parent = 0, const char* name = 0 ); virtual ~KoColorPanel(); - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; enum MenuStyle { Plain, CustomColors }; static TQPopupMenu* createColorPopup( MenuStyle style, const TQColor& defaultColor, @@ -163,9 +163,9 @@ public: virtual ~KoToolButton(); - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; - virtual TQSize tqminimumSize() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; + virtual TQSize minimumSize() const; public slots: void colorSelected( const TQColor& color ); diff --git a/lib/kofficeui/KoUnitWidgets.cpp b/lib/kofficeui/KoUnitWidgets.cpp index 476e35b3..89d9dbc8 100644 --- a/lib/kofficeui/KoUnitWidgets.cpp +++ b/lib/kofficeui/KoUnitWidgets.cpp @@ -223,7 +223,7 @@ KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *parent, const char *name ) : KLineEdit( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - tqsetAlignment( TQt::AlignRight ); + setAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); setValidator( m_validator ); setUnit( KoUnit::U_PT ); @@ -235,7 +235,7 @@ KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *parent, double lower, doub : KLineEdit( parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - tqsetAlignment( TQt::AlignRight ); + setAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); setValidator( m_validator ); setUnit( unit ); @@ -287,7 +287,7 @@ double KoUnitDoubleLineEdit::value( void ) const KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *parent, const char *name ) : KComboBox( true, parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - lineEdit()->tqsetAlignment( TQt::AlignRight ); + lineEdit()->setAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); lineEdit()->setValidator( m_validator ); setUnit( KoUnit::U_PT ); @@ -300,7 +300,7 @@ KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *parent, double lower, doub : KComboBox( true, parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - lineEdit()->tqsetAlignment( TQt::AlignRight ); + lineEdit()->setAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); lineEdit()->setValidator( m_validator ); setUnit( unit ); diff --git a/lib/kofficeui/kcoloractions.cpp b/lib/kofficeui/kcoloractions.cpp index c0da86e9..2618a8e0 100644 --- a/lib/kofficeui/kcoloractions.cpp +++ b/lib/kofficeui/kcoloractions.cpp @@ -266,7 +266,7 @@ int KSelectColorAction::plug( TQWidget* w, int index ) menu->setItemEnabled( id, false ); if ( !whatsThis().isEmpty() ) - menu->tqsetWhatsThis( id, whatsThisWithIcon() ); + menu->setWhatsThis( id, whatsThisWithIcon() ); addContainer( menu, id ); connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); @@ -341,7 +341,7 @@ TQString KSelectColorAction::whatsThisWithIcon() const { TQString text = whatsThis(); if (!icon().isEmpty()) - return TQString::tqfromLatin1("<img source=\"small|%1\"> %2").tqarg(icon()).tqarg(text); + return TQString::fromLatin1("<img source=\"small|%1\"> %2").tqarg(icon()).tqarg(text); return text; } diff --git a/lib/kofficeui/tests/coloraction_test.cpp b/lib/kofficeui/tests/coloraction_test.cpp index 729285bb..9dfd066c 100644 --- a/lib/kofficeui/tests/coloraction_test.cpp +++ b/lib/kofficeui/tests/coloraction_test.cpp @@ -36,19 +36,19 @@ TopLevel::TopLevel( TQWidget* parent, const char* name) : TQMainWindow( parent, name ) { - setCaption( TQString::tqfromLatin1( "KColorAction test application" ) ); + setCaption( TQString::fromLatin1( "KColorAction test application" ) ); TQWidget *w = new TQWidget( this ); setCentralWidget( w ); TQBoxLayout* l = new TQHBoxLayout( w, KDialog::marginHint(), KDialog::spacingHint() ); - TQGroupBox* b1 = new TQVGroupBox( TQString::tqfromLatin1( "KoColorPanel 1" ), w ); + TQGroupBox* b1 = new TQVGroupBox( TQString::fromLatin1( "KoColorPanel 1" ), w ); panel = new KoColorPanel( b1, "panel1" ); connect( panel, TQT_SIGNAL( colorSelected( const TQColor& ) ), TQT_SLOT( slotColorSelected( const TQColor& ) ) ); //panel->insertDefaultColors(); l->addWidget( b1 ); - b1 = new TQVGroupBox( TQString::tqfromLatin1( "KoColorPanel 2" ), w ); + b1 = new TQVGroupBox( TQString::fromLatin1( "KoColorPanel 2" ), w ); ( void ) new KoColorPanel( b1, "panel2" ); l->addWidget( b1 ); diff --git a/lib/kofficeui/tkaction.cpp b/lib/kofficeui/tkaction.cpp index 6a7d198a..da88a7c1 100644 --- a/lib/kofficeui/tkaction.cpp +++ b/lib/kofficeui/tkaction.cpp @@ -166,9 +166,9 @@ void TKAction::updateLayout(TQWidget* base) } else pixLabel->hide(); - base->setFixedWidth( w->tqsizeHint().width() + - (textLabel->isVisible() ? textLabel->tqsizeHint().width():0) + - (pixLabel->isVisible() ? pixLabel->tqsizeHint().width():0) ); + base->setFixedWidth( w->sizeHint().width() + + (textLabel->isVisible() ? textLabel->sizeHint().width():0) + + (pixLabel->isVisible() ? pixLabel->sizeHint().width():0) ); } /******************************************************************************/ TKBaseSelectAction::TKBaseSelectAction( TQObject* parent, const char* name ) @@ -191,7 +191,7 @@ int TKBaseSelectAction::plug(TQWidget* widget, int index) TKComboBox* cb = new TKComboBox(m_editable,bar); initComboBox(cb); - cb->setMinimumWidth( cb->tqsizeHint().width() ); + cb->setMinimumWidth( cb->sizeHint().width() ); TQWidget* base = createLayout(bar,cb); bar->insertWidget( id_, 100, base, index ); diff --git a/lib/kofficeui/tkcombobox.cpp b/lib/kofficeui/tkcombobox.cpp index d1cb7ac2..cd20f790 100644 --- a/lib/kofficeui/tkcombobox.cpp +++ b/lib/kofficeui/tkcombobox.cpp @@ -59,7 +59,7 @@ void TKComboBox::paintEvent(TQPaintEvent*) int bh = height()-4; TQPainter p( this ); - const TQColorGroup& g = tqcolorGroup(); + const TQColorGroup& g = colorGroup(); TQRect fr(2,2,width()-4,height()-4); @@ -87,8 +87,8 @@ void TKComboBox::paintEvent(TQPaintEvent*) TQPixmap pixmap(arrow_down); - tqstyle().tqdrawControl( TQStyle::CE_PushButton, &p, this, TQRect( bx, by, bw, bh ), tqcolorGroup() ); - tqstyle().drawItem( &p, TQRect( bx, by, bw, bh), AlignCenter, tqcolorGroup(), isEnabled(), &pixmap, TQString() ); + tqstyle().drawControl( TQStyle::CE_PushButton, &p, this, TQRect( bx, by, bw, bh ), colorGroup() ); + tqstyle().drawItem( &p, TQRect( bx, by, bw, bh), AlignCenter, colorGroup(), isEnabled(), &pixmap, TQString() ); if ( hasFocus()) { tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, fr, g ); diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp index b0520a2c..5436496f 100644 --- a/lib/kofficeui/tktoolbarbutton.cpp +++ b/lib/kofficeui/tktoolbarbutton.cpp @@ -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, tqcolorGroup(), isEnabled(), pixmap(), TQString() );\ + tqstyle().drawItem( p, TQRect( x, 0, pixmap()->width(), height() ), AlignCenter, colorGroup(), 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, tqcolorGroup(), isEnabled(), 0, d->m_text );\ + tqstyle().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, colorGroup(), 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().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() ); + 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() ); if ( d->m_isRaised ) - qDrawShadeLine( p, width()-12, 0, width()-12, height(), tqcolorGroup(), true ); + qDrawShadeLine( p, width()-12, 0, width()-12, height(), colorGroup(), true ); DRAW_PIXMAP_AND_TEXT } else { - tqstyle().tqdrawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? tqcolorGroup() : tqpalette().disabled(), f ); + tqstyle().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : 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().tqdrawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? tqcolorGroup() : tqpalette().disabled(), f ); + tqstyle().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : tqpalette().disabled(), f ); DRAW_PIXMAP_AND_TEXT } } @@ -430,14 +430,14 @@ void TKToolBarButton::makeDisabledPixmap() disabledPixmap = effect.apply(activePixmap, KIcon::Toolbar, KIcon::DisabledState); } -TQSize TKToolBarButton::tqsizeHint() const +TQSize TKToolBarButton::sizeHint() const { - return tqminimumSize(); + return minimumSize(); } -TQSize TKToolBarButton::tqminimumSizeHint() const +TQSize TKToolBarButton::minimumSizeHint() const { - return tqminimumSize(); + return minimumSize(); } void TKToolBarButton::showMenu() diff --git a/lib/kofficeui/tktoolbarbutton.h b/lib/kofficeui/tktoolbarbutton.h index 3cec2f57..883d7811 100644 --- a/lib/kofficeui/tktoolbarbutton.h +++ b/lib/kofficeui/tktoolbarbutton.h @@ -180,8 +180,8 @@ public: TQPixmap getActivePixmap() const; - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; signals: void buttonClicked(); |