34 #ifndef KDGANTTMINIMIZESPLITTER_H
35 #define KDGANTTMINIMIZESPLITTER_H
38 #include "tqvaluelist.h"
41 class TQSplitterLayoutStruct;
72 void refresh() { recalc( TRUE ); }
76 TQValueList<int> sizes() const;
79 void expandPos( int id, int* min, int* max );
83 bool event( TQEvent * );
89 virtual void drawSplitter( TQPainter*, TQCOORD x, TQCOORD y,
90 TQCOORD w, TQCOORD h );
98 void recalc( bool update = FALSE );
101 void processChildEvents();
102 TQSplitterLayoutStruct *addWidget( TQWidget*, bool first = FALSE );
104 void moveBefore( int pos, int id, bool upLeft );
105 void moveAfter( int pos, int id, bool upLeft );
106 void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE );
108 TQCOORD pick( const TQPoint &p ) const
109 { return orient == Qt::Horizontal ? p.x() : p.y(); }
110 TQCOORD pick( const TQSize &s ) const
111 { return orient == Qt::Horizontal ? s.width() : s.height(); }
113 TQCOORD trans( const TQPoint &p ) const
114 { return orient == Qt::Vertical ? p.x() : p.y(); }
115 TQCOORD trans( const TQSize &s ) const
116 { return orient == Qt::Vertical ? s.width() : s.height(); }
118 TQSplitterData *data;
121 Qt::Orientation orient;
123 #ifndef DOXYGEN_SKIP_INTERNAL
124 friend class KDGanttSplitterHandle;
127 #if defined(TQ_DISABLE_COPY)
133 #ifndef DOXYGEN_SKIP_INTERNAL
138 class KDGanttSplitterHandle : public TQWidget
143 KDGanttSplitterHandle( Qt::Orientation o,
145 void setOrientation( Qt::Orientation o );
146 Qt::Orientation orientation() const { return orient; }
148 bool opaque() const { return s->opaqueResize(); }
150 TQSize sizeHint() const;
152 int id() const { return myId; }
153 void setId( int i ) { myId = i; }
156 TQValueList<TQPointArray> buttonRegions();
157 void paintEvent( TQPaintEvent * );
158 void mouseMoveEvent( TQMouseEvent * );
159 void mousePressEvent( TQMouseEvent * );
160 void mouseReleaseEvent( TQMouseEvent * );
161 int onButton( const TQPoint& p );
162 void updateCursor( const TQPoint& p );
165 Qt::Orientation orient;
176 #endif // KDGANTTMINIMIZESPLITTER_H
|