SciDAVis  1.D4
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
Plot Class Reference

Plot window class. More...

#include <Plot.h>

List of all members.

Public Types

enum  LabelFormat { Automatic, Decimal, Scientific, Superscripts }

Public Member Functions

int axesLinewidth () const
void axisLabelFormat (int axis, char &f, int &prec) const
int axisLabelFormat (int axis)
int axisLabelPrecision (int axis)
int closestCurve (int xpos, int ypos, int &dist, int &point)
QwtPlotCurve * curve (int index)
QList< int > curveKeys ()
QMap< int, QwtPlotItem * > curves ()
QList< QwtPlotItem * > curvesList ()
QColor frameColor ()
QList< int > getMajorTicksType ()
QList< int > getMinorTicksType ()
Gridgrid ()
int insertCurve (QwtPlotItem *c)
int insertMarker (QwtPlotMarker *m)
int majorTickLength () const
QwtPlotMarker * marker (int index)
QList< int > markerKeys ()
int minorTickLength () const
const QColor & paletteBackgroundColor () const
 Plot (QWidget *parent=0, const char *name=0)
QwtPlotItem * plotItem (int index)
void print (QPainter *, const QRect &rect, const QwtPlotPrintFilter &=QwtPlotPrintFilter())
void printFrame (QPainter *painter, const QRect &rect) const
void removeCurve (int index)
void removeMarker (int index)
void setAxesLinewidth (int width)
void setAxisLabelFormat (int axis, char f, int prec)
void setMajorTicksType (int axis, int type)
void setMinorTicksType (int axis, int type)
void setTickLength (int minLength, int majLength)
void updateLayout ()
 Adjust plot content to its current size. Must be reimplemented because the base implementation adds a mask causing an ugly drawing artefact.

Protected Member Functions

void drawInwardTicks (QPainter *painter, const QRect &rect, const QwtScaleMap &map, int axis, bool min, bool maj) const
virtual void drawItems (QPainter *painter, const QRect &rect, const QwtScaleMap map[axisCnt], const QwtPlotPrintFilter &pfilter) const
void printCanvas (QPainter *painter, const QRect &canvasRect, const QwtScaleMap map[axisCnt], const QwtPlotPrintFilter &pfilter) const

Protected Attributes

int curve_key
QMap< int, QwtPlotItem * > d_curves
Gridd_grid
QMap< int, QwtPlotMarker * > d_markers
int majTickLength
int marker_key
int minTickLength

Friends

class Graph

Detailed Description

Plot window class.


Member Enumeration Documentation

Enumerator:
Automatic 
Decimal 
Scientific 
Superscripts 

Constructor & Destructor Documentation

Plot::Plot ( QWidget *  parent = 0,
const char *  name = 0 
)

Member Function Documentation

int Plot::axesLinewidth ( ) const
void Plot::axisLabelFormat ( int  axis,
char &  f,
int &  prec 
) const
Returns:
the number format for the major scale labels of a specified axis
Parameters:
axisaxis index
Return values:
fformat character
precprecision

References ScaleDraw::labelFormat().

Referenced by Graph::copy(), Graph::saveLabelsFormat(), AxesDialog::setLabelsNumericFormat(), Graph::showAxis(), AxesDialog::showAxisFormatOptions(), and AxesDialog::updateLabelsFormat().

int Plot::axisLabelFormat ( int  axis)
int Plot::axisLabelPrecision ( int  axis)
int Plot::closestCurve ( int  xpos,
int  ypos,
int &  dist,
int &  point 
)
QwtPlotCurve * Plot::curve ( int  index)
QList<int> Plot::curveKeys ( )
inline
QMap<int, QwtPlotItem*> Plot::curves ( )
inline

References d_curves.

QList<QwtPlotItem *> Plot::curvesList ( )
inline

References d_curves.

void Plot::drawInwardTicks ( QPainter *  painter,
const QRect &  rect,
const QwtScaleMap &  map,
int  axis,
bool  min,
bool  maj 
) const
protected

References axesLinewidth(), majTickLength, and minTickLength.

Referenced by drawItems().

void Plot::drawItems ( QPainter *  painter,
const QRect &  rect,
const QwtScaleMap  map[axisCnt],
const QwtPlotPrintFilter &  pfilter 
) const
protectedvirtual
QColor Plot::frameColor ( )
QList< int > Plot::getMajorTicksType ( )
QList< int > Plot::getMinorTicksType ( )
Grid* Plot::grid ( )
inline
int Plot::insertCurve ( QwtPlotItem *  c)
int Plot::insertMarker ( QwtPlotMarker *  m)
int Plot::majorTickLength ( ) const
QwtPlotMarker* Plot::marker ( int  index)
inline
QList<int> Plot::markerKeys ( )
inline
int Plot::minorTickLength ( ) const
const QColor & Plot::paletteBackgroundColor ( ) const
QwtPlotItem* Plot::plotItem ( int  index)
inline
void Plot::print ( QPainter *  painter,
const QRect &  rect,
const QwtPlotPrintFilter &  pfilter = QwtPlotPrintFilter() 
)

References printFrame().

void Plot::printCanvas ( QPainter *  painter,
const QRect &  canvasRect,
const QwtScaleMap  map[axisCnt],
const QwtPlotPrintFilter &  pfilter 
) const
protected

References drawItems().

void Plot::printFrame ( QPainter *  painter,
const QRect &  rect 
) const

References paletteBackgroundColor().

Referenced by print(), and Graph::print().

void Plot::removeCurve ( int  index)
void Plot::removeMarker ( int  index)
void Plot::setAxesLinewidth ( int  width)
void Plot::setAxisLabelFormat ( int  axis,
char  f,
int  prec 
)

Change the number format for the major scale of a selected axis

Parameters:
axisaxis index
fformat
precprecision

References ScaleDraw::setLabelFormat().

void Plot::setMajorTicksType ( int  axis,
int  type 
)
void Plot::setMinorTicksType ( int  axis,
int  type 
)
void Plot::setTickLength ( int  minLength,
int  majLength 
)

References majTickLength, and minTickLength.

Referenced by Graph::setAxisTicksLength().

void Plot::updateLayout ( )

Adjust plot content to its current size. Must be reimplemented because the base implementation adds a mask causing an ugly drawing artefact.

Referenced by Graph::showAxis().


Friends And Related Function Documentation

friend class Graph
friend

Member Data Documentation

int Plot::curve_key
protected

Referenced by insertCurve(), and Plot().

QMap<int, QwtPlotItem*> Plot::d_curves
protected
Grid* Plot::d_grid
protected

Referenced by grid(), and Plot().

QMap<int, QwtPlotMarker*> Plot::d_markers
protected
int Plot::majTickLength
protected
int Plot::marker_key
protected

Referenced by insertMarker(), and Plot().

int Plot::minTickLength
protected

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