summaryrefslogtreecommitdiffstats
path: root/kompare/komparepart/kompare_qsplitter.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-12 01:36:19 +0000
commit99a2774ca6f1cab334de5d43fe36fc44ae889a4c (patch)
treeeff34cf0762227f6baf2a93e8fef48d4bed2651c /kompare/komparepart/kompare_qsplitter.h
parent1c104292188541106338d4940b0f04beeb4301a0 (diff)
downloadtdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.tar.gz
tdesdk-99a2774ca6f1cab334de5d43fe36fc44ae889a4c.zip
TQt4 convert kdesdk
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1236185 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kompare/komparepart/kompare_qsplitter.h')
-rw-r--r--kompare/komparepart/kompare_qsplitter.h121
1 files changed, 61 insertions, 60 deletions
diff --git a/kompare/komparepart/kompare_qsplitter.h b/kompare/komparepart/kompare_qsplitter.h
index 84585405..3c9345c7 100644
--- a/kompare/komparepart/kompare_qsplitter.h
+++ b/kompare/komparepart/kompare_qsplitter.h
@@ -1,13 +1,13 @@
/****************************************************************************
**
**
-** Definition of TQSplitter class
+** Definition of QSplitter class
**
** Created : 980105
**
** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
**
-** This file is part of the widgets module of the Qt GUI Toolkit.
+** This file is part of the widgets module of the TQt GUI Toolkit.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -21,16 +21,15 @@
**
**********************************************************************/
-#ifndef QSPLITTER_H
-#define QSPLITTER_H
+#ifndef KOMPARE_TQSPLITTER_H
+#define KOMPARE_TQSPLITTER_H
-#ifndef QT_H
+#ifndef TQT_H
#include "tqframe.h"
#include "tqvaluelist.h"
-#endif // QT_H
-
-#ifndef QT_NO_SPLITTER
+#endif // TQT_H
+#ifndef TQT_NO_SPLITTER
//class QSplitterHandle;
class QSplitterLayoutStruct;
@@ -40,39 +39,40 @@ class QSplitterPrivate
{
public:
QSplitterPrivate()
- : opaque( FALSE ), firstShow( TRUE ), childrenCollapsible( TRUE ),
+ : opaque( FALSE ), firstShow( TRUE ), tqchildrenCollapsible( TRUE ),
handleWidth( 0 ) { }
TQPtrList<QSplitterLayoutStruct> list;
bool opaque : 8;
bool firstShow : 8;
- bool childrenCollapsible : 8;
+ bool tqchildrenCollapsible : 8;
int handleWidth;
};
-class Q_EXPORT TQSplitter : public QFrame
+class TQ_EXPORT QSplitter : public TQFrame
{
Q_OBJECT
- Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
- Q_PROPERTY( bool opaqueResize READ opaqueResize WRITE setOpaqueResize )
- Q_PROPERTY( int handleWidth READ handleWidth WRITE setHandleWidth )
- Q_PROPERTY( bool childrenCollapsible READ childrenCollapsible WRITE setChildrenCollapsible )
+ TQ_OBJECT
+ TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation )
+ TQ_PROPERTY( bool opaqueResize READ opaqueResize WRITE setOpaqueResize )
+ TQ_PROPERTY( int handleWidth READ handleWidth WRITE setHandleWidth )
+ TQ_PROPERTY( bool tqchildrenCollapsible READ tqchildrenCollapsible WRITE setChildrenCollapsible )
public:
- // ### Qt 4.0: remove Auto from public API
+ // ### TQt 4.0: remove Auto from public API
enum ResizeMode { Stretch, KeepSize, FollowSizeHint, Auto };
- TQSplitter( TQWidget* parent = 0, const char* name = 0 );
- TQSplitter( Orientation, TQWidget* parent = 0, const char* name = 0 );
- ~TQSplitter();
+ QSplitter( TQWidget* tqparent = 0, const char* name = 0 );
+ QSplitter( Qt::Orientation, TQWidget* tqparent = 0, const char* name = 0 );
+ ~QSplitter();
- virtual void setOrientation( Orientation );
- Orientation orientation() const { return orient; }
+ virtual void setOrientation( Qt::Orientation );
+ Qt::Orientation orientation() const { return orient; }
- // ### Qt 4.0: make setChildrenCollapsible() and setCollapsible() virtual
+ // ### TQt 4.0: make setChildrenCollapsible() and setCollapsible() virtual
void setChildrenCollapsible( bool );
- bool childrenCollapsible() const;
+ bool tqchildrenCollapsible() const;
void setCollapsible( TQWidget *w, bool );
virtual void setResizeMode( TQWidget *w, ResizeMode );
@@ -83,8 +83,8 @@ public:
void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); }
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
+ TQSize tqsizeHint() const;
+ TQSize tqminimumSizeHint() const;
TQValueList<int> sizes() const;
void setSizes( TQValueList<int> );
@@ -100,9 +100,9 @@ protected:
int idAfter( TQWidget* ) const;
- void moveSplitter( QCOORD pos, int id );
- virtual void drawSplitter( TQPainter*, QCOORD x, QCOORD y,
- QCOORD w, QCOORD h );
+ void moveSplitter( TQCOORD pos, int id );
+ virtual void drawSplitter( TQPainter*, TQCOORD x, TQCOORD y,
+ TQCOORD w, TQCOORD h );
void styleChange( TQStyle& );
int adjustPos( int, int );
virtual void setRubberband( int );
@@ -129,51 +129,52 @@ public: // private (:
int findWidgetJustBeforeOrJustAfter( int id, int delta, int &collapsibleSize );
void updateHandles();
- inline QCOORD pick( const TQPoint &p ) const
- { return orient == Horizontal ? p.x() : p.y(); }
- inline QCOORD pick( const TQSize &s ) const
- { return orient == Horizontal ? s.width() : s.height(); }
+ inline TQCOORD pick( const TQPoint &p ) const
+ { return orient ==Qt::Horizontal ? p.x() : p.y(); }
+ inline TQCOORD pick( const TQSize &s ) const
+ { return orient ==Qt::Horizontal ? s.width() : s.height(); }
- inline QCOORD trans( const TQPoint &p ) const
- { return orient == Vertical ? p.x() : p.y(); }
- inline QCOORD trans( const TQSize &s ) const
- { return orient == Vertical ? s.width() : s.height(); }
+ inline TQCOORD trans( const TQPoint &p ) const
+ { return orient ==Qt::Vertical ? p.x() : p.y(); }
+ inline TQCOORD trans( const TQSize &s ) const
+ { return orient ==Qt::Vertical ? s.width() : s.height(); }
QSplitterPrivate *d;
- Orientation orient;
+ Qt::Orientation orient;
friend class QSplitterHandle;
-#ifndef QT_NO_TEXTSTREAM
-// moc doesn't like these.
-// friend Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
-// friend Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
+#ifndef TQT_NO_TEXTSTREAM
+// tqmoc doesn't like these.
+// friend TQ_EXPORT TQTextStream& operator<<( TQTextStream&, const QSplitter& );
+// friend TQ_EXPORT TQTextStream& operator>>( TQTextStream&, QSplitter& );
#endif
public:
-#if defined(Q_DISABLE_COPY)
- TQSplitter( const TQSplitter & );
- TQSplitter& operator=( const TQSplitter & );
+#if defined(TQ_DISABLE_COPY)
+ QSplitter( const QSplitter & );
+ QSplitter& operator=( const QSplitter & );
#endif
};
-#ifndef QT_NO_TEXTSTREAM
-Q_EXPORT TQTextStream& operator<<( TQTextStream&, const TQSplitter& );
-Q_EXPORT TQTextStream& operator>>( TQTextStream&, TQSplitter& );
+#ifndef TQT_NO_TEXTSTREAM
+TQ_EXPORT TQTextStream& operator<<( TQTextStream&, const QSplitter& );
+TQ_EXPORT TQTextStream& operator>>( TQTextStream&, QSplitter& );
#endif
-class QSplitterHandle : public QWidget
+class QSplitterHandle : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- QSplitterHandle( Orientation o,
- TQSplitter *parent, const char* name=0 );
- void setOrientation( Orientation o );
- Orientation orientation() const { return orient; }
+ QSplitterHandle( Qt::Orientation o,
+ QSplitter *tqparent, const char* name=0 );
+ void setOrientation( Qt::Orientation o );
+ Qt::Orientation orientation() const { return orient; }
bool opaque() const { return s->opaqueResize(); }
- TQSize sizeHint() const;
+ TQSize tqsizeHint() const;
int id() const { return myId; } // d->list.at(id())->wid == this
void setId( int i ) { myId = i; }
@@ -185,19 +186,19 @@ protected:
void mouseReleaseEvent( TQMouseEvent * );
public: // private (:
- Orientation orient;
+ Qt::Orientation orient;
bool opaq;
int myId;
- TQSplitter *s;
+ QSplitter *s;
};
const uint Default = 2;
-class QSplitterLayoutStruct : public Qt
+class QSplitterLayoutStruct : public TQt
{
public:
- QCOORD sizer;
+ TQCOORD sizer;
uint isHandle : 1;
uint collapsible : 2;
uint resizeMode : 2;
@@ -205,9 +206,9 @@ public:
QSplitterLayoutStruct()
: sizer( -1 ), collapsible( Default ) { }
- QCOORD getSizer( Orientation orient );
+ TQCOORD getSizer( Qt::Orientation orient );
};
-#endif // QT_NO_SPLITTER
+#endif // TQT_NO_SPLITTER
-#endif // QSPLITTER_H
+#endif // KOMPARE_TQSPLITTER_H