A print filter can be used to customize QwtPlot::print().
Definition at line 30 of file qwt_plot_printfilter.h.
Public Types | |
enum | Options { PrintMargin = 1, PrintTitle = 2, PrintLegend = 4, PrintGrid = 8, PrintBackground = 16, PrintFrameWithScales = 32, PrintAll = ~PrintFrameWithScales } |
enum | Item { Title, Legend, Curve, CurveSymbol, Marker, MarkerSymbol, MajorGrid, MinorGrid, CanvasBackground, AxisScale, AxisTitle, WidgetBackground } |
Public Member Functions | |
QwtPlotPrintFilter () | |
virtual | ~QwtPlotPrintFilter () |
virtual QColor | color (const QColor &, Item item) const |
virtual QFont | font (const QFont &, Item item) const |
void | setOptions (int options) |
int | options () const |
virtual void | apply (QwtPlot *) const |
virtual void | reset (QwtPlot *) const |
virtual void | apply (QwtPlotItem *) const |
virtual void | reset (QwtPlotItem *) const |
QwtPlotPrintFilter::QwtPlotPrintFilter | ( | ) | [explicit] |
Sets filter options to PrintAll
Definition at line 82 of file qwt_plot_printfilter.cpp.
QwtPlotPrintFilter::~QwtPlotPrintFilter | ( | ) | [virtual] |
QColor QwtPlotPrintFilter::color | ( | const QColor & | c, | |
Item | item | |||
) | const [virtual] |
Modifies a color for printing.
c | Color to be modified | |
item | Type of item where the color belongs |
Definition at line 124 of file qwt_plot_printfilter.cpp.
References options().
Referenced by apply().
QFont QwtPlotPrintFilter::font | ( | const QFont & | f, | |
Item | item | |||
) | const [virtual] |
Modifies a font for printing.
f | Font to be modified | |
item | Type of item where the font belongs |
Definition at line 148 of file qwt_plot_printfilter.cpp.
Referenced by apply().
void QwtPlotPrintFilter::setOptions | ( | int | options | ) |
Set plot print options.
options | Or'd QwtPlotPrintFilter::Options values |
Definition at line 99 of file qwt_plot_printfilter.cpp.
int QwtPlotPrintFilter::options | ( | ) | const |
Get plot print options.
Definition at line 108 of file qwt_plot_printfilter.cpp.
Referenced by color(), QwtPlot::drawItems(), QwtPlot::print(), and QwtPlot::printCanvas().
void QwtPlotPrintFilter::apply | ( | QwtPlot * | plot | ) | const [virtual] |
Change color and fonts of a plot
Definition at line 157 of file qwt_plot_printfilter.cpp.
References QwtPlot::autoReplot(), QwtPlot::axisWidget(), QwtSymbol::brush(), QwtPlot::canvasBackground(), QwtText::color(), color(), QwtLegendItem::curvePen(), QwtText::font(), font(), QwtScaleWidget::getBorderDistHint(), QwtPlotDict::itemList(), QwtPlot::legend(), QwtLegend::legendItems(), QwtSymbol::pen(), QwtPlot::setAutoReplot(), QwtScaleWidget::setBorderDist(), QwtSymbol::setBrush(), QwtPlot::setCanvasBackground(), QwtText::setColor(), QwtLegendItem::setCurvePen(), QwtText::setFont(), QwtSymbol::setPen(), QwtLegendItem::setSymbol(), QwtScaleWidget::setTitle(), QwtLegendItem::symbol(), QwtText::testPaintAttribute(), QwtScaleWidget::title(), and QwtPlot::titleLabel().
Referenced by QwtPlot::print().
void QwtPlotPrintFilter::reset | ( | QwtPlot * | plot | ) | const [virtual] |
Reset color and fonts of a plot
Definition at line 366 of file qwt_plot_printfilter.cpp.
References QwtPlot::autoReplot(), QwtPlot::axisWidget(), QwtSymbol::brush(), QwtLegendItem::curvePen(), QwtLegend::find(), QwtScaleWidget::getBorderDistHint(), QwtPlotDict::itemList(), QwtPlot::legend(), QwtLegend::legendItems(), QwtSymbol::pen(), QwtPlot::setAutoReplot(), QwtScaleWidget::setBorderDist(), QwtSymbol::setBrush(), QwtPlot::setCanvasBackground(), QwtText::setColor(), QwtLegendItem::setCurvePen(), QwtText::setFont(), QwtSymbol::setPen(), QwtLegendItem::setSymbol(), QwtTextLabel::setText(), QwtScaleWidget::setTitle(), QwtLegendItem::symbol(), QwtText::testPaintAttribute(), QwtTextLabel::text(), and QwtPlot::titleLabel().
Referenced by QwtPlot::print().