From 87a016680e3677da3993f333561e79eb0cead7d5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 29 Jun 2011 16:05:55 +0000 Subject: TQt4 port ktechlab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/flowcontainer.cpp | 74 +++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'src/flowcontainer.cpp') diff --git a/src/flowcontainer.cpp b/src/flowcontainer.cpp index 32eb20e..817627a 100644 --- a/src/flowcontainer.cpp +++ b/src/flowcontainer.cpp @@ -17,20 +17,20 @@ #include "resizeoverlay.h" #include -#include +#include #include const int topStrip = 24; const int botStrip = 16; -FlowContainer::FlowContainer( ICNDocument *_icnDocument, bool newItem, const QString &id ) +FlowContainer::FlowContainer( ICNDocument *_icnDocument, bool newItem, const TQString &id ) : FlowPart( _icnDocument, newItem, id ) { m_ext_in = m_int_in = m_int_out = m_ext_out = 0l; b_expanded = true; - addButton( "expandBtn", QRect( offsetX(), offsetY()+24 - 11, 22, 22 ), KGlobal::iconLoader()->loadIcon( "down", KIcon::Small ), true ); + addButton( "expandBtn", TQRect( offsetX(), offsetY()+24 - 11, 22, 22 ), KGlobal::iconLoader()->loadIcon( "down", KIcon::Small ), true ); m_rectangularOverlay = new RectangularOverlay( this, 8, 8 ); setSize( -160, -120, 320, 240 ); @@ -68,7 +68,7 @@ void FlowContainer::updateNodeLevels() } -void FlowContainer::filterEndPartIDs( QStringList *ids ) +void FlowContainer::filterEndPartIDs( TQStringList *ids ) { // Remove *all* nodes except for very bottom one if (m_int_out) { @@ -101,13 +101,13 @@ void FlowContainer::createBotContainerNode() } -QSize FlowContainer::minimumSize() const +TQSize FlowContainer::tqminimumSize() const { - return QSize( 160, 64 ); + return TQSize( 160, 64 ); } -void FlowContainer::drawShape( QPainter &p ) +void FlowContainer::drawShape( TQPainter &p ) { if (b_deleted) return; @@ -120,27 +120,27 @@ void FlowContainer::drawShape( QPainter &p ) int col = 0xef + level()*0x6; if ( col > 0xff ) col = 0xff; - p.setBrush( QColor( col, 0xff, col ) ); + p.setBrush( TQColor( col, 0xff, col ) ); if( b_expanded ) { - p.setPen(Qt::DotLine); + p.setPen(TQt::DotLine); p.drawRoundRect( _x, _y, width(), topStrip, 1500/width(), 1500/topStrip ); p.drawRoundRect( _x, _y+height()-botStrip, width(), botStrip, 1500/width(), 1500/botStrip ); } else { - p.setPen(QPen((isSelected()?m_selectedCol:Qt::black),1,Qt::SolidLine)); + p.setPen(TQPen((isSelected()?m_selectedCol:TQt::black),1,TQt::SolidLine)); p.drawRoundRect( _x, _y, width(), topStrip, 1500/width(), 1500/topStrip ); } - p.setPen( Qt::black ); + p.setPen( TQt::black ); p.setFont( font() ); - p.drawText( QRect( 22 + _x+8, _y, width()-8, topStrip ), Qt::AlignLeft | Qt::AlignVCenter, m_caption ); + p.drawText( TQRect( 22 + _x+8, _y, width()-8, topStrip ), TQt::AlignLeft | TQt::AlignVCenter, m_caption ); if( b_expanded ) { - p.setPen(Qt::SolidLine); - p.setBrush( Qt::NoBrush ); + p.setPen(TQt::SolidLine); + p.setBrush( TQt::NoBrush ); p.drawRoundRect( _x, _y, width(), height(), 1500/width(), 1500/height() ); } } @@ -153,7 +153,7 @@ void FlowContainer::childAdded( Item *child ) FlowPart::childAdded(child); - connect( this, SIGNAL(movedBy(double, double )), child, SLOT(moveBy(double, double )) ); + connect( this, TQT_SIGNAL(movedBy(double, double )), child, TQT_SLOT(moveBy(double, double )) ); child->setZ( ICNDocument::Z::Item + child->level() ); updateContainedVisibility(); @@ -165,9 +165,9 @@ void FlowContainer::childRemoved( Item *child ) FlowPart::childRemoved(child); if (!b_expanded) - child->setVisible(true); + child->tqsetVisible(true); - disconnect( this, SIGNAL(movedBy(double, double )), child, SLOT(moveBy(double, double )) ); + disconnect( this, TQT_SIGNAL(movedBy(double, double )), child, TQT_SLOT(moveBy(double, double )) ); } @@ -241,42 +241,42 @@ void FlowContainer::setFullBounds( bool full ) { if ( full || !b_expanded ) { - QRect bounds = b_expanded ? m_sizeRect : QRect( m_sizeRect.x(), m_sizeRect.y(), m_sizeRect.width(), topStrip ); - setPoints( QPointArray(bounds) ); + TQRect bounds = b_expanded ? m_sizeRect : TQRect( m_sizeRect.x(), m_sizeRect.y(), m_sizeRect.width(), topStrip ); + setPoints( TQPointArray(bounds) ); return; } // kdDebug() << k_funcinfo << "width="<