diff options
Diffstat (limited to 'src/flowcontainer.cpp')
-rw-r--r-- | src/flowcontainer.cpp | 74 |
1 files changed, 37 insertions, 37 deletions
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 <kiconloader.h> -#include <qpainter.h> +#include <tqpainter.h> #include <cmath> 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="<<width()<<" height="<<height()<<endl; - QPointArray pa(10); - pa[0] = QPoint( 0, 0 ); - pa[1] = QPoint( width(), 0 ); - pa[2] = QPoint( width(), height() ); - pa[3] = QPoint( 0, height() ); - pa[4] = QPoint( 0, 0 ); - pa[5] = QPoint( 8, topStrip ); - pa[6] = QPoint( 8, height()-botStrip ); - pa[7] = QPoint( width()-8, height()-botStrip ); - pa[8] = QPoint( width()-8, topStrip ); - pa[9] = QPoint( 8, topStrip ); + TQPointArray pa(10); + pa[0] = TQPoint( 0, 0 ); + pa[1] = TQPoint( width(), 0 ); + pa[2] = TQPoint( width(), height() ); + pa[3] = TQPoint( 0, height() ); + pa[4] = TQPoint( 0, 0 ); + pa[5] = TQPoint( 8, topStrip ); + pa[6] = TQPoint( 8, height()-botStrip ); + pa[7] = TQPoint( width()-8, height()-botStrip ); + pa[8] = TQPoint( width()-8, topStrip ); + pa[9] = TQPoint( 8, topStrip ); pa.translate( offsetX(), offsetY() ); setPoints(pa); } -void FlowContainer::buttonStateChanged(const QString &/*id*/, bool state) +void FlowContainer::buttonStateChanged(const TQString &/*id*/, bool state) { setExpanded(state); } -bool FlowContainer::parentIsCollapsed() const +bool FlowContainer::tqparentIsCollapsed() const { if ( !p_parentItem ) return false; FlowContainer *fc = dynamic_cast<FlowContainer*>((Item*)(p_parentItem)); - return !fc->isExpanded() || fc->parentIsCollapsed(); + return !fc->isExpanded() || fc->tqparentIsCollapsed(); } @@ -374,17 +374,17 @@ void FlowContainer::updateContainedVisibility() if (m_ext_out) m_ext_out->setVisible( isVisible() ); - const ItemList::iterator cEnd = m_children.end(); - for ( ItemList::iterator it = m_children.begin(); it != cEnd; ++it ) + const ItemList::iterator cEnd = m_tqchildren.end(); + for ( ItemList::iterator it = m_tqchildren.begin(); it != cEnd; ++it ) { if (*it) - (*it)->setVisible( isVisible() && b_expanded ); + (*it)->tqsetVisible( isVisible() && b_expanded ); } m_rectangularOverlay->setVisible( isVisible() && b_expanded ); NodeGroupList hidableNodeGroups; - p_icnDocument->getTranslatable( children(true) += GuardedItem(this), 0, 0, &hidableNodeGroups ); + p_icnDocument->getTranslatable( tqchildren(true) += GuardedItem(this), 0, 0, &hidableNodeGroups ); NodeGroupList::iterator hngEnd = hidableNodeGroups.end(); for ( NodeGroupList::iterator it = hidableNodeGroups.begin(); it != hngEnd; ++it ) |