#include <qscontour.h>
Inheritance diagram for QSContour:
Public Types | |
enum | PointElement { PointMark = 0 } |
enum | LineElement { Grid = 0 } |
Public Methods | |
QSContour (QSAxes *parent, const char *name=0) | |
virtual | ~QSContour () |
void | setContourFills (bool visible) |
void | setContourLines (bool visible) |
void | setContourLabels (bool visible) |
void | setLabelSpacing (double labelSpacing) |
bool | contourFills () const |
bool | contourLines () const |
bool | contourLabels () const |
double | labelSpacing () const |
virtual QString | posInfo (QSPt2f &pos) |
virtual bool | isClicked (const 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) |
Protected Methods | |
virtual void | allocRuntimeData () |
virtual void | freeRuntimeData () |
virtual bool | start () |
virtual bool | prepare () |
virtual bool | step () |
virtual void | end () |
virtual int | triangles ()=0 |
virtual void | getTriangle (int number, QSPt3f pts[3], double level=-10.0)=0 |
virtual bool | getNeighbouringTriangle (int *number, int *edge)=0 |
virtual int | triangleAtPos (const QSPt2f &pos)=0 |
virtual QString | vertexInfo (int t, int v, QSPt2f &pos)=0 |
virtual void | drawGrid ()=0 |
virtual void | drawPoints ()=0 |
virtual bool | rectangleGrid () const |
virtual void | getRectangle (int triangleNumber, QSPt3f pts[4]) |
Static Protected Attributes | |
const double | EPS_VALUE |
Draws contours. It contains a pure virtual functions which must be reimplemented to get it to work.
|
See QSGraphicalData::setLine() |
|
|
Constructor. |
|
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 from QSPlot. Reimplemented in QSGriddedContour. |
|
Draw grid ( lines connecting data points ) Implemented in QSGriddedContour. |
|
Draw legend item at position 'pos' Reimplemented from QSPlot. |
|
Draw point marks Implemented in QSGriddedContour. |
|
This can be called by parent axes to stop drawing. Normally called after 'step()' returned false; Reimplemented from QSPlot. |
|
Called from end().Everyting which goes to end() may be put here. Reimplemented from QSPlot. Reimplemented in QSGriddedContour. |
|
Returns if there is a neighbouring triangle. In 'number' and 'edge' returns a neighbouring triangle and edge of triangle 'number' and edge 'edge'. Implemented in QSGriddedContour. |
|
Reimplement this to return rectangle coordinates if the contour is drawn over rectangle grid. The rectangleGrid() method should be reimplemented too in this case. Rectangles are assumed be divided into four triangles. Rectangle 0 contains triangles 0-3, rectangle 1 contains triangles 4-7 etc ... The function id provided for efficiency only. Whole rectangles ( four triangles ) will be processed in a single step during drawing. Reimplemented in QSGriddedContour. |
|
Returns triangle number 'number'. The first edge is between pts[0] and pts[1] the second one is between pts[1] and pts[2] the third one is between pts[2] and pts[0] point z values must not be equal to level. If there is such point add EPS_VALUE to its z coordinate. see: getNeighboutingTriangle() Implemented in QSGriddedContour. |
|
Returns item size Reimplemented from QSPlot. |
|
Restores all graphics atributes Reimplemented from QSPlot. Reimplemented in QSGriddedContour. |
|
Returns info or QString::null Reimplemented from QSPlot. |
|
This will be called until it returns true and can be reimplemented for some in the background stuff. Reimplemented in QSNonGriddedContour. |
|
Reimplement this to return true if the contour is drawn over rectangle grid. The getRectangle() method should be reimplemented too in this case. Rectangles are assumed be divided into four triangles. Rectangle 0 contains triangles 0-3, rectangle 1 contains triangles 4-7 etc ... Reimplemented in QSGriddedContour. |
|
Saves all graphics attributes Reimplemented from QSPlot. Reimplemented in QSGriddedContour. |
|
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. |
|
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. |
|
Returns a number of a triangle which contains the point 'pos' if any or -1. Used by 'isClicked' and 'posInfo' subroutines. Nothing really nessesary Implemented in QSGriddedContour. |
|
Returns a total number of triangles. Implemented in QSGriddedContour. |
|
Returns info about the vertex 'v' of the triangle 't'. Nothing really nessesary Implemented in QSGriddedContour. |
|
See getTriangle() |