diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-04 20:48:23 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-04 20:48:23 +0000 |
commit | 383adc283801b6238d8acfc750890613a63f8060 (patch) | |
tree | af3a65389067c05263db2ef4551a541501422998 /src/flowlayout.h | |
parent | da7847adb43726079c7a4be1f06acbebe0bdde57 (diff) | |
download | kima-383adc283801b6238d8acfc750890613a63f8060.tar.gz kima-383adc283801b6238d8acfc750890613a63f8060.zip |
TQt4 port kima
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kima@1239290 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/flowlayout.h')
-rw-r--r-- | src/flowlayout.h | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/src/flowlayout.h b/src/flowlayout.h index 1695872..e928050 100644 --- a/src/flowlayout.h +++ b/src/flowlayout.h @@ -20,14 +20,15 @@ #ifndef FLOWLAYOUT_H #define FLOWLAYOUT_H -#include <qlayout.h> -#include <qptrlist.h> +#include <tqlayout.h> +#include <tqptrlist.h> class Source; class KConfig; -class FlowLayout : public QLayout{ - Q_OBJECT //macro which activates signals and slots (moc) +class FlowLayout : public TQLayout{ + Q_OBJECT + TQ_OBJECT //macro which activates signals and slots (tqmoc) public: /** * the direction for moveItem @@ -36,8 +37,8 @@ public: ABOVE = 0, BELOW = 1 }; - FlowLayout( QWidget* parent, Qt::Orientation orientation=Qt::Horizontal, int border=0, int space=-1, const char* name=0 ); - FlowLayout( QLayout* parent, Qt::Orientation orientation=Qt::Horizontal, int space=-1, const char* name=0 ); + FlowLayout( TQWidget* tqparent, Qt::Orientation orientation=Qt::Horizontal, int border=0, int space=-1, const char* name=0 ); + FlowLayout( TQLayout* tqparent, Qt::Orientation orientation=Qt::Horizontal, int space=-1, const char* name=0 ); FlowLayout( Qt::Orientation=Qt::Horizontal, int space=-1, const char* name=0 ); virtual ~FlowLayout(); /** @@ -46,9 +47,9 @@ public: void updatePositions(KConfig * inKConfig); void addItem(QLayoutItem* item); void addSource(Source* src); - void remove(QWidget* widget); + void remove(TQWidget* widget); /** - * Returns the number of items in the layout + * Returns the number of items in the tqlayout */ uint count(); /** @@ -56,30 +57,35 @@ public: * \param dir ABOVE if above, BENEATH if beneath * \return the new Position or -1 if no real move was made */ - bool moveItem(const QLayoutItem* which, const QLayoutItem* relate, DIRECTION direction); + bool moveItem(const TQLayoutItem* which, const TQLayoutItem* relate, DIRECTION direction); bool hasHeightForWidth() const; int heightForWidth(int w) const; bool hasWidthForHeight() const; int widthForHeight(int h) const; - QSize sizeHint() const; - QSize minimumSize() const; - QLayoutIterator iterator(); - QSizePolicy::ExpandData expanding() const; + TQSize tqsizeHint() const; + TQSize tqminimumSize() const; + TQLayoutIterator iterator(); + TQSizePolicy::ExpandData expanding() const; Qt::Orientation getOrientation() const; + +#ifdef USE_QT4 + QLAYOUT_REQUIRED_METHOD_DECLARATIONS +#endif // USE_QT4 + public slots: void setOrientation(Qt::Orientation orientation); protected: - void setGeometry(const QRect&); + void setGeometry(const TQRect&); private: - int doLayout( const QRect&, bool testOnly = FALSE ); - int doLayoutHorizontal( const QRect&, bool testOnly ); - int doLayoutVertical( const QRect&, bool testOnly ); + int doLayout( const TQRect&, bool testOnly = FALSE ); + int doLayoutHorizontal( const TQRect&, bool testOnly ); + int doLayoutVertical( const TQRect&, bool testOnly ); Qt::Orientation mOrientation; - QPtrList<QLayoutItem> mLayoutItems; - // this is the connection between a layout item and its source. - QMap<QLayoutItem*, Source*> mSources; - QLayoutItem* mLastItem; // the item that was last added + TQPtrList<TQLayoutItem> mLayoutItems; + // this is the connection between a tqlayout item and its source. + TQMap<TQLayoutItem*, Source*> mSources; + TQLayoutItem* mLastItem; // the item that was last added }; #endif |