Logo Search packages:      
Sourcecode: pcp-gui version File versions

QwtPlotGrid Class Reference

#include <qwt_plot_grid.h>

Inheritance diagram for QwtPlotGrid:

QwtPlotItem

List of all members.


Detailed Description

A class which draws a coordinate grid.

The QwtPlotGrid class can be used to draw a coordinate grid. A coordinate grid consists of major and minor vertical and horizontal gridlines. The locations of the gridlines are determined by the X and Y scale divisions which can be assigned with QwtPlotGrid::setXDiv and QwtPlotGrid::setYDiv() The draw() member draws the grid within a bounding rectangle.

Definition at line 34 of file qwt_plot_grid.h.


Public Types

enum  ItemAttribute { Legend = 1, AutoScale = 2 }
enum  RttiValues {
  Rtti_PlotItem = 0, Rtti_PlotGrid, Rtti_PlotMarker, Rtti_PlotCurve,
  Rtti_PlotHistogram, Rtti_PlotSpectrogram, Rtti_PlotSVG, Rtti_PlotUserItem = 1000
}

Public Member Functions

void attach (QwtPlot *plot)
virtual QwtDoubleRect boundingRect () const
void detach ()
virtual void draw (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRect &rect) const
 Draw the grid.
void enableX (bool tf)
 Enable or disable vertical gridlines.
void enableXMin (bool tf)
 Enable or disable minor vertical gridlines.
void enableY (bool tf)
 Enable or disable horizontal gridlines.
void enableYMin (bool tf)
 Enable or disable minor horizontal gridlines.
void hide ()
QwtDoubleRect invTransform (const QwtScaleMap &, const QwtScaleMap &, const QRect &) const
bool isVisible () const
virtual void itemChanged ()
virtual QWidget * legendItem () const
 Allocate the widget that represents the item on the legend.
const QPen & majPen () const
const QPen & minPen () const
QRect paintRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the bounding paint rect of 2 maps.
QwtPlotplot () const
 Return attached plot.
 QwtPlotGrid ()
 Enables major grid, disables minor grid.
virtual int rtti () const
QwtDoubleRect scaleRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the bounding scale rect of 2 maps.
void setAxis (int xAxis, int yAxis)
void setItemAttribute (ItemAttribute, bool on=true)
void setMajPen (const QPen &p)
 Assign a pen for the major gridlines.
void setMinPen (const QPen &p)
 Assign a pen for the minor gridlines.
void setPen (const QPen &p)
 Assign a pen for both major and minor gridlines.
void setTitle (const QwtText &title)
void setTitle (const QString &title)
virtual void setVisible (bool)
void setXAxis (int axis)
void setXDiv (const QwtScaleDiv &sx)
 Assign an x axis scale division.
void setYAxis (int axis)
void setYDiv (const QwtScaleDiv &sy)
 Assign a y axis division.
void setZ (double z)
 Set the z value.
void show ()
bool testItemAttribute (ItemAttribute) const
const QwtTexttitle () const
QRect transform (const QwtScaleMap &, const QwtScaleMap &, const QwtDoubleRect &) const
virtual void updateLegend (QwtLegend *) const
 Update the widget that represents the item on the legend.
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &)
 Update the item to changes of the axes scale division.
int xAxis () const
 Return xAxis.
bool xEnabled () const
bool xMinEnabled () const
const QwtScaleDivxScaleDiv () const
int yAxis () const
 Return yAxis.
bool yEnabled () const
bool yMinEnabled () const
const QwtScaleDivyScaleDiv () const
double z () const
virtual ~QwtPlotGrid ()
 dtor

Private Member Functions

void drawLines (QPainter *painter, const QRect &, Qt::Orientation orientation, const QwtScaleMap &, const QwtValueList &) const

Private Attributes

PrivateData * d_data

Classes

class  PrivateData

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index