QwtBarCurve.h
Go to the documentation of this file.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 #ifndef BARCURVE_H
00030 #define BARCURVE_H
00031
00032 #include "PlotCurve.h"
00033 #include <qwt_plot.h>
00034
00036 class QwtBarCurve: public DataCurve
00037 {
00038 public:
00039 enum BarStyle{Vertical = 0, Horizontal = 1};
00040 QwtBarCurve(BarStyle style, Table *t, const QString& xColName, const QString& name, int startRow, int endRow);
00041
00042 void copy(const QwtBarCurve *b);
00043
00044 virtual QwtDoubleRect boundingRect() const;
00045
00046 BarStyle orientation(){return bar_style;};
00047
00048 void setGap (int gap);
00049 int gap() const {return bar_gap;};
00050
00051 void setOffset(int offset);
00052 int offset() const {return bar_offset;};
00053
00054 double dataOffset();
00055 void setWhiteOut(bool on = true){d_white_out = on;};
00056
00057 virtual QString saveToString();
00058
00059 private:
00060 virtual void draw(QPainter *painter,const QwtScaleMap &xMap,
00061 const QwtScaleMap &yMap, int from, int to) const;
00062
00063 int bar_offset;
00064 int bar_gap;
00065 bool d_white_out;
00066 BarStyle bar_style;
00067 };
00068
00069 #endif