Go to the documentation of this file.00001
00002
00003
00004
00005
00008
00009 #ifndef sliderBar_H_
00010 #define sliderBar_H_
00011
00012 #include "lgrGui.h"
00013
00014 #include <QtCore/QString>
00015 #include <QtGui/QColor>
00016
00017 class QPixmap;
00018 class QRectF;
00019
00020 namespace MAKLogger
00021 {
00022 class DtSliderBox;
00023
00025 class DT_DLL_LGRGUI DtSliderBar
00026 {
00027 public:
00028
00030 DtSliderBar();
00031
00033 DtSliderBar(float start,float end);
00034
00036 virtual ~DtSliderBar();
00037
00039 float start() const;
00040
00042 float end() const;
00043
00045 float width() const;
00046
00048 const QString& name() const;
00049
00051 void setName(const QString& aName);
00052
00054 const QPixmap* image() const;
00055
00057 void setImage(QPixmap*);
00058
00060 QColor color() const;
00061
00063 void setColor(QColor c);
00064
00065 bool selected() const;
00066 void setSelected(bool value);
00067
00068 bool pressed() const;
00069 void setPressed(bool value);
00070
00071 void setFixedSize(bool);
00072 bool fixedSize() const;
00073
00074 void setStartEnd(float start,float end);
00075
00077
00078 DtSliderBox* startBox();
00079 const DtSliderBox* startBox() const;
00081
00083
00084 DtSliderBox* endBox();
00085 const DtSliderBox* endBox() const;
00087
00089 QRectF bounds(QRectF viewport) const;
00090
00092 QRectF boundsWithBoxes(QRectF viewport) const;
00093
00094 protected:
00095
00096 QColor myColor;
00097
00098 float myStartPosition;
00099 float myEndPosition;
00100
00101 DtSliderBox* myStartBox;
00102 DtSliderBox* myEndBox;
00103
00104 QString myName;
00105 QPixmap* myImage;
00106
00107 bool mySelected;
00108 bool myPressed;
00109 bool myFixedSize;
00110 };
00111 }
00112
00113 #endif