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 PrintCanvasBackground = 16,
00039 PrintWidgetBackground = 32,
00040
00041 PrintAll = ~PrintWidgetBackground
00042 };
00043
00045 enum Item
00046 {
00047 Title,
00048 Legend,
00049 Curve,
00050 CurveSymbol,
00051 Marker,
00052 MarkerSymbol,
00053 MajorGrid,
00054 MinorGrid,
00055 CanvasBackground,
00056 AxisScale,
00057 AxisTitle,
00058 WidgetBackground
00059 };
00060
00061 QwtPlotPrintFilter();
00062
virtual ~QwtPlotPrintFilter();
00063
00064
virtual QColor color(
const QColor &, Item item,
int id = -1)
const;
00065
virtual QFont font(
const QFont &, Item item,
int id = -1)
const;
00066
00074 void setOptions(
int options) { d_options = options; }
00075
00081 int options()
const {
return d_options; }
00082
00083
virtual void apply(
QwtPlot *) const;
00084 virtual
void reset(
QwtPlot *) const;
00085
00086 private:
00087
int d_options;
00088 QwtPlotPrintFilterCache *d_cache;
00089 };
00090
00091 #endif