Qwt User's Guide 5.2.3

- Main Page
- Related Pages
- Classes

qwt_plot_printfilter.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef QWT_PLOT_PRINTFILTER_H
11 #define QWT_PLOT_PRINTFILTER_H
12
13 #include <qcolor.h>
14 #include <qfont.h>
15 #include "qwt_global.h"
16
17 class QwtPlot;
18 class QwtPlotItem;
19
30 class QWT_EXPORT QwtPlotPrintFilter
31 {
32 public:
34 enum Options
35 {
36 PrintMargin = 1,
37 PrintTitle = 2,
38 PrintLegend = 4,
39 PrintGrid = 8,
40 PrintBackground = 16,
41 PrintFrameWithScales = 32,
42
43 PrintAll = ~PrintFrameWithScales
44 };
45
47 enum Item
48 {
49 Title,
50 Legend,
51 Curve,
52 CurveSymbol,
53 Marker,
54 MarkerSymbol,
55 MajorGrid,
56 MinorGrid,
57 CanvasBackground,
58 AxisScale,
59 AxisTitle,
60 WidgetBackground
61 };
62
63 explicit QwtPlotPrintFilter();
64 virtual ~QwtPlotPrintFilter();
65
66 virtual QColor color(const QColor &, Item item) const;
67 virtual QFont font(const QFont &, Item item) const;
68
69 void setOptions(int options);
70 int options() const;
71
72 virtual void apply(QwtPlot *) const;
73 virtual void reset(QwtPlot *) const;
74
75 virtual void apply(QwtPlotItem *) const;
76 virtual void reset(QwtPlotItem *) const;
77
78 private:
79 class PrivateData;
80 PrivateData *d_data;
81 };
82
83 #endif