diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-12 01:36:19 +0000 |
commit | 99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch) | |
tree | eff34cf0762227f6baf2a93e8fef48d4bed2651c /umbrello/umbrello/statewidget.cpp | |
parent | 1c104292188541106338d4940b0f04beeb4301a0 (diff) | |
download | tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip |
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/statewidget.cpp')
-rw-r--r-- | umbrello/umbrello/statewidget.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/umbrello/umbrello/statewidget.cpp b/umbrello/umbrello/statewidget.cpp index 871ab316..72ce43ea 100644 --- a/umbrello/umbrello/statewidget.cpp +++ b/umbrello/umbrello/statewidget.cpp @@ -55,23 +55,23 @@ void StateWidget::draw(TQPainter & p, int offsetX, int offsetY) { const int count = m_Activities.count(); if( count == 0 ) { p.drawRoundRect(offsetX, offsetY, w, h, (h*40)/w, (w*40)/h); - p.setPen(Qt::black); + p.setPen(TQt::black); TQFont font = UMLWidget::getFont(); font.setBold( false ); p.setFont( font ); p.drawText(offsetX + STATE_MARGIN, offsetY + textStartY, w - STATE_MARGIN * 2, fontHeight, - Qt::AlignCenter, getName()); + TQt::AlignCenter, getName()); UMLWidget::setPen(p); } else { p.drawRoundRect(offsetX, offsetY, w, h, (h*40)/w, (w*40)/h); textStartY = offsetY + STATE_MARGIN; - p.setPen(Qt::black); + p.setPen(TQt::black); TQFont font = UMLWidget::getFont(); font.setBold( true ); p.setFont( font ); p.drawText(offsetX + STATE_MARGIN, textStartY, w - STATE_MARGIN * 2, - fontHeight, Qt::AlignCenter, getName()); + fontHeight, TQt::AlignCenter, getName()); font.setBold( false ); p.setFont( font ); UMLWidget::setPen(p); @@ -81,9 +81,9 @@ void StateWidget::draw(TQPainter & p, int offsetX, int offsetY) { for( TQStringList::Iterator it(m_Activities.begin()); it != end; ++it ) { textStartY += fontHeight; p.drawLine( offsetX, linePosY, offsetX + w - 1, linePosY ); - p.setPen(Qt::black); + p.setPen(TQt::black); p.drawText(offsetX + STATE_MARGIN, textStartY, w - STATE_MARGIN * 2 - 1, - fontHeight, Qt::AlignCenter, *it); + fontHeight, TQt::AlignCenter, *it); UMLWidget::setPen(p); linePosY += fontHeight; }//end for @@ -97,7 +97,7 @@ void StateWidget::draw(TQPainter & p, int offsetX, int offsetY) { case End : p.setBrush( WidgetBase::getLineColor() ); p.drawEllipse( offsetX, offsetY, w, h ); - p.setBrush( Qt::white ); + p.setBrush( TQt::white ); p.drawEllipse( offsetX + 1, offsetY + 1, w - 2, h - 2 ); p.setBrush( WidgetBase::getLineColor() ); p.drawEllipse( offsetX + 3, offsetY + 3, w - 6, h - 6 ); @@ -192,7 +192,7 @@ bool StateWidget::addActivity( const TQString &activity ) { bool StateWidget::removeActivity( const TQString &activity ) { int index = - 1; - if( ( index = m_Activities.findIndex( activity ) ) == -1 ) + if( ( index = m_Activities.tqfindIndex( activity ) ) == -1 ) return false; m_Activities.remove( m_Activities.at( index ) ); updateComponentSize(); @@ -210,7 +210,7 @@ TQStringList & StateWidget::getActivityList() { bool StateWidget::renameActivity( const TQString &activity, const TQString &newName ) { int index = - 1; - if( ( index = m_Activities.findIndex( activity ) ) == -1 ) + if( ( index = m_Activities.tqfindIndex( activity ) ) == -1 ) return false; m_Activities[ index ] = newName; return true; |