diff options
Diffstat (limited to 'doc/html/customlayout-example.html')
-rw-r--r-- | doc/html/customlayout-example.html | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/doc/html/customlayout-example.html b/doc/html/customlayout-example.html index e40ad039..1e87be29 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 <a href="ntqrect.html">TQRect</a>& ); + void setGeometry( const <a href="tqrect.html">TQRect</a>& ); private: - int doLayout( const <a href="ntqrect.html">TQRect</a>&, bool testonly = FALSE ); + int doLayout( const <a href="tqrect.html">TQRect</a>&, bool testonly = FALSE ); <a href="tqptrlist.html">TQPtrList</a><TQLayoutItem> list; int cached_width; int cached_hfw; @@ -191,24 +191,24 @@ SimpleFlow::~SimpleFlow() return TQLayoutIterator( new SimpleFlowIterator( &list ) ); } -<a name="x1471"></a>void SimpleFlow::<a href="ntqlayout.html#setGeometry">setGeometry</a>( const <a href="ntqrect.html">TQRect</a> &r ) +<a name="x1471"></a>void SimpleFlow::<a href="ntqlayout.html#setGeometry">setGeometry</a>( const <a href="tqrect.html">TQRect</a> &r ) { TQLayout::<a href="ntqlayout.html#setGeometry">setGeometry</a>( r ); doLayout( r ); } -int <a name="f451"></a>SimpleFlow::doLayout( const <a href="ntqrect.html">TQRect</a> &r, bool testonly ) +int <a name="f451"></a>SimpleFlow::doLayout( const <a href="tqrect.html">TQRect</a> &r, bool testonly ) { - int x = r.<a href="ntqrect.html#x">x</a>(); - int y = r.<a href="ntqrect.html#y">y</a>(); + int x = r.<a href="tqrect.html#x">x</a>(); + int y = r.<a href="tqrect.html#y">y</a>(); int h = 0; //height of this line so far. <a href="tqptrlistiterator.html">TQPtrListIterator</a><TQLayoutItem> it(list); <a href="qlayoutitem.html">TQLayoutItem</a> *o; <a name="x1481"></a> while ( (o=it.<a href="tqptrlistiterator.html#current">current</a>()) != 0 ) { ++it; int nextX = x + o-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().width() + spacing(); -<a name="x1482"></a> if ( nextX - spacing() > r.<a href="ntqrect.html#right">right</a>() && h > 0 ) { - x = r.<a href="ntqrect.html#x">x</a>(); +<a name="x1482"></a> if ( nextX - spacing() > r.<a href="tqrect.html#right">right</a>() && h > 0 ) { + x = r.<a href="tqrect.html#x">x</a>(); y = y + h + spacing(); nextX = x + o-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().width() + spacing(); h = 0; @@ -218,7 +218,7 @@ int <a name="f451"></a>SimpleFlow::doLayout( const <a href="ntqrect.html">TQRect x = nextX; h = TQMAX( h, o-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().height() ); } - return y + h - r.<a href="ntqrect.html#y">y</a>(); + return y + h - r.<a href="tqrect.html#y">y</a>(); } <a name="x1470"></a>TQSize SimpleFlow::<a href="ntqlayout.html#minimumSize">minimumSize</a>() const @@ -263,7 +263,7 @@ public: : <a href="tqwidgetitem.html">TQWidgetItem</a>( w ) {} - void setGeometry( const <a href="ntqrect.html">TQRect</a> &r ) + void setGeometry( const <a href="tqrect.html">TQRect</a> &r ) { widget()->setGeometry( r ); } }; @@ -328,10 +328,10 @@ public: TQSizePolicy::ExpandData expanding() const; protected: - void setGeometry( const <a href="ntqrect.html">TQRect</a> &rect ); + void setGeometry( const <a href="tqrect.html">TQRect</a> &rect ); private: - void doLayout( const <a href="ntqrect.html">TQRect</a> &rect, bool testonly = FALSE ); + void doLayout( const <a href="tqrect.html">TQRect</a> &rect, bool testonly = FALSE ); void calcSize( SizeType st ); <a href="tqptrlist.html">TQPtrList</a><BorderLayoutStruct> list; @@ -470,13 +470,13 @@ void <a name="f453"></a>BorderLayout::addWidget( <a href="tqwidget.html">TQWidge return TQLayoutIterator( new BorderLayoutIterator( &list ) ); } -<a name="x1494"></a>void BorderLayout::<a href="ntqlayout.html#setGeometry">setGeometry</a>( const <a href="ntqrect.html">TQRect</a> &rct ) +<a name="x1494"></a>void BorderLayout::<a href="ntqlayout.html#setGeometry">setGeometry</a>( const <a href="tqrect.html">TQRect</a> &rct ) { TQLayout::<a href="ntqlayout.html#setGeometry">setGeometry</a>( rct ); doLayout( rct ); } -void <a name="f454"></a>BorderLayout::doLayout( const <a href="ntqrect.html">TQRect</a> &rct, bool /*testonly*/ ) +void <a name="f454"></a>BorderLayout::doLayout( const <a href="tqrect.html">TQRect</a> &rct, bool /*testonly*/ ) { int ew = 0, ww = 0, nh = 0, sh = 0; int h = 0; @@ -488,41 +488,41 @@ void <a name="f454"></a>BorderLayout::doLayout( const <a href="ntqrect.html">TQR ++it; if ( o->pos == North ) { -<a name="x1506"></a><a name="x1505"></a><a name="x1498"></a> o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( rct.<a href="ntqrect.html#x">x</a>(), nh, rct.<a href="ntqrect.html#width">width</a>(), o->item-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().height() ) ); +<a name="x1506"></a><a name="x1505"></a><a name="x1498"></a> o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( rct.<a href="tqrect.html#x">x</a>(), nh, rct.<a href="tqrect.html#width">width</a>(), o->item-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().height() ) ); <a name="x1495"></a> nh += o->item-><a href="qlayoutitem.html#geometry">geometry</a>().height() + spacing(); } if ( o->pos == South ) { o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( o->item-><a href="qlayoutitem.html#geometry">geometry</a>().x(), o->item-><a href="qlayoutitem.html#geometry">geometry</a>().y(), - rct.<a href="ntqrect.html#width">width</a>(), o->item-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().height() ) ); + rct.<a href="tqrect.html#width">width</a>(), o->item-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().height() ) ); sh += o->item-><a href="qlayoutitem.html#geometry">geometry</a>().height() + spacing(); - o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( rct.<a href="ntqrect.html#x">x</a>(), rct.<a href="ntqrect.html#y">y</a>() + rct.<a href="ntqrect.html#height">height</a>() - sh + spacing(), + o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( rct.<a href="tqrect.html#x">x</a>(), rct.<a href="tqrect.html#y">y</a>() + rct.<a href="tqrect.html#height">height</a>() - sh + spacing(), o->item-><a href="qlayoutitem.html#geometry">geometry</a>().width(), o->item-><a href="qlayoutitem.html#geometry">geometry</a>().height() ) ); } if ( o->pos == Center ) center = o; } - h = rct.<a href="ntqrect.html#height">height</a>() - nh - sh; + h = rct.<a href="tqrect.html#height">height</a>() - nh - sh; it.toFirst(); while ( ( o = it.currentStruct() ) != 0 ) { ++it; if ( o->pos == West ) { - o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( rct.<a href="ntqrect.html#x">x</a>() + ww, nh, o->item-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().width(), h ) ); + o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( rct.<a href="tqrect.html#x">x</a>() + ww, nh, o->item-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().width(), h ) ); ww += o->item-><a href="qlayoutitem.html#geometry">geometry</a>().width() + spacing(); } if ( o->pos == East ) { o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( o->item-><a href="qlayoutitem.html#geometry">geometry</a>().x(), o->item-><a href="qlayoutitem.html#geometry">geometry</a>().y(), o->item-><a href="qlayoutitem.html#sizeHint">sizeHint</a>().width(), h ) ); ew += o->item-><a href="qlayoutitem.html#geometry">geometry</a>().width() + spacing(); - o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( rct.<a href="ntqrect.html#x">x</a>() + rct.<a href="ntqrect.html#width">width</a>() - ew + spacing(), nh, + o->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( rct.<a href="tqrect.html#x">x</a>() + rct.<a href="tqrect.html#width">width</a>() - ew + spacing(), nh, o->item-><a href="qlayoutitem.html#geometry">geometry</a>().width(), o->item-><a href="qlayoutitem.html#geometry">geometry</a>().height() ) ); } } if ( center ) - center->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( ww, nh, rct.<a href="ntqrect.html#width">width</a>() - ew - ww, h ) ); + center->item-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( TQRect( ww, nh, rct.<a href="tqrect.html#width">width</a>() - ew - ww, h ) ); } void <a name="f455"></a>BorderLayout::calcSize( SizeType st ) @@ -611,7 +611,7 @@ public: <a href="tqsize.html">TQSize</a> sizeHint() const; <a href="tqsize.html">TQSize</a> minimumSize() const; <a href="qlayoutiterator.html">TQLayoutIterator</a> iterator(); - void setGeometry( const <a href="ntqrect.html">TQRect</a> &rect ); + void setGeometry( const <a href="tqrect.html">TQRect</a> &rect ); private: <a href="tqptrlist.html">TQPtrList</a><TQLayoutItem> list; @@ -684,7 +684,7 @@ CardLayout::~CardLayout() <a name="x1518"></a> list.<a href="tqptrlist.html#append">append</a>( item ); } -<a name="x1514"></a>void CardLayout::<a href="ntqlayout.html#setGeometry">setGeometry</a>( const <a href="ntqrect.html">TQRect</a> &rct ) +<a name="x1514"></a>void CardLayout::<a href="ntqlayout.html#setGeometry">setGeometry</a>( const <a href="tqrect.html">TQRect</a> &rct ) { TQLayout::<a href="ntqlayout.html#setGeometry">setGeometry</a>( rct ); @@ -696,12 +696,12 @@ CardLayout::~CardLayout() int i = 0; - int w = rct.<a href="ntqrect.html#width">width</a>() - ( list.<a href="tqptrlist.html#count">count</a>() - 1 ) * spacing(); - int h = rct.<a href="ntqrect.html#height">height</a>() - ( list.<a href="tqptrlist.html#count">count</a>() - 1 ) * spacing(); + int w = rct.<a href="tqrect.html#width">width</a>() - ( list.<a href="tqptrlist.html#count">count</a>() - 1 ) * spacing(); + int h = rct.<a href="tqrect.html#height">height</a>() - ( list.<a href="tqptrlist.html#count">count</a>() - 1 ) * spacing(); <a name="x1523"></a> while ( ( o=it.<a href="tqptrlistiterator.html#current">current</a>() ) != 0 ) { ++it; - <a href="ntqrect.html">TQRect</a> geom( rct.<a href="ntqrect.html#x">x</a>() + i * spacing(), rct.<a href="ntqrect.html#y">y</a>() + i * spacing(), + <a href="tqrect.html">TQRect</a> geom( rct.<a href="tqrect.html#x">x</a>() + i * spacing(), rct.<a href="tqrect.html#y">y</a>() + i * spacing(), w, h ); <a name="x1516"></a> o-><a href="qlayoutitem.html#setGeometry">setGeometry</a>( geom ); ++i; |