summaryrefslogtreecommitdiffabout
path: root/microkde/KDGanttMinimizeSplitter.h
Unidiff
Diffstat (limited to 'microkde/KDGanttMinimizeSplitter.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/KDGanttMinimizeSplitter.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 8120d14..84d3d8e 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -76,113 +76,114 @@ public:
76 QSize sizeHint() const; 76 QSize sizeHint() const;
77 QSize minimumSizeHint() const; 77 QSize minimumSizeHint() const;
78 78
79 QValueList<int> sizes() const; 79 QValueList<int> sizes() const;
80 void setSizes( QValueList<int> ); 80 void setSizes( QValueList<int> );
81 KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} 81 KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;}
82 void expandPos( int id, int* min, int* max ); 82 void expandPos( int id, int* min, int* max );
83public slots: 83public slots:
84 void toggle(); 84 void toggle();
85protected: 85protected:
86 void childEvent( QChildEvent * ); 86 void childEvent( QChildEvent * );
87 87
88 bool event( QEvent * ); 88 bool event( QEvent * );
89 void resizeEvent( QResizeEvent * ); 89 void resizeEvent( QResizeEvent * );
90 90
91 int idAfter( QWidget* ) const; 91 int idAfter( QWidget* ) const;
92 92
93 void moveSplitter( QCOORD pos, int id ); 93 void moveSplitter( QCOORD pos, int id );
94 virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y, 94 virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y,
95 QCOORD w, QCOORD h ); 95 QCOORD w, QCOORD h );
96 void styleChange( QStyle& ); 96 void styleChange( QStyle& );
97 int adjustPos( int , int ); 97 int adjustPos( int , int );
98 virtual void setRubberband( int ); 98 virtual void setRubberband( int );
99 void getRange( int id, int*, int* ); 99 void getRange( int id, int*, int* );
100 100
101private: 101private:
102 void init(); 102 void init();
103 void recalc( bool update = FALSE ); 103 void recalc( bool update = FALSE );
104 void doResize(); 104 void doResize();
105 void storeSizes(); 105 void storeSizes();
106 void processChildEvents(); 106 void processChildEvents();
107 QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE ); 107 QSplitterLayoutStruct *addWidget( QWidget*, bool first = FALSE );
108 void recalcId(); 108 void recalcId();
109 void moveBefore( int pos, int id, bool upLeft ); 109 void moveBefore( int pos, int id, bool upLeft );
110 void moveAfter( int pos, int id, bool upLeft ); 110 void moveAfter( int pos, int id, bool upLeft );
111 void setG( QWidget *w, int p, int s, bool isSplitter = FALSE ); 111 void setG( QWidget *w, int p, int s, bool isSplitter = FALSE );
112 112
113 QCOORD pick( const QPoint &p ) const 113 QCOORD pick( const QPoint &p ) const
114 { return orient == Horizontal ? p.x() : p.y(); } 114 { return orient == Horizontal ? p.x() : p.y(); }
115 QCOORD pick( const QSize &s ) const 115 QCOORD pick( const QSize &s ) const
116 { return orient == Horizontal ? s.width() : s.height(); } 116 { return orient == Horizontal ? s.width() : s.height(); }
117 117
118 QCOORD trans( const QPoint &p ) const 118 QCOORD trans( const QPoint &p ) const
119 { return orient == Vertical ? p.x() : p.y(); } 119 { return orient == Vertical ? p.x() : p.y(); }
120 QCOORD trans( const QSize &s ) const 120 QCOORD trans( const QSize &s ) const
121 { return orient == Vertical ? s.width() : s.height(); } 121 { return orient == Vertical ? s.width() : s.height(); }
122 KDGanttSplitterHandle* mFirstHandle; 122 KDGanttSplitterHandle* mFirstHandle;
123 QSplitterData *data; 123 QSplitterData *data;
124#endif 124#endif
125 125
126private: 126private:
127 Orientation orient; 127 Orientation orient;
128 Direction _direction; 128 Direction _direction;
129#ifndef DOXYGEN_SKIP_INTERNAL 129#ifndef DOXYGEN_SKIP_INTERNAL
130 friend class KDGanttSplitterHandle; 130 friend class KDGanttSplitterHandle;
131#endif 131#endif
132 private:// Disabled copy constructor and operator= 132 private:// Disabled copy constructor and operator=
133#if defined(Q_DISABLE_COPY) 133#if defined(Q_DISABLE_COPY)
134 KDGanttMinimizeSplitter( const KDGanttMinimizeSplitter & ); 134 KDGanttMinimizeSplitter( const KDGanttMinimizeSplitter & );
135 KDGanttMinimizeSplitter& operator=( const KDGanttMinimizeSplitter & ); 135 KDGanttMinimizeSplitter& operator=( const KDGanttMinimizeSplitter & );
136#endif 136#endif
137}; 137};
138 138
139#ifndef DOXYGEN_SKIP_INTERNAL 139#ifndef DOXYGEN_SKIP_INTERNAL
140// This class was continued from a verbatim copy of the 140// This class was continued from a verbatim copy of the
141// QSplitterHandle pertaining to the Qt Enterprise License and the 141// QSplitterHandle pertaining to the Qt Enterprise License and the
142// GPL. It has only been renamed to KDGanttSplitterHandler in order to 142// GPL. It has only been renamed to KDGanttSplitterHandler in order to
143// avoid a symbol clash on some platforms. 143// avoid a symbol clash on some platforms.
144class KDGanttSplitterHandle : public QWidget 144class KDGanttSplitterHandle : public QWidget
145{ 145{
146 Q_OBJECT 146 Q_OBJECT
147#if QT_VERSION >= 232 147#if QT_VERSION >= 232
148public: 148public:
149 KDGanttSplitterHandle( Qt::Orientation o, 149 KDGanttSplitterHandle( Qt::Orientation o,
150 KDGanttMinimizeSplitter *parent, const char* name=0 ); 150 KDGanttMinimizeSplitter *parent, const char* name=0 );
151 void setOrientation( Qt::Orientation o ); 151 void setOrientation( Qt::Orientation o );
152 Qt::Orientation orientation() const { return orient; } 152 Qt::Orientation orientation() const { return orient; }
153 153
154 bool opaque() const { return s->opaqueResize(); } 154 bool opaque() const { return s->opaqueResize(); }
155 155
156 QSize sizeHint() const; 156 QSize sizeHint() const;
157 void toggle(); 157 void toggle();
158 158
159 int id() const { return myId; } // data->list.at(id())->wid == this 159 int id() const { return myId; } // data->list.at(id())->wid == this
160 void setId( int i ) { myId = i; } 160 void setId( int i ) { myId = i; }
161 161
162protected: 162protected:
163 QValueList<QPointArray> buttonRegions(); 163 QValueList<QPointArray> buttonRegions();
164 void paintEvent( QPaintEvent * ); 164 void paintEvent( QPaintEvent * );
165 void mouseMoveEvent( QMouseEvent * ); 165 void mouseMoveEvent( QMouseEvent * );
166 void mousePressEvent( QMouseEvent * ); 166 void mousePressEvent( QMouseEvent * );
167 void mouseReleaseEvent( QMouseEvent * ); 167 void mouseReleaseEvent( QMouseEvent * );
168 int onButton( const QPoint& p ); 168 int onButton( const QPoint& p );
169 void updateCursor( const QPoint& p ); 169 void updateCursor( const QPoint& p );
170 170
171private: 171private:
172 bool mMouseDown;
172 QSize mSizeHint; 173 QSize mSizeHint;
173 bool mUseOffset; 174 bool mUseOffset;
174 Qt::Orientation orient; 175 Qt::Orientation orient;
175 bool opaq; 176 bool opaq;
176 int myId; 177 int myId;
177 178
178 KDGanttMinimizeSplitter *s; 179 KDGanttMinimizeSplitter *s;
179 int _activeButton; 180 int _activeButton;
180 bool _collapsed; 181 bool _collapsed;
181 int _origPos; 182 int _origPos;
182#endif 183#endif
183}; 184};
184#endif 185#endif
185 186
186#endif // QT_NO_SPLITTER 187#endif // QT_NO_SPLITTER
187 188
188#endif // KDGANTTMINIMIZESPLITTER_H 189#endif // KDGANTTMINIMIZESPLITTER_H