summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttMinimizeSplitter.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kdgantt/KDGanttMinimizeSplitter.h
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdgantt/KDGanttMinimizeSplitter.h')
-rw-r--r--kdgantt/KDGanttMinimizeSplitter.h120
1 files changed, 59 insertions, 61 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h
index 1581d615..3ac0d0b7 100644
--- a/kdgantt/KDGanttMinimizeSplitter.h
+++ b/kdgantt/KDGanttMinimizeSplitter.h
@@ -3,7 +3,7 @@
*/
/****************************************************************************
- ** Copyright (C) 2001-2004 Klarälvdalens Datakonsult AB. All rights reserved.
+ ** Copyright (C) 2001-2004 Klar�lvdalens Datakonsult AB. All rights reserved.
**
** This file is part of the KDGantt library.
**
@@ -26,73 +26,73 @@
** licensing are not clear to you.
**
** As a special exception, permission is given to link this program
- ** with any edition of Qt, and distribute the resulting executable,
- ** without including the source code for Qt in the source distribution.
+ ** with any edition of TQt, and distribute the resulting executable,
+ ** without including the source code for TQt in the source distribution.
**
**********************************************************************/
#ifndef KDGANTTMINIMIZESPLITTER_H
#define KDGANTTMINIMIZESPLITTER_H
-#ifndef QT_H
-#include "qframe.h"
-#include "qvaluelist.h"
-#endif // QT_H
+#ifndef TQT_H
+#include "tqframe.h"
+#include "tqvaluelist.h"
+#endif // TQT_H
-#ifndef QT_NO_SPLITTER
+#ifndef TQT_NO_SPLITTER
-class QSplitterData;
-class QSplitterLayoutStruct;
+class TQSplitterData;
+class TQSplitterLayoutStruct;
-class KDGanttMinimizeSplitter : public QFrame
+class KDGanttMinimizeSplitter : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( Direction )
- Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
- Q_PROPERTY( Direction minimizeDirection READ minimizeDirection WRITE setMinimizeDirection )
+ TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation )
+ TQ_PROPERTY( Direction minimizeDirection READ minimizeDirection WRITE setMinimizeDirection )
public:
enum ResizeMode { Stretch, KeepSize, FollowSizeHint };
enum Direction { Left, Right, Up, Down };
- KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 );
- KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 );
+ KDGanttMinimizeSplitter( TQWidget* tqparent=0, const char* name=0 );
+ KDGanttMinimizeSplitter( Qt::Orientation, TQWidget* tqparent=0, const char* name=0 );
~KDGanttMinimizeSplitter();
- virtual void setOrientation( Orientation );
- Orientation orientation() const { return orient; }
+ virtual void setOrientation( Qt::Orientation );
+ Qt::Orientation orientation() const { return orient; }
void setMinimizeDirection( Direction );
Direction minimizeDirection() const;
-#if QT_VERSION >= 300
- virtual void setResizeMode( QWidget *w, ResizeMode );
+ virtual void setResizeMode( TQWidget *w, ResizeMode );
virtual void setOpaqueResize( bool = TRUE );
bool opaqueResize() const;
- void moveToFirst( QWidget * );
- void moveToLast( QWidget * );
+ void moveToFirst( TQWidget * );
+ void moveToLast( TQWidget * );
void refresh() { recalc( TRUE ); }
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
- QValueList<int> sizes() const;
- void setSizes( QValueList<int> );
+ TQValueList<int> sizes() const;
+ void setSizes( TQValueList<int> );
void expandPos( int id, int* min, int* max );
protected:
- void childEvent( QChildEvent * );
+ void childEvent( TQChildEvent * );
- bool event( QEvent * );
- void resizeEvent( QResizeEvent * );
+ bool event( TQEvent * );
+ void resizeEvent( TQResizeEvent * );
- int idAfter( QWidget* ) const;
+ int idAfter( TQWidget* ) const;
- void moveSplitter( QCOORD pos, int id );
- virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y,
- QCOORD w, QCOORD h );
- void styleChange( QStyle& );
+ 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 );
void getRange( int id, int*, int* );
@@ -103,33 +103,32 @@ private:
void doResize();
void storeSizes();
void processChildEvents();
- QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE );
+ TQSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE );
void recalcId();
void moveBefore( int pos, int id, bool upLeft );
void moveAfter( int pos, int id, bool upLeft );
- void setG( QWidget *w, int p, int s, bool isSplitter = FALSE );
+ void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE );
- QCOORD pick( const QPoint &p ) const
- { return orient == Horizontal ? p.x() : p.y(); }
- QCOORD pick( const QSize &s ) const
- { return orient == Horizontal ? s.width() : s.height(); }
+ TQCOORD pick( const TQPoint &p ) const
+ { return orient ==Qt::Horizontal ? p.x() : p.y(); }
+ TQCOORD pick( const TQSize &s ) const
+ { return orient ==Qt::Horizontal ? s.width() : s.height(); }
- QCOORD trans( const QPoint &p ) const
- { return orient == Vertical ? p.x() : p.y(); }
- QCOORD trans( const QSize &s ) const
- { return orient == Vertical ? s.width() : s.height(); }
+ TQCOORD trans( const TQPoint &p ) const
+ { return orient ==Qt::Vertical ? p.x() : p.y(); }
+ TQCOORD trans( const TQSize &s ) const
+ { return orient ==Qt::Vertical ? s.width() : s.height(); }
- QSplitterData *data;
-#endif
+ TQSplitterData *data;
private:
- Orientation orient;
+ Qt::Orientation orient;
Direction _direction;
#ifndef DOXYGEN_SKIP_INTERNAL
friend class KDGanttSplitterHandle;
#endif
private: // Disabled copy constructor and operator=
-#if defined(Q_DISABLE_COPY)
+#if defined(TQ_DISABLE_COPY)
KDGanttMinimizeSplitter( const KDGanttMinimizeSplitter & );
KDGanttMinimizeSplitter& operator=( const KDGanttMinimizeSplitter & );
#endif
@@ -137,34 +136,34 @@ private: // Disabled copy constructor and operator=
#ifndef DOXYGEN_SKIP_INTERNAL
// This class was continued from a verbatim copy of the
-// QSplitterHandle pertaining to the Qt Enterprise License and the
+// TQSplitterHandle pertaining to the TQt Enterprise License and the
// GPL. It has only been renamed to KDGanttSplitterHandler in order to
// avoid a symbol clash on some platforms.
-class KDGanttSplitterHandle : public QWidget
+class KDGanttSplitterHandle : public TQWidget
{
Q_OBJECT
-#if QT_VERSION >= 300
+ TQ_OBJECT
public:
KDGanttSplitterHandle( Qt::Orientation o,
- KDGanttMinimizeSplitter *parent, const char* name=0 );
+ KDGanttMinimizeSplitter *tqparent, const char* name=0 );
void setOrientation( Qt::Orientation o );
Qt::Orientation orientation() const { return orient; }
bool opaque() const { return s->opaqueResize(); }
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
int id() const { return myId; } // data->list.at(id())->wid == this
void setId( int i ) { myId = i; }
protected:
- QValueList<QPointArray> buttonRegions();
- void paintEvent( QPaintEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- int onButton( const QPoint& p );
- void updateCursor( const QPoint& p );
+ TQValueList<TQPointArray> buttonRegions();
+ void paintEvent( TQPaintEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ int onButton( const TQPoint& p );
+ void updateCursor( const TQPoint& p );
private:
Qt::Orientation orient;
@@ -175,10 +174,9 @@ private:
int _activeButton;
bool _collapsed;
int _origPos;
-#endif
};
#endif
-#endif // QT_NO_SPLITTER
+#endif // TQT_NO_SPLITTER
#endif // KDGANTTMINIMIZESPLITTER_H