00001
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 <tqlayout.h>
00040 class TQPushButton;
00041 class TQBoxLayout;
00042
00043 class KDGanttSemiSizingControl : public KDGanttSizingControl
00044 {
00045 TQ_PROPERTY( ArrowPosition arrowPosition READ arrowPosition WRITE setArrowPosition )
00046 TQ_ENUMS( ArrowPosition )
00047 Q_OBJECT
00048
00049
00050 public:
00051 enum ArrowPosition { Before, After };
00052
00053 KDGanttSemiSizingControl( TQWidget* parent = 0, const char* name = 0 );
00054 KDGanttSemiSizingControl( Qt::Orientation orientation, TQWidget* parent = 0,
00055 const char* name = 0 );
00056 KDGanttSemiSizingControl( ArrowPosition arrowPosition,
00057 Qt::Orientation orientation, TQWidget* parent = 0,
00058 const char* name = 0 );
00059
00060 void setMinimizedWidget( TQWidget* widget );
00061 void setMaximizedWidget( TQWidget* widget );
00062 TQWidget* minimizedWidget() const;
00063 TQWidget* maximizedWidget() const;
00064
00065 void setOrientation( Qt::Orientation orientation );
00066 Qt::Orientation orientation() const;
00067
00068 void setArrowPosition( ArrowPosition arrowPosition );
00069 ArrowPosition arrowPosition() const;
00070
00071 public slots:
00072 virtual void minimize( bool minimize );
00073 virtual void restore( bool restore );
00074
00075 protected:
00076 void setup();
00077 void init();
00078 enum Direction {Left, Right, Up, Down };
00079 TQPixmap pixmap( Direction );
00080
00081 private:
00082 Qt::Orientation _orient;
00083 ArrowPosition _arrowPos;
00084 TQWidget* _minimizedWidget;
00085 TQWidget* _maximizedWidget;
00086 TQBoxLayout* _layout;
00087 TQPushButton* _but;
00088 };
00089
00090
00091 #endif