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 "qwt_global.h"
00016
00017 class QwtPlot;
00018 class QwtPlotItem;
00019
00026 class QWT_EXPORT QwtPlotPrintFilter
00027 {
00028 public:
00030 enum Options
00031 {
00032 PrintMargin = 1,
00033 PrintTitle = 2,
00034 PrintLegend = 4,
00035 PrintGrid = 8,
00036 PrintCanvasBackground = 16,
00037 PrintWidgetBackground = 32,
00038
00039 PrintAll = ~PrintWidgetBackground
00040 };
00041
00043 enum Item
00044 {
00045 Title,
00046 Legend,
00047 Curve,
00048 CurveSymbol,
00049 Marker,
00050 MarkerSymbol,
00051 MajorGrid,
00052 MinorGrid,
00053 CanvasBackground,
00054 AxisScale,
00055 AxisTitle,
00056 WidgetBackground
00057 };
00058
00059 explicit QwtPlotPrintFilter();
00060 virtual ~QwtPlotPrintFilter();
00061
00062 virtual QColor color(const QColor &, Item item) const;
00063 virtual QFont font(const QFont &, Item item) const;
00064
00065 void setOptions(int options);
00066 int options() const;
00067
00068 virtual void apply(QwtPlot *) const;
00069 virtual void reset(QwtPlot *) const;
00070
00071 virtual void apply(QwtPlotItem *) const;
00072 virtual void reset(QwtPlotItem *) const;
00073
00074 private:
00075 class PrivateData;
00076 PrivateData *d_data;
00077 };
00078
00079 #endif