kdgantt
KDGanttSemiSizingControl.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #ifndef KDGANTTSEMISIZINGCONTROL_H
00036 #define KDGANTTSEMISIZINGCONTROL_H
00037
00038 #include "KDGanttSizingControl.h"
00039 #include <qlayout.h>
00040 class QPushButton;
00041 class QBoxLayout;
00042
00043 class KDGanttSemiSizingControl : public KDGanttSizingControl
00044 {
00045 Q_PROPERTY( ArrowPosition arrowPosition READ arrowPosition WRITE setArrowPosition )
00046 Q_ENUMS( ArrowPosition )
00047 Q_OBJECT
00048
00049 public:
00050 enum ArrowPosition { Before, After };
00051
00052 KDGanttSemiSizingControl( QWidget* parent = 0, const char* name = 0 );
00053 KDGanttSemiSizingControl( Orientation orientation, QWidget* parent = 0,
00054 const char* name = 0 );
00055 KDGanttSemiSizingControl( ArrowPosition arrowPosition,
00056 Orientation orientation, QWidget* parent = 0,
00057 const char* name = 0 );
00058
00059 void setMinimizedWidget( QWidget* widget );
00060 void setMaximizedWidget( QWidget* widget );
00061 QWidget* minimizedWidget() const;
00062 QWidget* maximizedWidget() const;
00063
00064 void setOrientation( Qt::Orientation orientation );
00065 Qt::Orientation orientation() const;
00066
00067 void setArrowPosition( ArrowPosition arrowPosition );
00068 ArrowPosition arrowPosition() const;
00069
00070 public slots:
00071 virtual void minimize( bool minimize );
00072 virtual void restore( bool restore );
00073
00074 protected:
00075 void setup();
00076 void init();
00077 enum Direction {Left, Right, Up, Down };
00078 QPixmap pixmap( Direction );
00079
00080 private:
00081 Orientation _orient;
00082 ArrowPosition _arrowPos;
00083 QWidget* _minimizedWidget;
00084 QWidget* _maximizedWidget;
00085 QBoxLayout* _layout;
00086 QPushButton* _but;
00087 };
00088
00089
00090 #endif
|