Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Examples  

QSCurve Class Reference

Dataset: XY plot. More...

#include <qscurve.h>

Inheritance diagram for QSCurve:

Inheritance graph
List of all members.

Public Types

enum  Channels {
  XVector = 0, YVector = 1, DXVector = 2, DYVector = 3,
  LineStyles = 4, FillStyles = 5, PointStyles = 6, ArrowStyles = 7,
  ErrorLineStyles = 8, XLineStyles = 9, YLineStyles = 10
enum  SeriesType {
  Lines = 0, Area, Ribbon, Bars,
  Vectors, Flux, Rectangles, Ellipses,
  LeftStairs, MiddleStairs, RightStairs, User
enum  FillElement { BaseFill = 0 }
enum  LineElement { BaseLine = 0, ErrorLine = 1, XLine = 2, YLine = 3 }
enum  PointElement { PointMark = 0 }

Public Methods

 QSCurve (QSAxes *parent, const char *name=0)
 ~QSCurve ()
void setType (int type)
int type () const
void setFixedDelta (const QSPt2f &delta)
void setFixedDX (double value)
void setFixedDY (double value)
void setPercentDelta (const QSPt2f &delta)
void setPercentDX (double value)
void setPercentDY (double value)
QSPt2f fixedDelta () const
double fixedDX () const
double fixedDY () const
QSPt2f percentDelta () const
double percentDX () const
double percentDY () const
void setZeroPoint (const QSPt2f &p)
void setZeroLevelX (double x)
void setZeroLevelY (double y)
QSPt2f zeroPoint () const
double zeroLevelX () const
double zeroLevelY () const
void setPObject (QSSegment *po)
QSSegmentpObject () const
void setArrow1 (const QSGArrow &astyle)
void setArrow2 (const QSGArrow &astyle)
void setArrow1Property (const QString &value)
void setArrow2Property (const QString &value)
QSGArrow arrow1 () const
QSGArrow arrow2 () const
QString arrow1Property () const
QString arrow2Property () const
virtual QString posInfo (QSPt2f &pos)
virtual QSPt2f legendItemSize (QSDrv *drv)
virtual void drawLegendItem (const QSPt2f &pos, QSDrv *drv)
virtual void loadStateFromStream (QDataStream &stream, QSObjectFactory *factory)
virtual void saveStateToStream (QDataStream &stream, QSObjectFactory *factory)
virtual QString channelVariable (int channel) const
virtual ColumnType columnType (int channel, int column) const

Protected Methods

virtual void dataChanged (int channel=-1)
virtual void allocRuntimeData ()
virtual void freeRuntimeData ()
virtual bool getAxisRange (QSAxis *axis, double &min, double &max)
virtual bool start ()
virtual bool step ()
virtual void end ()

Detailed Description

Dataset: XY plot.

Base class for parametric curves. The appearance of QSCurve can be customized by setting your own QSSegment object, see setPObject() . Data format is described in QSCurve::Channels .See also QSAxes::plotAdd() .

Kamil Dobkowski


Member Enumeration Documentation

enum QSCurve::Channels

Descriptive names of data channels. See QSData::setMatrix() All channels must be column vectors with the same number of rows. Values from the same row from all matrices define a one data point. XVector contains the x coordinate, YVector contains the y coordinate, DX vector contain the dx coordinate ( used for vectors, error bars etc ), DY vector contains the dy coordinate, and other vectors contain other attributes.

enum QSCurve::FillElement

See QSGraphicalData::setFill()

enum QSCurve::LineElement

See QSGraphicalData::setLine()

enum QSCurve::PointElement

See QSGraphicalData::setPoint()

enum QSCurve::SeriesType

Types of the series.

See also:

Constructor & Destructor Documentation

QSCurve::QSCurve QSAxes   parent,
const char *    name = 0




Member Function Documentation

virtual void QSCurve::allocRuntimeData   [protected, virtual]

Called from start(). Everyting which goes to start() may be put here. inits m_curr_driver, m_curr_dpi, m_csize, m_cpos fields with values taken from parent axes

Reimplemented from QSPlot.

QSGArrow QSCurve::arrow1   const [inline]

Returns arrow1

QString QSCurve::arrow1Property   const [inline]

Returns arrow1 property

QSGArrow QSCurve::arrow2   const [inline]

Returns arrow2

QString QSCurve::arrow2Property   const [inline]

Returns arrow2 property

virtual QString QSCurve::channelVariable int    channel const [virtual]

Returns a variable name ( 'x', 'y', 'z', 'v' etc ) for use in formulas.

Reimplemented from QSData.

virtual ColumnType QSCurve::columnType int    channel,
int    column
const [virtual]

Metadata - type of the given column. It should be reimplemented in derived classes. Used to create editors in sheet

Reimplemented from QSData.

virtual void QSCurve::dataChanged int    channel = -1 [protected, virtual]

This function is called after data has changed by 'setMatrix' method. You should also call it by hand, when you have changed the data in any matrix. It informs derived classes to mark old max and min data values as invalid, and informs them that they should repaint themselves. Default implementation calls dataChanging( this, channel ),

Reimplemented from QSData.

virtual void QSCurve::drawLegendItem const QSPt2f   pos,
QSDrv   drv

Draw legend item at position 'pos'

Reimplemented from QSPlot.

virtual void QSCurve::end   [protected, virtual]

This can be called by parent axes to stop drawing. Normally called after 'step()' returned false;

Reimplemented from QSPlot.

QSPt2f QSCurve::fixedDelta   const [inline]

Returns a fixed delta value.

double QSCurve::fixedDX   const [inline]

Returns a fixed delta value.

double QSCurve::fixedDY   const [inline]

Returns a fixed delta value.

virtual void QSCurve::freeRuntimeData   [protected, virtual]

Called from end().Everyting which goes to end() may be put here.

Reimplemented from QSPlot.

virtual bool QSCurve::getAxisRange QSAxis   axis,
double &    min,
double &    max
[protected, virtual]

Must be reimplemented and return data range on each axis or false when no data is set. This functions is always called outside 'start()' and 'end()' !

Reimplemented from QSPlot.

virtual QSPt2f QSCurve::legendItemSize QSDrv   drv [virtual]

Returns item size

Reimplemented from QSPlot.

virtual void QSCurve::loadStateFromStream QDataStream &    stream,
QSObjectFactory   factory

Restores all graphics atributes

Reimplemented from QSPlot.

QSPt2f QSCurve::percentDelta   const [inline]

Returns a delta value.

double QSCurve::percentDX   const [inline]

Returns a delta value.

double QSCurve::percentDY   const [inline]

Returns a delta value.

QSSegment* QSCurve::pObject   const [inline]

Returns the plot object or NULL.

virtual QString QSCurve::posInfo QSPt2f   pos [virtual]

Returns info or QString::null

Reimplemented from QSPlot.

virtual void QSCurve::saveStateToStream QDataStream &    stream,
QSObjectFactory   factory

Saves all graphics attributes

Reimplemented from QSPlot.

void QSCurve::setArrow1 const QSGArrow   astyle

This is usable only for vectors or errorbars.

void QSCurve::setArrow1Property const QString &    value [inline]

Sets arrow property

void QSCurve::setArrow2 const QSGArrow   astyle

This is usable only for vectors or errorbars.

void QSCurve::setArrow2Property const QString &    value [inline]

Sets arrow property

void QSCurve::setFixedDelta const QSPt2f   delta

Delta acts as a DX,DY channel with fixed values. Used when drawing vectors, error-bars, rectangle-type plots. Total delta value is calculated as follows ( example for DX ): DX[i] = DXVector[i] + FixedDelta.X + PercentDelta.X*DXVector[i]/100.0; Error is assumed to be +-delta.

void QSCurve::setFixedDX double    value

Sets a new fixed delta value.

void QSCurve::setFixedDY double    value

Sets a new fixed delta value.

void QSCurve::setPercentDelta const QSPt2f   delta

Delta PDX[i] = PercentDelta.X*YVector[i]/100.0. Total delta value is calculated as follows ( example for DX ): DX[i] = DXVector[i] + FixedDelta.X + PercentDelta.X*DXVector[i]/100.0;

void QSCurve::setPercentDX double    value

Sets a percent delta

void QSCurve::setPercentDY double    value

Sets a percent delta

void QSCurve::setPObject QSSegment   po

Sets a new plot object. Normally there is no need to use it. Pointer is consumed and will be deleted when not needed. Remember that also 'User' plot type must be set.

void QSCurve::setType int    type

Sets a new plot type. See 'SeriesType'

void QSCurve::setZeroLevelX double    x

Sets zero level.

void QSCurve::setZeroLevelY double    y

Sets zero level.

void QSCurve::setZeroPoint const QSPt2f   p

Sets a zero level. It is the y value from which, for example, sample lines starts.

virtual bool QSCurve::start   [protected, virtual]

Start drawing. Called by parent axes. Time-expensive operations should be performed in little parts during 'step()' call. If returns false - 'end()' is called immediately, if returns true - 'step()' is called next.

Reimplemented from QSPlot.

virtual bool QSCurve::step   [protected, virtual]

This function will be called to make drawing until it returns false. Notice that drawing should be stopped at any time. Even if this function returns true parent axes object may decide to call end().

Reimplemented from QSPlot.

int QSCurve::type   const [inline]

Returns the plot type.

double QSCurve::zeroLevelX   const [inline]

Returns the zero-level.

double QSCurve::zeroLevelY   const [inline]

Returns the zero-level.

QSPt2f QSCurve::zeroPoint   const [inline]

Returns the zero-level.

The documentation for this class was generated from the following file:
Generated on Mon Mar 18 19:16:42 2002 for KMatplot library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002