Diffstat (limited to 'microkde/KDGanttMinimizeSplitter.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/KDGanttMinimizeSplitter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h index 84d3d8e..585298d 100644 --- a/microkde/KDGanttMinimizeSplitter.h +++ b/microkde/KDGanttMinimizeSplitter.h @@ -35,115 +35,117 @@ #define KDGANTTMINIMIZESPLITTER_H #ifndef QT_H #include "qframe.h" #include "qvaluelist.h" #endif // QT_H #ifndef QT_NO_SPLITTER___ class QSplitterData; class QSplitterLayoutStruct; class KDGanttSplitterHandle; class KDGanttMinimizeSplitter : public QFrame { Q_OBJECT // Q_ENUMS( Direction ) // Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation ) // Q_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(); virtual void setOrientation( Orientation ); Orientation orientation() const { return orient; } void setMinimizeDirection( Direction ); Direction minimizeDirection() const; #if QT_VERSION >= 232 virtual void setResizeMode( QWidget *w, ResizeMode ); virtual void setOpaqueResize( bool = TRUE ); bool opaqueResize() const; void moveToFirst( QWidget * ); void moveToLast( QWidget * ); void refresh() { recalc( TRUE ); } QSize sizeHint() const; QSize minimumSizeHint() const; QValueList<int> sizes() const; void setSizes( QValueList<int> ); KDGanttSplitterHandle* firstHandle(){ return mFirstHandle;} void expandPos( int id, int* min, int* max ); + QFrame* rubberBand() { return mRubberBand ;} public slots: void toggle(); protected: void childEvent( QChildEvent * ); bool event( QEvent * ); void resizeEvent( QResizeEvent * ); int idAfter( QWidget* ) const; void moveSplitter( QCOORD pos, int id ); virtual void drawSplitter( QPainter*, QCOORD x, QCOORD y, QCOORD w, QCOORD h ); void styleChange( QStyle& ); int adjustPos( int , int ); virtual void setRubberband( int ); void getRange( int id, int*, int* ); private: + QFrame* mRubberBand; void init(); void recalc( bool update = FALSE ); void doResize(); void storeSizes(); void processChildEvents(); QSplitterLayoutStruct *addWidget( QWidget*, 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 ); 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(); } 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(); } KDGanttSplitterHandle* mFirstHandle; QSplitterData *data; #endif private: Orientation orient; Direction _direction; #ifndef DOXYGEN_SKIP_INTERNAL friend class KDGanttSplitterHandle; #endif private: // Disabled copy constructor and operator= #if defined(Q_DISABLE_COPY) KDGanttMinimizeSplitter( const KDGanttMinimizeSplitter & ); KDGanttMinimizeSplitter& operator=( const KDGanttMinimizeSplitter & ); #endif }; #ifndef DOXYGEN_SKIP_INTERNAL // This class was continued from a verbatim copy of the // QSplitterHandle pertaining to the Qt 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 { Q_OBJECT #if QT_VERSION >= 232 public: KDGanttSplitterHandle( Qt::Orientation o, |