Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

QwtPlotPrintFilter Class Reference

A base class for plot print filters. More...

#include <qwt_plot_printfilter.h>

List of all members.

Public Types

enum  Options {
  PrintMargin = 1, PrintTitle = 2, PrintLegend = 4, PrintGrid = 8,
  PrintBackground = 16, PrintAll = ~0
}
enum  Item {
  Title, Legend, Curve, CurveSymbol,
  Marker, MarkerSymbol, MajorGrid, MinorGrid,
  CanvasBackground, AxisScale, AxisTitle
}

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

Private Attributes

int d_options
QwtPlotPrintFilterCached_cache


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.


Member Enumeration Documentation

enum QwtPlotPrintFilter::Item
 

Print items.

Enumeration values:
Title 
Legend 
Curve 
CurveSymbol 
Marker 
MarkerSymbol 
MajorGrid 
MinorGrid 
CanvasBackground 
AxisScale 
AxisTitle 

Definition at line 44 of file qwt_plot_printfilter.h.

enum QwtPlotPrintFilter::Options
 

Print options.

Enumeration values:
PrintMargin 
PrintTitle 
PrintLegend 
PrintGrid 
PrintBackground 
PrintAll 

Definition at line 32 of file qwt_plot_printfilter.h.


Constructor & Destructor Documentation

QwtPlotPrintFilter::QwtPlotPrintFilter  ) 
 

Sets filter options to QwtPlotPrintFilter::PrintAll

Definition at line 61 of file qwt_plot_printfilter.cpp.

QwtPlotPrintFilter::~QwtPlotPrintFilter  )  [virtual]
 

Destructor.

Definition at line 68 of file qwt_plot_printfilter.cpp.

References d_cache.


Member Function Documentation

void QwtPlotPrintFilter::apply QwtPlot  )  const [virtual]
 

Definition at line 115 of file qwt_plot_printfilter.cpp.

References AxisScale, AxisTitle, QwtSymbol::brush(), CanvasBackground, QwtPlot::canvasBackground(), QwtPlotPrintFilterCache::canvasBackground, color(), Curve, QwtPlotPrintFilterCache::curveColors, QwtLegendButton::curvePen(), CurveSymbol, QwtPlotPrintFilterCache::curveSymbolBrushColors, QwtPlotPrintFilterCache::curveSymbolPenColors, d_cache, QwtPlot::d_curves, QwtPlot::d_grid, QwtPlot::d_lblTitle, QwtPlot::d_legend, QwtPlot::d_markers, QwtPlot::d_scale, QwtMarker::font(), font(), QwtPlotPrintFilterCache::gridColors, QwtLegend::itemIterator(), QwtMarker::labelPen(), Legend, QwtPlotPrintFilterCache::legendFonts, QwtMarker::linePen(), MajorGrid, QwtGrid::majPen(), Marker, QwtPlotPrintFilterCache::markerFonts, QwtPlotPrintFilterCache::markerLabelColors, QwtPlotPrintFilterCache::markerLineColors, MarkerSymbol, QwtPlotPrintFilterCache::markerSymbolBrushColors, QwtPlotPrintFilterCache::markerSymbolPenColors, QwtScale::minBorderDist(), MinorGrid, QwtGrid::minPen(), QwtCurve::pen(), QwtSymbol::pen(), QwtPlotPrintFilterCache::scaleColor, QwtPlotPrintFilterCache::scaleFont, QwtPlotPrintFilterCache::scaleTitleFont, QwtScale::setBorderDist(), QwtSymbol::setBrush(), QwtPlot::setCanvasBackground(), QwtLegendButton::setCurvePen(), QwtMarker::setFont(), QwtMarker::setLabelPen(), QwtMarker::setLinePen(), QwtGrid::setMajPen(), QwtGrid::setMinPen(), QwtCurve::setPen(), QwtSymbol::setPen(), QwtMarker::setSymbol(), QwtCurve::setSymbol(), QwtLegendButton::setSymbol(), QwtScale::setTitleColor(), QwtScale::setTitleFont(), QwtMarker::symbol(), QwtCurve::symbol(), QwtLegendButton::symbol(), Title, QwtScale::titleColor(), QwtScale::titleFont(), and QwtPlotPrintFilterCache::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 85 of file qwt_plot_printfilter.cpp.

