From 1e9fa8e06de5da7fcc268e9cccb2d6b21c5f53a3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 20 Jul 2024 20:15:52 +0900 Subject: Rename graphics class nt* related files to equivalent tq* (part 2) Signed-off-by: Michele Calgaro --- doc/html/customlayout-example.html | 52 +++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'doc/html/customlayout-example.html') diff --git a/doc/html/customlayout-example.html b/doc/html/customlayout-example.html index e40ad039f..1e87be29c 100644 --- a/doc/html/customlayout-example.html +++ b/doc/html/customlayout-example.html @@ -83,10 +83,10 @@ public: TQSizePolicy::ExpandData expanding() const; protected: - void setGeometry( const TQRect& ); + void setGeometry( const TQRect& ); private: - int doLayout( const TQRect&, bool testonly = FALSE ); + int doLayout( const TQRect&, bool testonly = FALSE ); TQPtrList<TQLayoutItem> list; int cached_width; int cached_hfw; @@ -191,24 +191,24 @@ SimpleFlow::~SimpleFlow() return TQLayoutIterator( new SimpleFlowIterator( &list ) ); } -void SimpleFlow::setGeometry( const TQRect &r ) +void SimpleFlow::setGeometry( const TQRect &r ) { TQLayout::setGeometry( r ); doLayout( r ); } -int SimpleFlow::doLayout( const TQRect &r, bool testonly ) +int SimpleFlow::doLayout( const TQRect &r, bool testonly ) { - int x = r.x(); - int y = r.y(); + int x = r.x(); + int y = r.y(); int h = 0; //height of this line so far. TQPtrListIterator<TQLayoutItem> it(list); TQLayoutItem *o; while ( (o=it.current()) != 0 ) { ++it; int nextX = x + o->sizeHint().width() + spacing(); - if ( nextX - spacing() > r.right() && h > 0 ) { - x = r.x(); + if ( nextX - spacing() > r.right() && h > 0 ) { + x = r.x(); y = y + h + spacing(); nextX = x + o->sizeHint().width() + spacing(); h = 0; @@ -218,7 +218,7 @@ int SimpleFlow::doLayout( const TQRect x = nextX; h = TQMAX( h, o->sizeHint().height() ); } - return y + h - r.y(); + return y + h - r.y(); } TQSize SimpleFlow::minimumSize() const @@ -263,7 +263,7 @@ public: : TQWidgetItem( w ) {} - void setGeometry( const TQRect &r ) + void setGeometry( const TQRect &r ) { widget()->setGeometry( r ); } }; @@ -328,10 +328,10 @@ public: TQSizePolicy::ExpandData expanding() const; protected: - void setGeometry( const TQRect &rect ); + void setGeometry( const TQRect &rect ); private: - void doLayout( const TQRect &rect, bool testonly = FALSE ); + void doLayout( const TQRect &rect, bool testonly = FALSE ); void calcSize( SizeType st ); TQPtrList<BorderLayoutStruct> list; @@ -470,13 +470,13 @@ void BorderLayout::addWidget( TQWidge return TQLayoutIterator( new BorderLayoutIterator( &list ) ); } -void BorderLayout::setGeometry( const TQRect &rct ) +void BorderLayout::setGeometry( const TQRect &rct ) { TQLayout::setGeometry( rct ); doLayout( rct ); } -void BorderLayout::doLayout( const TQRect &rct, bool /*testonly*/ ) +void BorderLayout::doLayout( const TQRect &rct, bool /*testonly*/ ) { int ew = 0, ww = 0, nh = 0, sh = 0; int h = 0; @@ -488,41 +488,41 @@ void BorderLayout::doLayout( const TQR ++it; if ( o->pos == North ) { - o->item->setGeometry( TQRect( rct.x(), nh, rct.width(), o->item->sizeHint().height() ) ); + o->item->setGeometry( TQRect( rct.x(), nh, rct.width(), o->item->sizeHint().height() ) ); nh += o->item->geometry().height() + spacing(); } if ( o->pos == South ) { o->item->setGeometry( TQRect( o->item->geometry().x(), o->item->geometry().y(), - rct.width(), o->item->sizeHint().height() ) ); + rct.width(), o->item->sizeHint().height() ) ); sh += o->item->geometry().height() + spacing(); - o->item->setGeometry( TQRect( rct.x(), rct.y() + rct.height() - sh + spacing(), + o->item->setGeometry( TQRect( rct.x(), rct.y() + rct.height() - sh + spacing(), o->item->geometry().width(), o->item->geometry().height() ) ); } if ( o->pos == Center ) center = o; } - h = rct.height() - nh - sh; + h = rct.height() - nh - sh; it.toFirst(); while ( ( o = it.currentStruct() ) != 0 ) { ++it; if ( o->pos == West ) { - o->item->setGeometry( TQRect( rct.x() + ww, nh, o->item->sizeHint().width(), h ) ); + o->item->setGeometry( TQRect( rct.x() + ww, nh, o->item->sizeHint().width(), h ) ); ww += o->item->geometry().width() + spacing(); } if ( o->pos == East ) { o->item->setGeometry( TQRect( o->item->geometry().x(), o->item->geometry().y(), o->item->sizeHint().width(), h ) ); ew += o->item->geometry().width() + spacing(); - o->item->setGeometry( TQRect( rct.x() + rct.width() - ew + spacing(), nh, + o->item->setGeometry( TQRect( rct.x() + rct.width() - ew + spacing(), nh, o->item->geometry().width(), o->item->geometry().height() ) ); } } if ( center ) - center->item->setGeometry( TQRect( ww, nh, rct.width() - ew - ww, h ) ); + center->item->setGeometry( TQRect( ww, nh, rct.width() - ew - ww, h ) ); } void BorderLayout::calcSize( SizeType st ) @@ -611,7 +611,7 @@ public: TQSize sizeHint() const; TQSize minimumSize() const; TQLayoutIterator iterator(); - void setGeometry( const TQRect &rect ); + void setGeometry( const TQRect &rect ); private: TQPtrList<TQLayoutItem> list; @@ -684,7 +684,7 @@ CardLayout::~CardLayout() list.append( item ); } -void CardLayout::setGeometry( const TQRect &rct ) +void CardLayout::setGeometry( const TQRect &rct ) { TQLayout::setGeometry( rct ); @@ -696,12 +696,12 @@ CardLayout::~CardLayout() int i = 0; - int w = rct.width() - ( list.count() - 1 ) * spacing(); - int h = rct.height() - ( list.count() - 1 ) * spacing(); + int w = rct.width() - ( list.count() - 1 ) * spacing(); + int h = rct.height() - ( list.count() - 1 ) * spacing(); while ( ( o=it.current() ) != 0 ) { ++it; - TQRect geom( rct.x() + i * spacing(), rct.y() + i * spacing(), + TQRect geom( rct.x() + i * spacing(), rct.y() + i * spacing(), w, h ); o->setGeometry( geom ); ++i; -- cgit v1.2.3