@ -46,7 +46,7 @@
# include "tqwidget.h"
# include "tqwidget.h"
# include "tqmenubar.h"
# include "tqmenubar.h"
# include "tqptrlist.h"
# include "tqptrlist.h"
# include " sizepolicy.h"
# include " tq sizepolicy.h"
# include "tqlayoutengine_p.h"
# include "tqlayoutengine_p.h"
@ -98,7 +98,7 @@ TQLayout *TQLayout::tqlayout() {
return this ;
return this ;
}
}
TQSize TQLayout : : sizeHint( ) const {
TQSize TQLayout : : tq sizeHint( ) const {
return sizeHint ( ) ;
return sizeHint ( ) ;
}
}
@ -1451,7 +1451,7 @@ public:
{ item_ = TQT_TQLAYOUTITEM ( new TQSpacerItem ( w , h , hData , vData ) ) ; }
{ item_ = TQT_TQLAYOUTITEM ( new TQSpacerItem ( w , h , hData , vData ) ) ; }
~ TQGridBox ( ) { delete item_ ; }
~ TQGridBox ( ) { delete item_ ; }
QSize sizeHint( ) const { return item_ - > sizeHint ( ) ; }
QSize tq sizeHint( ) const { return item_ - > sizeHint ( ) ; }
QSize tqminimumSize ( ) const { return item_ - > minimumSize ( ) ; }
QSize tqminimumSize ( ) const { return item_ - > minimumSize ( ) ; }
QSize tqmaximumSize ( ) const { return item_ - > maximumSize ( ) ; }
QSize tqmaximumSize ( ) const { return item_ - > maximumSize ( ) ; }
TQ_SPExpandData expandingDirections ( ) const { return item_ - > expandingDirections ( ) ; }
TQ_SPExpandData expandingDirections ( ) const { return item_ - > expandingDirections ( ) ; }
@ -1505,7 +1505,7 @@ public:
void add ( TQGridBox * , int row , int col ) ;
void add ( TQGridBox * , int row , int col ) ;
void add ( TQGridBox * , int row1 , int row2 , int col1 , int col2 ) ;
void add ( TQGridBox * , int row1 , int row2 , int col1 , int col2 ) ;
QSize sizeHint( int ) const ;
QSize tq sizeHint( int ) const ;
QSize tqminimumSize ( int ) const ;
QSize tqminimumSize ( int ) const ;
QSize tqmaximumSize ( int ) const ;
QSize tqmaximumSize ( int ) const ;
@ -1650,7 +1650,7 @@ void TQGridLayoutData::recalcHFW( int w, int spacing )
int mh = 0 ;
int mh = 0 ;
int n = 0 ;
int n = 0 ;
for ( int r = 0 ; r < rr ; r + + ) {
for ( int r = 0 ; r < rr ; r + + ) {
h + = rData [ r ] . sizeHint;
h + = rData [ r ] . tq sizeHint;
mh + = rData [ r ] . tqminimumSize ;
mh + = rData [ r ] . tqminimumSize ;
if ( ! rData [ r ] . empty )
if ( ! rData [ r ] . empty )
n + + ;
n + + ;
@ -1765,9 +1765,9 @@ TQ_SPExpandData TQGridLayoutData::expanding( int spacing )
return ( TQ_SPExpandData ) ret ;
return ( TQ_SPExpandData ) ret ;
}
}
QSize TQGridLayoutData : : sizeHint( int spacer ) const
QSize TQGridLayoutData : : tq sizeHint( int spacer ) const
{
{
return tqfindSize ( & TQLayoutStruct : : sizeHint, spacer ) ;
return tqfindSize ( & TQLayoutStruct : : tq sizeHint, spacer ) ;
}
}
QSize TQGridLayoutData : : tqmaximumSize ( int spacer ) const
QSize TQGridLayoutData : : tqmaximumSize ( int spacer ) const
@ -1878,7 +1878,7 @@ void TQGridLayoutData::add( TQGridBox *box, int row1, int row2, int col1,
void TQGridLayoutData : : addData ( TQGridBox * box , bool r , bool c )
void TQGridLayoutData : : addData ( TQGridBox * box , bool r , bool c )
{
{
TQSize hint = box - > sizeHint( ) ;
TQSize hint = box - > tq sizeHint( ) ;
TQSize minS = box - > tqminimumSize ( ) ;
TQSize minS = box - > tqminimumSize ( ) ;
TQSize maxS = box - > tqmaximumSize ( ) ;
TQSize maxS = box - > tqmaximumSize ( ) ;
@ -1886,8 +1886,8 @@ void TQGridLayoutData::addData( TQGridBox *box, bool r, bool c )
if ( ! cStretch [ box - > col ] )
if ( ! cStretch [ box - > col ] )
colData [ box - > col ] . stretch = TQMAX ( colData [ box - > col ] . stretch ,
colData [ box - > col ] . stretch = TQMAX ( colData [ box - > col ] . stretch ,
box - > hStretch ( ) ) ;
box - > hStretch ( ) ) ;
colData [ box - > col ] . sizeHint = TQMAX ( hint . width ( ) ,
colData [ box - > col ] . tq sizeHint = TQMAX ( hint . width ( ) ,
colData [ box - > col ] . sizeHint ) ;
colData [ box - > col ] . tq sizeHint ) ;
colData [ box - > col ] . tqminimumSize = TQMAX ( minS . width ( ) ,
colData [ box - > col ] . tqminimumSize = TQMAX ( minS . width ( ) ,
colData [ box - > col ] . tqminimumSize ) ;
colData [ box - > col ] . tqminimumSize ) ;
@ -1899,8 +1899,8 @@ void TQGridLayoutData::addData( TQGridBox *box, bool r, bool c )
if ( ! rStretch [ box - > row ] )
if ( ! rStretch [ box - > row ] )
rowData [ box - > row ] . stretch = TQMAX ( rowData [ box - > row ] . stretch ,
rowData [ box - > row ] . stretch = TQMAX ( rowData [ box - > row ] . stretch ,
box - > vStretch ( ) ) ;
box - > vStretch ( ) ) ;
rowData [ box - > row ] . sizeHint = TQMAX ( hint . height ( ) ,
rowData [ box - > row ] . tq sizeHint = TQMAX ( hint . height ( ) ,
rowData [ box - > row ] . sizeHint ) ;
rowData [ box - > row ] . tq sizeHint ) ;
rowData [ box - > row ] . tqminimumSize = TQMAX ( minS . height ( ) ,
rowData [ box - > row ] . tqminimumSize = TQMAX ( minS . height ( ) ,
rowData [ box - > row ] . tqminimumSize ) ;
rowData [ box - > row ] . tqminimumSize ) ;
@ -1935,7 +1935,7 @@ void TQGridLayoutData::addData( TQGridBox *box, bool r, bool c )
static void distributeMultiBox ( TQMemArray < TQLayoutStruct > & chain , int spacing ,
static void distributeMultiBox ( TQMemArray < TQLayoutStruct > & chain , int spacing ,
int start , int end ,
int start , int end ,
int minSize , int sizeHint,
int minSize , int tq sizeHint,
TQMemArray < int > & stretchArray , int stretch )
TQMemArray < int > & stretchArray , int stretch )
{
{
int i ;
int i ;
@ -1944,7 +1944,7 @@ static void distributeMultiBox( TQMemArray<TQLayoutStruct> &chain, int spacing,
int max = 0 ;
int max = 0 ;
for ( i = start ; i < = end ; i + + ) {
for ( i = start ; i < = end ; i + + ) {
w + = chain [ i ] . tqminimumSize ;
w + = chain [ i ] . tqminimumSize ;
wh + = chain [ i ] . sizeHint;
wh + = chain [ i ] . tq sizeHint;
max + = chain [ i ] . tqmaximumSize ;
max + = chain [ i ] . tqmaximumSize ;
chain [ i ] . empty = FALSE ;
chain [ i ] . empty = FALSE ;
if ( stretchArray [ i ] = = 0 )
if ( stretchArray [ i ] = = 0 )
@ -1983,11 +1983,11 @@ static void distributeMultiBox( TQMemArray<TQLayoutStruct> &chain, int spacing,
}
}
}
}
if ( wh < sizeHint ) {
if ( wh < tq sizeHint ) {
qGeomCalc ( chain , start , end - start + 1 , 0 , sizeHint, spacing ) ;
qGeomCalc ( chain , start , end - start + 1 , 0 , tq sizeHint, spacing ) ;
for ( i = start ; i < = end ; i + + ) {
for ( i = start ; i < = end ; i + + ) {
if ( chain [ i ] . sizeHint < chain [ i ] . size )
if ( chain [ i ] . tq sizeHint < chain [ i ] . size )
chain [ i ] . sizeHint = chain [ i ] . size ;
chain [ i ] . tq sizeHint = chain [ i ] . size ;
}
}
}
}
}
}
@ -2031,7 +2031,7 @@ void TQGridLayoutData::setupLayoutData( int spacing )
if ( c2 < 0 )
if ( c2 < 0 )
c2 = cc - 1 ;
c2 = cc - 1 ;
TQSize hint = box - > sizeHint( ) ;
TQSize hint = box - > tq sizeHint( ) ;
TQSize min = box - > tqminimumSize ( ) ;
TQSize min = box - > tqminimumSize ( ) ;
if ( box - > hasHeightForWidth ( ) )
if ( box - > hasHeightForWidth ( ) )
has_hfw = TRUE ;
has_hfw = TRUE ;
@ -2065,13 +2065,13 @@ void TQGridLayoutData::addHfwData( TQGridBox *box, int width )
TQMemArray < TQLayoutStruct > & rData = * hfwData ;
TQMemArray < TQLayoutStruct > & rData = * hfwData ;
if ( box - > hasHeightForWidth ( ) ) {
if ( box - > hasHeightForWidth ( ) ) {
int hint = box - > heightForWidth ( width ) ;
int hint = box - > heightForWidth ( width ) ;
rData [ box - > row ] . sizeHint = TQMAX ( hint , rData [ box - > row ] . sizeHint ) ;
rData [ box - > row ] . tq sizeHint = TQMAX ( hint , rData [ box - > row ] . tq sizeHint ) ;
rData [ box - > row ] . tqminimumSize = TQMAX ( hint , rData [ box - > row ] . tqminimumSize ) ;
rData [ box - > row ] . tqminimumSize = TQMAX ( hint , rData [ box - > row ] . tqminimumSize ) ;
} else {
} else {
TQSize hint = box - > sizeHint( ) ;
TQSize hint = box - > tq sizeHint( ) ;
TQSize minS = box - > tqminimumSize ( ) ;
TQSize minS = box - > tqminimumSize ( ) ;
rData [ box - > row ] . sizeHint = TQMAX ( hint . height ( ) ,
rData [ box - > row ] . tq sizeHint = TQMAX ( hint . height ( ) ,
rData [ box - > row ] . sizeHint ) ;
rData [ box - > row ] . tq sizeHint ) ;
rData [ box - > row ] . tqminimumSize = TQMAX ( minS . height ( ) ,
rData [ box - > row ] . tqminimumSize = TQMAX ( minS . height ( ) ,
rData [ box - > row ] . tqminimumSize ) ;
rData [ box - > row ] . tqminimumSize ) ;
}
}
@ -2079,7 +2079,7 @@ void TQGridLayoutData::addHfwData( TQGridBox *box, int width )
/*
/*
Similar to setupLayoutData ( ) , but uses heightForWidth ( colData )
Similar to setupLayoutData ( ) , but uses heightForWidth ( colData )
instead of sizeHint( ) . Assumes that setupLayoutData ( ) and
instead of tq sizeHint( ) . Assumes that setupLayoutData ( ) and
qGeomCalc ( colData ) has been called .
qGeomCalc ( colData ) has been called .
*/
*/
void TQGridLayoutData : : setupHfwLayoutData ( int spacing )
void TQGridLayoutData : : setupHfwLayoutData ( int spacing )
@ -2088,7 +2088,7 @@ void TQGridLayoutData::setupHfwLayoutData( int spacing )
int i ;
int i ;
for ( i = 0 ; i < rr ; i + + ) {
for ( i = 0 ; i < rr ; i + + ) {
rData [ i ] = rowData [ i ] ;
rData [ i ] = rowData [ i ] ;
rData [ i ] . tqminimumSize = rData [ i ] . sizeHint = 0 ;
rData [ i ] . tqminimumSize = rData [ i ] . tq sizeHint = 0 ;
}
}
TQPtrListIterator < TQGridBox > it ( things ) ;
TQPtrListIterator < TQGridBox > it ( things ) ;
TQGridBox * box ;
TQGridBox * box ;
@ -2114,7 +2114,7 @@ void TQGridLayoutData::setupHfwLayoutData( int spacing )
if ( r1 = = r2 ) {
if ( r1 = = r2 ) {
addHfwData ( box , w ) ;
addHfwData ( box , w ) ;
} else {
} else {
TQSize hint = box - > sizeHint( ) ;
TQSize hint = box - > tq sizeHint( ) ;
TQSize min = box - > tqminimumSize ( ) ;
TQSize min = box - > tqminimumSize ( ) ;
if ( box - > hasHeightForWidth ( ) ) {
if ( box - > hasHeightForWidth ( ) ) {
int hfwh = box - > heightForWidth ( w ) ;
int hfwh = box - > heightForWidth ( w ) ;
@ -2465,9 +2465,9 @@ int TQGridLayout::numCols() const
/*!
/*!
Returns the preferred size of this grid .
Returns the preferred size of this grid .
*/
*/
TQSize TQGridLayout : : sizeHint( ) const
TQSize TQGridLayout : : tq sizeHint( ) const
{
{
return data - > sizeHint( spacing ( ) ) + TQSize ( 2 * margin ( ) , 2 * margin ( ) ) ;
return data - > tq sizeHint( spacing ( ) ) + TQSize ( 2 * margin ( ) , 2 * margin ( ) ) ;
}
}
/*!
/*!
@ -2641,7 +2641,7 @@ void TQGridLayout::addMultiCell( QLayoutItem *item, int fromRow, int toRow,
\ i From TQt 3.0 , the \ a tqalignment parameter is interpreted more
\ i From TQt 3.0 , the \ a tqalignment parameter is interpreted more
aggressively than in previous versions of TQt . A non - default
aggressively than in previous versions of TQt . A non - default
tqalignment now indicates that the widget should not grow to fill
tqalignment now indicates that the widget should not grow to fill
the available space , but should be sized according to sizeHint( ) .
the available space , but should be sized according to tq sizeHint( ) .
\ endlist
\ endlist
\ sa addMultiCellWidget ( )
\ sa addMultiCellWidget ( )
@ -2673,7 +2673,7 @@ void TQGridLayout::addWidget( TQWidget *w, int row, int col, int tqalignment )
A non - zero tqalignment indicates that the widget should not grow to
A non - zero tqalignment indicates that the widget should not grow to
fill the available space but should be sized according to
fill the available space but should be sized according to
sizeHint( ) .
tq sizeHint( ) .
\ sa addWidget ( )
\ sa addWidget ( )
*/
*/
@ -2714,7 +2714,7 @@ void TQGridLayout::addLayout( TQLayout *tqlayout, int row, int col )
A non - zero tqalignment indicates that the tqlayout should not grow to
A non - zero tqalignment indicates that the tqlayout should not grow to
fill the available space but should be sized according to
fill the available space but should be sized according to
sizeHint( ) .
tq sizeHint( ) .
\ a tqlayout becomes a child of the grid tqlayout .
\ a tqlayout becomes a child of the grid tqlayout .
@ -2858,7 +2858,7 @@ int TQGridLayout::colSpacing( int col ) const
/*!
/*!
Returns whether this tqlayout can make use of more space than
Returns whether this tqlayout can make use of more space than
sizeHint( ) . A value of \ c Vertical or \ c Horizontal means that it wants
tq sizeHint( ) . A value of \ c Vertical or \ c Horizontal means that it wants
to grow in only one dimension , whereas \ c BothDirections means that
to grow in only one dimension , whereas \ c BothDirections means that
it wants to grow in both dimensions .
it wants to grow in both dimensions .
*/
*/
@ -2998,7 +2998,7 @@ public:
int hfwWidth ;
int hfwWidth ;
int hfwHeight ;
int hfwHeight ;
int hfwMinHeight ;
int hfwMinHeight ;
TQSize sizeHint;
TQSize tq sizeHint;
TQSize minSize ;
TQSize minSize ;
TQSize maxSize ;
TQSize maxSize ;
TQ_SPExpandData expanding ;
TQ_SPExpandData expanding ;
@ -3206,13 +3206,13 @@ TQBoxLayout::~TQBoxLayout()
/*!
/*!
Returns the preferred size of this box tqlayout .
Returns the preferred size of this box tqlayout .
*/
*/
TQSize TQBoxLayout : : sizeHint( ) const
TQSize TQBoxLayout : : tq sizeHint( ) const
{
{
if ( data - > dirty ) {
if ( data - > dirty ) {
TQBoxLayout * that = ( TQBoxLayout * ) this ;
TQBoxLayout * that = ( TQBoxLayout * ) this ;
that - > setupGeom ( ) ;
that - > setupGeom ( ) ;
}
}
return data - > sizeHint + TQSize ( 2 * margin ( ) , 2 * margin ( ) ) ;
return data - > tq sizeHint + TQSize ( 2 * margin ( ) , 2 * margin ( ) ) ;
}
}
/*!
/*!
@ -3328,7 +3328,7 @@ TQLayoutItem* TQBoxLayout::takeAt(int index) {
/*!
/*!
Returns whether this tqlayout can make use of more space than
Returns whether this tqlayout can make use of more space than
sizeHint( ) . A value of \ c Vertical or \ c Horizontal means that it wants
tq sizeHint( ) . A value of \ c Vertical or \ c Horizontal means that it wants
to grow in only one dimension , whereas \ c BothDirections means that
to grow in only one dimension , whereas \ c BothDirections means that
it wants to grow in both dimensions .
it wants to grow in both dimensions .
*/
*/
@ -3362,7 +3362,7 @@ void TQBoxLayout::setGeometry( const TQRect &r )
for ( int i = 0 ; i < n ; i + + ) {
for ( int i = 0 ; i < n ; i + + ) {
TQBoxLayoutItem * box = data - > list . at ( i ) ;
TQBoxLayoutItem * box = data - > list . at ( i ) ;
if ( box - > item - > hasHeightForWidth ( ) )
if ( box - > item - > hasHeightForWidth ( ) )
a [ i ] . sizeHint = a [ i ] . tqminimumSize =
a [ i ] . tq sizeHint = a [ i ] . tqminimumSize =
box - > item - > heightForWidth ( s . width ( ) ) ;
box - > item - > heightForWidth ( s . width ( ) ) ;
}
}
}
}
@ -3528,7 +3528,7 @@ void TQBoxLayout::insertLayout( int index, TQLayout *tqlayout, int stretch )
From TQt 3.0 , the \ a tqalignment parameter is interpreted more
From TQt 3.0 , the \ a tqalignment parameter is interpreted more
aggressively than in previous versions of TQt . A non - default
aggressively than in previous versions of TQt . A non - default
tqalignment now indicates that the widget should not grow to fill
tqalignment now indicates that the widget should not grow to fill
the available space , but should be sized according to sizeHint( ) .
the available space , but should be sized according to tq sizeHint( ) .
\ sa setAutoAdd ( ) , insertLayout ( ) , insertSpacing ( )
\ sa setAutoAdd ( ) , insertLayout ( ) , insertSpacing ( )
*/
*/
@ -3592,7 +3592,7 @@ void TQBoxLayout::addStretch( int stretch )
From TQt 3.0 , the \ a tqalignment parameter is interpreted more
From TQt 3.0 , the \ a tqalignment parameter is interpreted more
aggressively than in previous versions of TQt . A non - default
aggressively than in previous versions of TQt . A non - default
tqalignment now indicates that the widget should not grow to fill
tqalignment now indicates that the widget should not grow to fill
the available space , but should be sized according to sizeHint( ) .
the available space , but should be sized according to tq sizeHint( ) .
\ sa insertWidget ( ) , setAutoAdd ( ) , addLayout ( ) , addSpacing ( )
\ sa insertWidget ( ) , setAutoAdd ( ) , addLayout ( ) , addSpacing ( )
*/
*/
@ -3717,7 +3717,7 @@ void TQBoxLayout::setDirection( Direction direction )
if ( sp ) {
if ( sp ) {
if ( sp - > expandingDirections ( ) = = TQSizePolicy : : NoDirection ) {
if ( sp - > expandingDirections ( ) = = TQSizePolicy : : NoDirection ) {
//spacing or strut
//spacing or strut
TQSize s = sp - > sizeHint( ) ;
TQSize s = sp - > tq sizeHint( ) ;
sp - > changeSize ( s . height ( ) , s . width ( ) ,
sp - > changeSize ( s . height ( ) , s . width ( ) ,
horz ( direction ) ? TQSizePolicy : : Fixed : TQSizePolicy : : Minimum ,
horz ( direction ) ? TQSizePolicy : : Fixed : TQSizePolicy : : Minimum ,
horz ( direction ) ? TQSizePolicy : : Minimum : TQSizePolicy : : Fixed ) ;
horz ( direction ) ? TQSizePolicy : : Minimum : TQSizePolicy : : Fixed ) ;
@ -3795,7 +3795,7 @@ void TQBoxLayout::setupGeom()
minh = TQMAX ( minh , min . height ( ) ) ;
minh = TQMAX ( minh , min . height ( ) ) ;
hinth = TQMAX ( hinth , hint . height ( ) ) ;
hinth = TQMAX ( hinth , hint . height ( ) ) ;
a [ i ] . sizeHint = hint . width ( ) ;
a [ i ] . tq sizeHint = hint . width ( ) ;
a [ i ] . tqmaximumSize = max . width ( ) ;
a [ i ] . tqmaximumSize = max . width ( ) ;
a [ i ] . tqminimumSize = min . width ( ) ;
a [ i ] . tqminimumSize = min . width ( ) ;
a [ i ] . expansive = expand ;
a [ i ] . expansive = expand ;
@ -3812,7 +3812,7 @@ void TQBoxLayout::setupGeom()
minw = TQMAX ( minw , min . width ( ) ) ;
minw = TQMAX ( minw , min . width ( ) ) ;
hintw = TQMAX ( hintw , hint . width ( ) ) ;
hintw = TQMAX ( hintw , hint . width ( ) ) ;
a [ i ] . sizeHint = hint . height ( ) ;
a [ i ] . tq sizeHint = hint . height ( ) ;
a [ i ] . tqmaximumSize = max . height ( ) ;
a [ i ] . tqmaximumSize = max . height ( ) ;
a [ i ] . tqminimumSize = min . height ( ) ;
a [ i ] . tqminimumSize = min . height ( ) ;
a [ i ] . expansive = expand ;
a [ i ] . expansive = expand ;
@ -3831,7 +3831,7 @@ void TQBoxLayout::setupGeom()
( ( horexp ? TQSizePolicy : : Horizontally : 0 )
( ( horexp ? TQSizePolicy : : Horizontally : 0 )
| ( verexp ? TQSizePolicy : : Vertically : 0 ) ) ;
| ( verexp ? TQSizePolicy : : Vertically : 0 ) ) ;
data - > sizeHint = TQSize ( hintw , hinth )
data - > tq sizeHint = TQSize ( hintw , hinth )
. expandedTo ( data - > minSize )
. expandedTo ( data - > minSize )
. boundedTo ( data - > maxSize ) ;
. boundedTo ( data - > maxSize ) ;