References MajorGrid, MinorGrid, options(), and PrintBackground.

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 110 of file qwt_plot_printfilter.cpp.

Referenced by apply(), and reset().

int QwtPlotPrintFilter::options  )  const [inline]
 

Get plot print options.

See also:
QwtPlotPrintFilter::setOptions()

Definition at line 79 of file qwt_plot_printfilter.h.

Referenced by color(), QwtPlot::drawCanvasItems(), QwtPlot::print(), and QwtPlot::printCanvas().

void QwtPlotPrintFilter::reset QwtPlot  )  const [virtual]
 

Definition at line 254 of file qwt_plot_printfilter.cpp.

References QwtSymbol::brush(), QwtPlotPrintFilterCache::canvasBackground, color(), QwtPlotPrintFilterCache::curveColors, QwtLegendButton::curvePen(), QwtPlotPrintFilterCache::curveSymbolBrushColors, QwtPlotPrintFilterCache::curveSymbolPenColors, d_cache, QwtPlot::d_curves, QwtPlot::d_grid, QwtPlot::d_lblTitle, QwtPlot::d_legend, QwtPlot::d_markers, QwtPlot::d_scale, font(), QwtPlotPrintFilterCache::gridColors, QwtLegend::itemIterator(), QwtMarker::labelPen(), QwtPlotPrintFilterCache::legendFonts, QwtMarker::linePen(), QwtGrid::majPen(), QwtPlotPrintFilterCache::markerFonts, QwtPlotPrintFilterCache::markerLabelColors, QwtPlotPrintFilterCache::markerLineColors, QwtPlotPrintFilterCache::markerSymbolBrushColors, QwtPlotPrintFilterCache::markerSymbolPenColors, QwtScale::minBorderDist(), QwtGrid::minPen(), QwtCurve::pen(), QwtSymbol::pen(), QwtPlotPrintFilterCache::scaleColor, QwtPlotPrintFilterCache::scaleFont, QwtPlotPrintFilterCache::scaleTitleFont, QwtScale::setBorderDist(), QwtSymbol::setBrush(), QwtPlot::setCanvasBackground(), QwtLegendButton::setCurvePen(), QwtMarker::setFont(), QwtMarker::setLabelPen(), QwtMarker::setLinePen(), QwtGrid::setMajPen(), QwtGrid::setMinPen(), QwtCurve::setPen(), QwtSymbol::setPen(), QwtMarker::setSymbol(), QwtCurve::setSymbol(), QwtLegendButton::setSymbol(), QwtScale::setTitleColor(), QwtScale::setTitleFont(), QwtMarker::symbol(), QwtCurve::symbol(), QwtLegendButton::symbol(), and QwtPlotPrintFilterCache::titleFont.

Referenced by QwtPlot::print().

void QwtPlotPrintFilter::setOptions int  options  )  [inline]
 

Set plot print options.

Parameters:
options Or'd QwtPlotPrintFilter::Options values
See also:
QwtPlotPrintFilter::options()

Definition at line 72 of file qwt_plot_printfilter.h.


Member Data Documentation

QwtPlotPrintFilterCache* QwtPlotPrintFilter::d_cache [private]
 

Definition at line 86 of file qwt_plot_printfilter.h.

Referenced by apply(), reset(), and ~QwtPlotPrintFilter().

int QwtPlotPrintFilter::d_options [private]
 

Definition at line 85 of file qwt_plot_printfilter.h.


The documentation for this class was generated from the following files:
Generated on Fri Nov 7 14:11:49 2003 for Qwt Developer's Guide by doxygen 1.3.2