man QwtPlotPrintFilter (Fonctions bibliothèques) -
NAME
QwtPlotPrintFilter -
SYNOPSIS
Detailed Description
A base class for plot print filters.
QwtPlotPrintFilter can be used to customize QwtPlot::print.
Definition at line 28 of file qwt_plot_printfilter.h.
Public Types
enum Options { PrintMargin = 1, PrintTitle = 2, PrintLegend = 4, PrintGrid = 8, PrintCanvasBackground = 16, PrintWidgetBackground = 32, PrintAll = ~PrintWidgetBackground }
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, int id=-1) const
virtual QFont font (const QFont &, Item item, int id=-1) const
void setOptions (int options)
int options () const
virtual void apply (QwtPlot *) const
virtual void reset (QwtPlot *) const
Member Enumeration Documentation
enum QwtPlotPrintFilter::Item
Print items.
Definition at line 45 of file qwt_plot_printfilter.h.
enum QwtPlotPrintFilter::Options
Print options.
Definition at line 32 of file qwt_plot_printfilter.h.
Constructor & Destructor Documentation
QwtPlotPrintFilter::QwtPlotPrintFilter ()
Sets filter options to QwtPlotPrintFilter::PrintAll Definition at line 66 of file qwt_plot_printfilter.cpp.
QwtPlotPrintFilter::~QwtPlotPrintFilter () [virtual]
Destructor.
Definition at line 73 of file qwt_plot_printfilter.cpp.
Member Function Documentation
void QwtPlotPrintFilter::apply (QwtPlot * plot) const [virtual]
Change color and fonts of a plot
See also: QwtPlotPrintFilter::apply
Definition at line 124 of file qwt_plot_printfilter.cpp.
References QwtSymbol::brush(), QwtPlot::canvasBackground(), color(), QwtLegendItem::curvePen(), d_cache, QwtPlot::d_curves, QwtPlot::d_grid, QwtPlot::d_lblTitle, QwtPlot::d_legend, QwtPlot::d_markers, QwtPlot::d_scale, QwtMarker::font(), font(), QwtLegend::itemIterator(), QwtMarker::labelPen(), QwtMarker::linePen(), QwtGrid::majPen(), QwtScale::minBorderDist(), QwtGrid::minPen(), QwtCurve::pen(), QwtSymbol::pen(), QwtScale::setBorderDist(), QwtSymbol::setBrush(), QwtPlot::setCanvasBackground(), QwtLegendItem::setCurvePen(), QwtMarker::setFont(), QwtMarker::setLabelPen(), QwtMarker::setLinePen(), QwtGrid::setMajPen(), QwtGrid::setMinPen(), QwtCurve::setPen(), QwtSymbol::setPen(), QwtMarker::setSymbol(), QwtCurve::setSymbol(), QwtLegendItem::setSymbol(), QwtScale::setTitleColor(), QwtScale::setTitleFont(), QwtMarker::symbol(), QwtCurve::symbol(), QwtLegendItem::symbol(), QwtScale::titleColor(), and QwtScale::titleFont().
Referenced by QwtPlot::print().
QColor QwtPlotPrintFilter::color (const QColor & c, Item item, int id = -1) const [virtual]
Modifies a color for printing.
Parameters:
c Color to be modified
item Type of item where the color belongs
id Optional id of the item (curveId/markerId)
Returns: Modified color.
In case of !(QwtPlotPrintFilter::options() & PrintBackground) MajorGrid is modified to Qt::darkGray, MinorGrid to Qt::gray. All other colors are returned unmodified. Definition at line 90 of file qwt_plot_printfilter.cpp.
References options().
Referenced by apply(), and reset().
QFont QwtPlotPrintFilter::font (const QFont & f, Item item, int id = -1) const [virtual]
Modifies a font for printing.
Parameters:
f Font to be modified
item Type of item where the font belongs
id Optional id of the item (curveId/markerId)
All fonts are returned unmodified Definition at line 115 of file qwt_plot_printfilter.cpp.
Referenced by apply(), and reset().
int QwtPlotPrintFilter::options () const
Get plot print options.
See also: QwtPlotPrintFilter::setOptions()
Definition at line 81 of file qwt_plot_printfilter.h.
Referenced by color(), QwtPlot::drawCanvasItems(), QwtPlot::print(), and QwtPlot::printCanvas().
void QwtPlotPrintFilter::reset (QwtPlot * plot) const [virtual]
Reset color and fonts of a plot
See also: QwtPlotPrintFilter::apply
Definition at line 284 of file qwt_plot_printfilter.cpp.
References QwtSymbol::brush(), color(), QwtLegendItem::curvePen(), d_cache, QwtPlot::d_curves, QwtPlot::d_grid, QwtPlot::d_lblTitle, QwtPlot::d_legend, QwtPlot::d_markers, QwtPlot::d_scale, font(), QwtLegend::itemIterator(), QwtMarker::labelPen(), QwtMarker::linePen(), QwtGrid::majPen(), QwtScale::minBorderDist(), QwtGrid::minPen(), QwtCurve::pen(), QwtSymbol::pen(), QwtScale::setBorderDist(), QwtSymbol::setBrush(), QwtPlot::setCanvasBackground(), QwtLegendItem::setCurvePen(), QwtMarker::setFont(), QwtMarker::setLabelPen(), QwtMarker::setLinePen(), QwtGrid::setMajPen(), QwtGrid::setMinPen(), QwtCurve::setPen(), QwtSymbol::setPen(), QwtMarker::setSymbol(), QwtCurve::setSymbol(), QwtLegendItem::setSymbol(), QwtScale::setTitleColor(), QwtScale::setTitleFont(), QwtMarker::symbol(), QwtCurve::symbol(), and QwtLegendItem::symbol().
Referenced by QwtPlot::print().
void QwtPlotPrintFilter::setOptions (int options)
Set plot print options.
Parameters: options Or'd QwtPlotPrintFilter::Options values
See also: QwtPlotPrintFilter::options()
Definition at line 74 of file qwt_plot_printfilter.h.
Author
Generated automatically by Doxygen for Qwt User's Guide from the source code.