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

QwtPlotPrintFilter Class Reference

List of all members.

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 Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts Qwts