|
|
|
@ -275,7 +275,7 @@ int FlowLayout::doLayoutHorizontal( const TQRect& rect, bool testOnly ){
|
|
|
|
|
int space = (rect.height() - height) / (column.count() + 1);
|
|
|
|
|
int i = 0; // counts the items of this column
|
|
|
|
|
for(TQLayoutItem* item = column.first(); item; item = column.next()){
|
|
|
|
|
TQRect r = item->tqgeometry();
|
|
|
|
|
TQRect r = item->geometry();
|
|
|
|
|
item->setGeometry( TQRect(r.left(), r.top() + ((++i) * space), rWidth, r.height()) );
|
|
|
|
|
}
|
|
|
|
|
column.clear(); // remove the items of the former column
|
|
|
|
@ -328,7 +328,7 @@ int FlowLayout::count() const {
|
|
|
|
|
\reimp
|
|
|
|
|
*/
|
|
|
|
|
TQLayoutItem* FlowLayout::itemAt(int index) const {
|
|
|
|
|
return index >= 0 && index < mLayoutItems.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(mLayoutItems).tqat(index)) : 0;
|
|
|
|
|
return index >= 0 && index < mLayoutItems.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(mLayoutItems).at(index)) : 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
@ -337,8 +337,8 @@ TQLayoutItem* FlowLayout::itemAt(int index) const {
|
|
|
|
|
TQLayoutItem* FlowLayout::takeAt(int index) {
|
|
|
|
|
if (index < 0 || index >= mLayoutItems.count())
|
|
|
|
|
return 0;
|
|
|
|
|
TQLayoutItem *item = mLayoutItems.tqat(index);
|
|
|
|
|
mLayoutItems.remove(mLayoutItems.tqat(index));
|
|
|
|
|
TQLayoutItem *item = mLayoutItems.at(index);
|
|
|
|
|
mLayoutItems.remove(mLayoutItems.at(index));
|
|
|
|
|
delete item;
|
|
|
|
|
|
|
|
|
|
invalidate();
|
|
|
|
|