00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_COLUMN_SYMBOL_H
00011 #define QWT_COLUMN_SYMBOL_H
00012
00013 #include <qpen.h>
00014 #include <qsize.h>
00015 #include "qwt_global.h"
00016
00017 class QPainter;
00018 class QPalette;
00019 class QRect;
00020 class QwtText;
00021
00023 class QWT_EXPORT QwtColumnSymbol
00024 {
00025 public:
00026 enum Direction
00027 {
00028 LeftToRight,
00029 RightToLeft,
00030 BottomToTop,
00031 TopToBottom
00032 };
00033
00038 enum Style
00039 {
00040 NoSymbol = -1,
00041
00042 Box,
00043
00044 StyleCnt
00045 };
00046
00047 public:
00048 QwtColumnSymbol(Style = NoSymbol);
00049 virtual ~QwtColumnSymbol();
00050
00051 void setFrameStyle(int style);
00052 int frameStyle() const;
00053
00054 void setLineWidth(int width);
00055 int lineWidth() const;
00056
00057 bool operator!=(const QwtColumnSymbol &) const;
00058 virtual bool operator==(const QwtColumnSymbol &) const;
00059
00060 virtual QwtColumnSymbol *clone() const;
00061
00062 void setPalette(const QPalette &);
00063 const QPalette &palette() const;
00064
00065 void setStyle(Style);
00066 Style style() const;
00067
00068 void setLabel(const QwtText&);
00069 const QwtText &label() const;
00070
00071 virtual void draw(QPainter *, Direction, const QRect&) const;
00072
00073 protected:
00074 void drawBox(QPainter *, Direction, const QRect&) const;
00075
00076 private:
00077 class PrivateData;
00078 PrivateData* d_data;
00079 };
00080
00081 #endif