00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef QWT_PLOT_PRINTFILTER_H
00011 #define QWT_PLOT_PRINTFILTER_H
00012
00013 #include <qcolor.h>
00014 #include <qfont.h>
00015 #include <qintdict.h>
00016 #include <qvaluelist.h>
00017 #include "qwt_global.h"
00018
00019 class QwtPlot;
00020 class QwtPlotPrintFilterCache;
00021
00028 class QWT_EXPORT QwtPlotPrintFilter
00029 {
00030 public:
00032 enum Options
00033 {
00034 PrintMargin = 1,
00035 PrintTitle = 2,
00036 PrintLegend = 4,
00037 PrintGrid = 8,
00038 PrintBackground = 16,
00039
00040 PrintAll = ~0
00041 };
00042
00044 enum Item
00045 {
00046 Title,
00047 Legend,
00048 Curve,
00049 CurveSymbol,
00050 Marker,
00051 MarkerSymbol,
00052 MajorGrid,
00053 MinorGrid,
00054 CanvasBackground,
00055 AxisScale,
00056 AxisTitle
00057 };
00058
00059 QwtPlotPrintFilter();
00060 virtual ~QwtPlotPrintFilter();
00061
00062 virtual QColor color(const QColor &, Item item, int id = -1) const;
00063 virtual QFont font(const QFont &, Item item, int id = -1) const;
00064
00072 void setOptions(int options) { d_options = options; }
00073
00079 int options() const { return d_options; }
00080
00081 virtual void apply(QwtPlot *) const;
00082 virtual void reset(QwtPlot *) const;
00083
00084 private:
00085 int d_options;
00086 QwtPlotPrintFilterCache *d_cache;
00087 };
00088
00089 #endif