summaryrefslogtreecommitdiffabout
path: root/microkde/KDGanttMinimizeSplitter.h
Unidiff
Diffstat (limited to 'microkde/KDGanttMinimizeSplitter.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 585298d..3042e0a 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -30,32 +30,33 @@
30 ** without including the source code for Qt in the source distribution. 30 ** without including the source code for Qt in the source distribution.
31 ** 31 **
32 **********************************************************************/ 32 **********************************************************************/
33 33
34#ifndef KDGANTTMINIMIZESPLITTER_H 34#ifndef KDGANTTMINIMIZESPLITTER_H
35#define KDGANTTMINIMIZESPLITTER_H 35#define KDGANTTMINIMIZESPLITTER_H
36 36
37#ifndef QT_H 37#ifndef QT_H
38#include "qframe.h" 38#include "qframe.h"
39#include "qvaluelist.h" 39#include "qvaluelist.h"
40#endif // QT_H 40#endif // QT_H
41 41
42#ifndef QT_NO_SPLITTER___ 42#ifndef QT_NO_SPLITTER___
43class QSplitterData; 43class QSplitterData;
44class QSplitterLayoutStruct; 44class QSplitterLayoutStruct;
45class KDGanttSplitterHandle; 45class KDGanttSplitterHandle;
46class KDRubberBand;
46class KDGanttMinimizeSplitter : public QFrame 47class KDGanttMinimizeSplitter : public QFrame
47{ 48{
48 Q_OBJECT 49 Q_OBJECT
49 // Q_ENUMS( Direction ) 50 // Q_ENUMS( Direction )
50 // Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) 51 // Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
51 // Q_PROPERTY( Direction minimizeDirection READ minimizeDirection WRITE setMinimizeDirection ) 52 // Q_PROPERTY( Direction minimizeDirection READ minimizeDirection WRITE setMinimizeDirection )
52 53
53public: 54public:
54 enum ResizeMode { Stretch, KeepSize, FollowSizeHint }; 55 enum ResizeMode { Stretch, KeepSize, FollowSizeHint };
55 enum Direction { Left, Right, Up, Down }; 56 enum Direction { Left, Right, Up, Down };
56 57
57 KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 ); 58 KDGanttMinimizeSplitter( QWidget* parent=0, const char* name=0 );
58 KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 ); 59 KDGanttMinimizeSplitter( Orientation, QWidget* parent=0, const char* name=0 );
59 ~KDGanttMinimizeSplitter(); 60 ~KDGanttMinimizeSplitter();
60 61
61 virtual void setOrientation( Orientation ); 62 virtual void setOrientation( Orientation );
@@ -67,53 +68,53 @@ public:
67#if QT_VERSION >= 232 68#if QT_VERSION >= 232
68 virtual void setResizeMode( QWidget *w, ResizeMode ); 69 virtual void setResizeMode( QWidget *w, ResizeMode );
69 virtual void setOpaqueResize( bool = TRUE ); 70 virtual void setOpaqueResize( bool = TRUE );
70 bool opaqueResize() const; 71 bool opaqueResize() const;
71 72
72 void moveToFirst( QWidget * ); 73 void moveToFirst( QWidget * );
73 void moveToLast( QWidget * ); 74 void moveToLast( QWidget * );
74 75
75 void refresh() { recalc( TRUE ); } 76 void refresh() { recalc( TRUE ); }
76 QSize sizeHint() const; 77 QSize sizeHint() const;
77 QSize minimumSizeHint() const; 78 QSize minimumSizeHint() const;
78 79
79 QValueList<int> sizes() const; 80 QValueList<int> sizes() const;
80 void setSizes( QValueList<int> ); 81 void setSizes( QValueList<int> );
81 KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} 82 KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;}
82 void expandPos( int id, int* min, int* max ); 83 void expandPos( int id, int* min, int* max );
83 QFrame* rubberBand() { return mRubberBand ;} 84 KDRubberBand* rubberBand() { return mRubberBand ;}
84public slots: 85public slots:
85 void toggle(); 86 void toggle();
86protected: 87protected:
87 void childEvent( QChildEvent * ); 88 void childEvent( QChildEvent * );
88 89
89 bool event( QEvent * ); 90 bool event( QEvent * );
90 void resizeEvent( QResizeEvent * ); 91 void resizeEvent( QResizeEvent * );
91 92
92 int idAfter( QWidget* ) const; 93 int idAfter( QWidget* ) const;
93 94
94 void moveSplitter( QCOORD pos, int id ); 95 void moveSplitter( QCOORD pos, int id );
95 virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y, 96 virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y,
96 QCOORD w, QCOORD h ); 97 QCOORD w, QCOORD h );
97 void styleChange( QStyle& ); 98 void styleChange( QStyle& );
98 int adjustPos( int , int ); 99 int adjustPos( int , int );
99 virtual void setRubberband( int ); 100 virtual void setRubberband( int );
100 void getRange( int id, int*, int* ); 101 void getRange( int id, int*, int* );
101 102
102private: 103private:
103 QFrame* mRubberBand; 104 KDRubberBand* mRubberBand;
104 void init(); 105 void init();
105 void recalc( bool update = FALSE ); 106 void recalc( bool update = FALSE );
106 void doResize(); 107 void doResize();
107 void storeSizes(); 108 void storeSizes();
108 void processChildEvents(); 109 void processChildEvents();
109 QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE ); 110 QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE );
110 void recalcId(); 111 void recalcId();
111 void moveBefore( int pos, int id, bool upLeft ); 112 void moveBefore( int pos, int id, bool upLeft );
112 void moveAfter( int pos, int id, bool upLeft ); 113 void moveAfter( int pos, int id, bool upLeft );
113 void setG( QWidget *w, int p, int s, bool isSplitter = FALSE ); 114 void setG( QWidget *w, int p, int s, bool isSplitter = FALSE );
114 115
115 QCOORD pick( const QPoint &p ) const 116 QCOORD pick( const QPoint &p ) const
116 { return orient == Horizontal ? p.x() : p.y(); } 117 { return orient == Horizontal ? p.x() : p.y(); }
117 QCOORD pick( const QSize &s ) const 118 QCOORD pick( const QSize &s ) const
118 { return orient == Horizontal ? s.width() : s.height(); } 119 { return orient == Horizontal ? s.width() : s.height(); }
119 120