diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-17 18:20:57 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-17 18:20:57 -0500 |
commit | e33879600503bacc0b4ef090f7f79ab80bb6b0da (patch) | |
tree | 44e01ee5c450ceb24586533757815b685c27cb9d /experimental/tqtinterface/qt4/src/kernel/tqlayout.cpp | |
parent | 10df383d2a019c4972a49273a3872c2e5489c7ff (diff) | |
download | tde-e33879600503bacc0b4ef090f7f79ab80bb6b0da.tar.gz tde-e33879600503bacc0b4ef090f7f79ab80bb6b0da.zip |
Rename tqsize* to size*
Diffstat (limited to 'experimental/tqtinterface/qt4/src/kernel/tqlayout.cpp')
-rw-r--r-- | experimental/tqtinterface/qt4/src/kernel/tqlayout.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/experimental/tqtinterface/qt4/src/kernel/tqlayout.cpp b/experimental/tqtinterface/qt4/src/kernel/tqlayout.cpp index e9f5493d1..a5c86dd79 100644 --- a/experimental/tqtinterface/qt4/src/kernel/tqlayout.cpp +++ b/experimental/tqtinterface/qt4/src/kernel/tqlayout.cpp @@ -46,7 +46,7 @@ #include "tqwidget.h" #include "tqmenubar.h" #include "tqptrlist.h" -#include "tqsizepolicy.h" +#include "sizepolicy.h" #include "tqlayoutengine_p.h" @@ -98,7 +98,7 @@ TQLayout *TQLayout::tqlayout() { return this; } -TQSize TQLayout::tqsizeHint() const { +TQSize TQLayout::sizeHint() const { return sizeHint(); } @@ -1451,7 +1451,7 @@ public: { item_ = TQT_TQLAYOUTITEM(new TQSpacerItem( w, h, hData, vData )); } ~TQGridBox() { delete item_; } - QSize tqsizeHint() const { return item_->sizeHint(); } + QSize sizeHint() const { return item_->sizeHint(); } QSize tqminimumSize() const { return item_->minimumSize(); } QSize tqmaximumSize() const { return item_->maximumSize(); } TQ_SPExpandData expandingDirections() const { return item_->expandingDirections(); } @@ -1505,7 +1505,7 @@ public: void add( TQGridBox*, int row, int col ); void add( TQGridBox*, int row1, int row2, int col1, int col2 ); - QSize tqsizeHint( int ) const; + QSize sizeHint( int ) const; QSize tqminimumSize( int ) const; QSize tqmaximumSize( int ) const; @@ -1650,7 +1650,7 @@ void TQGridLayoutData::recalcHFW( int w, int spacing ) int mh = 0; int n = 0; for ( int r = 0; r < rr; r++ ) { - h += rData[r].tqsizeHint; + h += rData[r].sizeHint; mh += rData[r].tqminimumSize; if ( !rData[r].empty ) n++; @@ -1765,9 +1765,9 @@ TQ_SPExpandData TQGridLayoutData::expanding( int spacing ) return (TQ_SPExpandData) ret; } -QSize TQGridLayoutData::tqsizeHint( int spacer ) const +QSize TQGridLayoutData::sizeHint( int spacer ) const { - return tqfindSize( &TQLayoutStruct::tqsizeHint, spacer ); + return tqfindSize( &TQLayoutStruct::sizeHint, spacer ); } 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 ) { - TQSize hint = box->tqsizeHint(); + TQSize hint = box->sizeHint(); TQSize minS = box->tqminimumSize(); TQSize maxS = box->tqmaximumSize(); @@ -1886,8 +1886,8 @@ void TQGridLayoutData::addData( TQGridBox *box, bool r, bool c ) if ( !cStretch[box->col] ) colData[box->col].stretch = TQMAX( colData[box->col].stretch, box->hStretch() ); - colData[box->col].tqsizeHint = TQMAX( hint.width(), - colData[box->col].tqsizeHint ); + colData[box->col].sizeHint = TQMAX( hint.width(), + colData[box->col].sizeHint ); colData[box->col].tqminimumSize = TQMAX( minS.width(), colData[box->col].tqminimumSize ); @@ -1899,8 +1899,8 @@ void TQGridLayoutData::addData( TQGridBox *box, bool r, bool c ) if ( !rStretch[box->row] ) rowData[box->row].stretch = TQMAX( rowData[box->row].stretch, box->vStretch() ); - rowData[box->row].tqsizeHint = TQMAX( hint.height(), - rowData[box->row].tqsizeHint ); + rowData[box->row].sizeHint = TQMAX( hint.height(), + rowData[box->row].sizeHint ); rowData[box->row].tqminimumSize = TQMAX( minS.height(), 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, int start, int end, - int minSize, int tqsizeHint, + int minSize, int sizeHint, TQMemArray<int> &stretchArray, int stretch ) { int i; @@ -1944,7 +1944,7 @@ static void distributeMultiBox( TQMemArray<TQLayoutStruct> &chain, int spacing, int max = 0; for ( i = start; i <= end; i++ ) { w += chain[i].tqminimumSize; - wh += chain[i].tqsizeHint; + wh += chain[i].sizeHint; max += chain[i].tqmaximumSize; chain[i].empty = FALSE; if ( stretchArray[i] == 0 ) @@ -1983,11 +1983,11 @@ static void distributeMultiBox( TQMemArray<TQLayoutStruct> &chain, int spacing, } } - if ( wh < tqsizeHint ) { - qGeomCalc( chain, start, end - start + 1, 0, tqsizeHint, spacing ); + if ( wh < sizeHint ) { + qGeomCalc( chain, start, end - start + 1, 0, sizeHint, spacing ); for ( i = start; i <= end; i++ ) { - if ( chain[i].tqsizeHint < chain[i].size ) - chain[i].tqsizeHint = chain[i].size; + if ( chain[i].sizeHint < chain[i].size ) + chain[i].sizeHint = chain[i].size; } } } @@ -2031,7 +2031,7 @@ void TQGridLayoutData::setupLayoutData( int spacing ) if ( c2 < 0 ) c2 = cc - 1; - TQSize hint = box->tqsizeHint(); + TQSize hint = box->sizeHint(); TQSize min = box->tqminimumSize(); if ( box->hasHeightForWidth() ) has_hfw = TRUE; @@ -2065,13 +2065,13 @@ void TQGridLayoutData::addHfwData( TQGridBox *box, int width ) TQMemArray<TQLayoutStruct> &rData = *hfwData; if ( box->hasHeightForWidth() ) { int hint = box->heightForWidth( width ); - rData[box->row].tqsizeHint = TQMAX( hint, rData[box->row].tqsizeHint ); + rData[box->row].sizeHint = TQMAX( hint, rData[box->row].sizeHint ); rData[box->row].tqminimumSize = TQMAX( hint, rData[box->row].tqminimumSize ); } else { - TQSize hint = box->tqsizeHint(); + TQSize hint = box->sizeHint(); TQSize minS = box->tqminimumSize(); - rData[box->row].tqsizeHint = TQMAX( hint.height(), - rData[box->row].tqsizeHint ); + rData[box->row].sizeHint = TQMAX( hint.height(), + rData[box->row].sizeHint ); rData[box->row].tqminimumSize = TQMAX( minS.height(), rData[box->row].tqminimumSize ); } @@ -2079,7 +2079,7 @@ void TQGridLayoutData::addHfwData( TQGridBox *box, int width ) /* Similar to setupLayoutData(), but uses heightForWidth(colData) - instead of tqsizeHint(). Assumes that setupLayoutData() and + instead of sizeHint(). Assumes that setupLayoutData() and qGeomCalc(colData) has been called. */ void TQGridLayoutData::setupHfwLayoutData( int spacing ) @@ -2088,7 +2088,7 @@ void TQGridLayoutData::setupHfwLayoutData( int spacing ) int i; for ( i = 0; i < rr; i++ ) { rData[i] = rowData[i]; - rData[i].tqminimumSize = rData[i].tqsizeHint = 0; + rData[i].tqminimumSize = rData[i].sizeHint = 0; } TQPtrListIterator<TQGridBox> it( things ); TQGridBox * box; @@ -2114,7 +2114,7 @@ void TQGridLayoutData::setupHfwLayoutData( int spacing ) if ( r1 == r2 ) { addHfwData( box, w ); } else { - TQSize hint = box->tqsizeHint(); + TQSize hint = box->sizeHint(); TQSize min = box->tqminimumSize(); if ( box->hasHeightForWidth() ) { int hfwh = box->heightForWidth( w ); @@ -2465,9 +2465,9 @@ int TQGridLayout::numCols() const /*! Returns the preferred size of this grid. */ -TQSize TQGridLayout::tqsizeHint() const +TQSize TQGridLayout::sizeHint() const { - return data->tqsizeHint( spacing() ) + TQSize( 2 * margin(), 2 * margin() ); + return data->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 aggressively than in previous versions of TQt. A non-default tqalignment now indicates that the widget should not grow to fill - the available space, but should be sized according to tqsizeHint(). + the available space, but should be sized according to sizeHint(). \endlist \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 fill the available space but should be sized according to - tqsizeHint(). + sizeHint(). \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 fill the available space but should be sized according to - tqsizeHint(). + sizeHint(). \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 - tqsizeHint(). A value of \c Vertical or \c Horizontal means that it wants + sizeHint(). A value of \c Vertical or \c Horizontal means that it wants to grow in only one dimension, whereas \c BothDirections means that it wants to grow in both dimensions. */ @@ -2998,7 +2998,7 @@ public: int hfwWidth; int hfwHeight; int hfwMinHeight; - TQSize tqsizeHint; + TQSize sizeHint; TQSize minSize; TQSize maxSize; TQ_SPExpandData expanding; @@ -3206,13 +3206,13 @@ TQBoxLayout::~TQBoxLayout() /*! Returns the preferred size of this box tqlayout. */ -TQSize TQBoxLayout::tqsizeHint() const +TQSize TQBoxLayout::sizeHint() const { if ( data->dirty ) { TQBoxLayout *that = (TQBoxLayout*)this; that->setupGeom(); } - return data->tqsizeHint + TQSize( 2 * margin(), 2 * margin() ); + return data->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 - tqsizeHint(). A value of \c Vertical or \c Horizontal means that it wants + sizeHint(). A value of \c Vertical or \c Horizontal means that it wants to grow in only one dimension, whereas \c BothDirections means that it wants to grow in both dimensions. */ @@ -3362,7 +3362,7 @@ void TQBoxLayout::setGeometry( const TQRect &r ) for ( int i = 0; i < n; i++ ) { TQBoxLayoutItem *box = data->list.at( i ); if ( box->item->hasHeightForWidth() ) - a[i].tqsizeHint = a[i].tqminimumSize = + a[i].sizeHint = a[i].tqminimumSize = 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 aggressively than in previous versions of TQt. A non-default tqalignment now indicates that the widget should not grow to fill - the available space, but should be sized according to tqsizeHint(). + the available space, but should be sized according to sizeHint(). \sa setAutoAdd(), insertLayout(), insertSpacing() */ @@ -3592,7 +3592,7 @@ void TQBoxLayout::addStretch( int stretch ) From TQt 3.0, the \a tqalignment parameter is interpreted more aggressively than in previous versions of TQt. A non-default tqalignment now indicates that the widget should not grow to fill - the available space, but should be sized according to tqsizeHint(). + the available space, but should be sized according to sizeHint(). \sa insertWidget(), setAutoAdd(), addLayout(), addSpacing() */ @@ -3717,7 +3717,7 @@ void TQBoxLayout::setDirection( Direction direction ) if ( sp ) { if ( sp->expandingDirections() == TQSizePolicy::NoDirection ) { //spacing or strut - TQSize s = sp->tqsizeHint(); + TQSize s = sp->sizeHint(); sp->changeSize( s.height(), s.width(), horz(direction) ? TQSizePolicy::Fixed:TQSizePolicy::Minimum, horz(direction) ? TQSizePolicy::Minimum:TQSizePolicy::Fixed ); @@ -3795,7 +3795,7 @@ void TQBoxLayout::setupGeom() minh = TQMAX( minh, min.height() ); hinth = TQMAX( hinth, hint.height() ); - a[i].tqsizeHint = hint.width(); + a[i].sizeHint = hint.width(); a[i].tqmaximumSize = max.width(); a[i].tqminimumSize = min.width(); a[i].expansive = expand; @@ -3812,7 +3812,7 @@ void TQBoxLayout::setupGeom() minw = TQMAX( minw, min.width() ); hintw = TQMAX( hintw, hint.width() ); - a[i].tqsizeHint = hint.height(); + a[i].sizeHint = hint.height(); a[i].tqmaximumSize = max.height(); a[i].tqminimumSize = min.height(); a[i].expansive = expand; @@ -3831,7 +3831,7 @@ void TQBoxLayout::setupGeom() ( (horexp ? TQSizePolicy::Horizontally : 0) | (verexp ? TQSizePolicy::Vertically : 0) ); - data->tqsizeHint = TQSize( hintw, hinth ) + data->sizeHint = TQSize( hintw, hinth ) .expandedTo( data->minSize ) .boundedTo( data->maxSize ); |