diff options
Diffstat (limited to 'kradio3/plugins/gui-quickbar')
-rw-r--r-- | kradio3/plugins/gui-quickbar/buttonflowlayout.cpp | 28 | ||||
-rw-r--r-- | kradio3/plugins/gui-quickbar/buttonflowlayout.h | 12 | ||||
-rw-r--r-- | kradio3/plugins/gui-quickbar/quickbar.cpp | 12 |
3 files changed, 26 insertions, 26 deletions
diff --git a/kradio3/plugins/gui-quickbar/buttonflowlayout.cpp b/kradio3/plugins/gui-quickbar/buttonflowlayout.cpp index 4cd8dd0..38cdbac 100644 --- a/kradio3/plugins/gui-quickbar/buttonflowlayout.cpp +++ b/kradio3/plugins/gui-quickbar/buttonflowlayout.cpp @@ -1,7 +1,7 @@ /**************************************************************************** -** $Id: buttonflowtqlayout.cpp 272 2005-05-18 08:12:51Z emw $ +** $Id: buttonflowlayout.cpp 272 2005-05-18 08:12:51Z emw $ ** -** Implementing your own tqlayout: flow example +** Implementing your own layout: flow example ** ** Copyright (C) 1996 by Trolltech AS. All rights reserved. ** @@ -104,9 +104,9 @@ bool ButtonFlowLayout::hasHeightForWidth() const return TRUE; } -TQSize ButtonFlowLayout::tqsizeHint() const +TQSize ButtonFlowLayout::sizeHint() const { - return tqminimumSize(); + return minimumSize(); } TQSizePolicy::ExpandData ButtonFlowLayout::expanding() const @@ -133,7 +133,7 @@ void ButtonFlowLayout::setGeometry( const TQRect &r ) int ButtonFlowLayout::doLayout( const TQRect &r, bool testonly ) { -/* kdDebug() << "buttonflowtqlayout::doLayout (" +/* kdDebug() << "buttonflowlayout::doLayout (" << r.x() << "," << r.y() << "," << r.width() << "," << r.height() << ", " << testonly << ")\n"; */ @@ -154,8 +154,8 @@ int ButtonFlowLayout::doLayout( const TQRect &r, bool testonly ) it.toFirst(); while ( (o=it.current()) != 0 ) { ++it; - buttonWidth = TQMAX( buttonWidth, o->tqsizeHint().width() ); - buttonHeight = TQMAX( buttonHeight, o->tqsizeHint().height() ); + buttonWidth = TQMAX( buttonWidth, o->sizeHint().width() ); + buttonHeight = TQMAX( buttonHeight, o->sizeHint().height() ); } // calculate the optimal width @@ -217,19 +217,19 @@ int ButtonFlowLayout::doLayout( const TQRect &r, bool testonly ) } -TQSize ButtonFlowLayout::tqminimumSize() const +TQSize ButtonFlowLayout::minimumSize() const { - return tqminimumSize(tqgeometry().size()); + return minimumSize(geometry().size()); } -TQSize ButtonFlowLayout::tqminimumSize(const TQSize &r) const +TQSize ButtonFlowLayout::minimumSize(const TQSize &r) const { TQSize s(0, 0); for (TQPtrListIterator<TQLayoutItem> it(list); it.current(); ++it) { TQLayoutItem *o = it.current(); - s = s.expandedTo( o->tqsizeHint()); //tqminimumSize() ); + s = s.expandedTo( o->sizeHint()); //minimumSize() ); } s.setHeight(heightForWidth(r.width())); @@ -249,7 +249,7 @@ int ButtonFlowLayout::count() const { \reimp */ TQLayoutItem* ButtonFlowLayout::itemAt(int index) const { - return index >= 0 && index < list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(list).tqat(index)) : 0; + return index >= 0 && index < list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(list).at(index)) : 0; } /*! @@ -258,8 +258,8 @@ TQLayoutItem* ButtonFlowLayout::itemAt(int index) const { TQLayoutItem* ButtonFlowLayout::takeAt(int index) { if (index < 0 || index >= list.count()) return 0; - TQLayoutItem *item = list.tqat(index); - list.remove(list.tqat(index)); + TQLayoutItem *item = list.at(index); + list.remove(list.at(index)); delete item; invalidate(); diff --git a/kradio3/plugins/gui-quickbar/buttonflowlayout.h b/kradio3/plugins/gui-quickbar/buttonflowlayout.h index fe33efc..3346c6d 100644 --- a/kradio3/plugins/gui-quickbar/buttonflowlayout.h +++ b/kradio3/plugins/gui-quickbar/buttonflowlayout.h @@ -1,7 +1,7 @@ /**************************************************************************** -** $Id: buttonflowtqlayout.h 471 2006-11-11 17:04:51Z emw $ +** $Id: buttonflowlayout.h 471 2006-11-11 17:04:51Z emw $ ** -** Definition of simple flow tqlayout for custom tqlayout example +** Definition of simple flow layout for custom layout example ** ** Created : 979899 ** @@ -23,7 +23,7 @@ #include "../../src/include/utils.h" -#include <tqlayout.h> +#include <layout.h> #include <tqptrlist.h> class ButtonFlowLayout : public TQLayout @@ -41,9 +41,9 @@ public: void addItem( TQLayoutItem *item); bool hasHeightForWidth() const; int heightForWidth( int ) const; - TQSize tqsizeHint() const; - TQSize tqminimumSize() const; - TQSize tqminimumSize(const TQSize &r) const; // tqminimumSize is dependent from width + TQSize sizeHint() const; + TQSize minimumSize() const; + TQSize minimumSize(const TQSize &r) const; // minimumSize is dependent from width TQLayoutIterator iterator(); TQSizePolicy::ExpandData expanding() const; diff --git a/kradio3/plugins/gui-quickbar/quickbar.cpp b/kradio3/plugins/gui-quickbar/quickbar.cpp index ca1d4d8..eee163e 100644 --- a/kradio3/plugins/gui-quickbar/quickbar.cpp +++ b/kradio3/plugins/gui-quickbar/quickbar.cpp @@ -303,7 +303,7 @@ void QuickBar::rebuildGUI() else b->setText(m_showShortName ? rs.shortName() : rs.name()); - b->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred)); + b->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Preferred)); TQToolTip::add(b, rs.longName()); if (isVisible()) b->show(); @@ -316,9 +316,9 @@ void QuickBar::rebuildGUI() // activate correct button activateCurrentButton(); - // calculate tqgeometry + // calculate geometry if (m_layout) { - TQRect r = tqgeometry(); + TQRect r = geometry(); int h = m_layout->heightForWidth( r.width()); if (h > r.height()) @@ -367,7 +367,7 @@ void QuickBar::setGeometry (int x, int y, int w, int h) { if (m_layout) { TQSize marginSize(m_layout->margin()*2, m_layout->margin()*2); - setMinimumSize(m_layout->tqminimumSize(TQSize(w, h) - marginSize) + marginSize); + setMinimumSize(m_layout->minimumSize(TQSize(w, h) - marginSize) + marginSize); } TQWidget::setGeometry (x, y, w, h); } @@ -381,10 +381,10 @@ void QuickBar::setGeometry (const TQRect &r) void QuickBar::resizeEvent (TQResizeEvent *e) { - // tqminimumSize might change because of the flow tqlayout + // minimumSize might change because of the flow layout if (m_layout) { TQSize marginSize(m_layout->margin()*2, m_layout->margin()*2); - setMinimumSize(m_layout->tqminimumSize(e->size() - marginSize) + marginSize); + setMinimumSize(m_layout->minimumSize(e->size() - marginSize) + marginSize); } TQWidget::resizeEvent (e); |