#include <qsplot.h>
Inheritance diagram for QSPlot:
Public Methods | |
QSPlot (QSAxes *parentAxes=0, const char *name=0) | |
virtual | ~QSPlot () |
void | setDefaultAxis (QSAxis *axis) |
void | setDefaultXAxis (int axisIndex) |
void | setDefaultYAxis (int axisIndex) |
void | setDefaultZAxis (int axisIndex) |
void | setDefaultVAxis (int axisIndex) |
int | defaultXAxis () const |
int | defaultYAxis () const |
int | defaultZAxis () const |
int | defaultVAxis () const |
QSAxis * | defaultAxis (int axisType) const |
void | setGradient (const QSGGradient &gradient) |
const QSGGradient | gradient () const |
void | setLegendItemVisible (bool visible) |
bool | legendItemVisible () const |
virtual QString | posInfo (QSPt2f &pos) |
virtual QSPt2f | legendItemSize (QSDrv *drv) |
virtual void | drawLegendItem (const QSPt2f &pos, QSDrv *drv) |
QSPt2f | dataToWorld (const QSPt2f &p) const |
QSPt3f | dataToWorld (const QSPt3f &p) const |
QSPt3f | dataToWorldV (const QSPt3f &p) const |
QSPt2f | worldToData (const QSPt2f &p) const |
QSPt3f | worldToData (const QSPt3f &p) const |
QSPt3f | worldToDataV (const QSPt3f &p) const |
void | setGradientProperty (const QString &string) |
QString | gradientProperty () const |
virtual void | loadStateFromStream (QDataStream &stream, QSObjectFactory *factory) |
virtual void | saveStateToStream (QDataStream &stream, QSObjectFactory *factory) |
Protected Slots | |
virtual void | axisRemoved (QSData *object) |
Protected Methods | |
virtual bool | getAxisRange (QSAxis *axis, double &min, double &max) |
virtual bool | start () |
virtual bool | step () |
virtual void | end () |
virtual void | allocRuntimeData () |
virtual void | freeRuntimeData () |
Protected Attributes | |
bool | m_busy |
bool | m_is_legend |
int | m_bkg_handler |
double | m_curr_dpi |
QSDrv * | m_drv |
QSPt2f | m_csize |
QSPt2f | m_cpos |
QSAxis * | m_daxes [5] |
QSAxes * | m_axes |
QSGGradient | m_gradient |
const QSProjection * | m_proj |
Static Protected Attributes | |
const int | work_steps = 30 |
Dataset, which can be diplayed using QSAxes, see QSAxes::plotAdd(). You can bind this dataset to some axes in the parent object using setDefaultAxis(). You can map coordinates from data to world coordinates using worldToData(). QSPlot contains support for drawing legends, see drawLegendItem(), legendItemSize(). QSCLegend uses them extensively. There is also support for 'Data picker' tool implemented, see posInfo(). For implementing your own dataset types you will have to reimplement : getAxisRange(), start(), step(), end(), and also drawLegendItem(), legendItemSize(), posInfo(), and optionaly allocRuntimeData(), freeRuntimeData().
|
Constructor. You must add the plot immedialtely to the parent child list ( see QSAxes::plotAdd() ) |
|
Destructor. |
|
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 in QSContour. |
|
Check if this plot is not bound to a removed axis. if it is, find another axis of the same type - there always should be at least one such axis.. |
|
Maps a point from an visible axis range to <0,1> |
|
Maps a point from an visible axis range to <0,1> |
|
Maps a point from an visible axis range to <0,1> |
|
Returns default axis. 'axisType' must be one of QSAxes::AxisType' ! |
|
Returns an index of the default axis |
|
Returns an index of the default axis |
|
Returns an index of the default axis |
|
Returns an index of the default axis |
|
Draw legend item at position 'pos' Reimplemented in QSContour. |
|
This can be called by parent axes to stop drawing. Normally called after 'step()' returned false; Reimplemented in QSContour. |
|
Called from end().Everyting which goes to end() may be put here. Reimplemented in QSContour. |
|
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 in QSGriddedContour. |
|
Returns a gradient |
|
Returns gradient as QString |
|
Returns item size Reimplemented in QSContour. |
|
Returns legend setting. |
|
Restores all graphics atributes Reimplemented from QSGraphicalData. Reimplemented in QSContour. |
|
Returns info or QString::null Reimplemented in QSContour. |
|
Saves all graphics attributes Reimplemented from QSGraphicalData. Reimplemented in QSContour. |
|
Sets an axis to which to bind to. Type of this axis is taken from QSAxis::type() . |
|
Sets the default axis. |
|
Sets the default axis. |
|
Sets the default axis. |
|
Sets the default axis. |
|
Sets a gradient object |
|
Sets a new gradient. |
|
Show legend item corresponding to this plot in legend object |
|
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 in QSContour. |
|
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 in QSContour. |
|
Maps a point from <0,1> to an visible axis range |
|
Maps a point from <0,1> to an visible axis range. |
|
Maps a point from <0,1> to an visible axis range |