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

QSNonGriddedContour Class Reference

Dataset: Draws contours over non-gridded data. More...

#include <qscontour.h>

Inheritance diagram for QSNonGriddedContour:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Channels { VXCoord = 0, VYCoord = 1, VZCoord = 2, Triangles = 3 }

Public Methods

 QSNonGriddedContour (QSAxes *parent, const char *name=0)
virtual ~QSNonGriddedContour ()
virtual ColumnType columnType (int channel, int column) const
virtual QString channelVariable (int channel) const
virtual void loadStateFromStream (QDataStream &stream, QSObjectFactory *factory)
virtual void saveStateToStream (QDataStream &stream, QSObjectFactory *factory)

Protected Methods

virtual bool getAxisRange (QSAxis *axis, double &min, double &max)
virtual void dataChanged (int channel=-1)
virtual bool prepare ()
virtual void allocRuntimeData ()
virtual void freeRuntimeData ()
virtual int triangles ()
virtual void getTriangle (int number, QSPt3f pts[3], double level=-10.0)
virtual bool getNeighbouringTriangle (int *number, int *edge)
virtual int triangleAtPos (const QSPt2f &pos)
virtual QString vertexInfo (int t, int v, QSPt2f &pos)
virtual void drawGrid ()
virtual void drawPoints ()

Detailed Description

Dataset: Draws contours over non-gridded data.

Data format is described in QSNonGriddedContour::Channels . See also QSAxes::plotAdd() .

Author:
Kamil Dobkowski


Member Enumeration Documentation

enum QSNonGriddedContour::Channels
 

Descriptive names of data channels. See QSData::setMatrix(). VXCoords, VYCoord, VZCoord must have a one column and the same number of rows. VXCoord contains x coordinates, VYCords contains y coordinates, and VZCoord contains z coordinates. The same row in all those matrices defines a one data point, so we have rows(VXCoord) data points. Triangles must have three columns and must contain indices to rows in Coord matrices, so one index defines one point. One row in Triangles defines a one traingle. Such matrix can be calculated by triangulating the given set of points, Traiangles is required because this object just can't draw contour using only data points.


Constructor & Destructor Documentation

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

Destructor.

virtual QSNonGriddedContour::~QSNonGriddedContour   [virtual]
 

Destructor.


Member Function Documentation

virtual void QSNonGriddedContour::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 QSContour.

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

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

Reimplemented from QSData.

virtual ColumnType QSNonGriddedContour::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 QSNonGriddedContour::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 QSNonGriddedContour::drawGrid   [protected, virtual]
 

Draw grid ( lines connecting data points )

Implements QSContour.

virtual void QSNonGriddedContour::drawPoints   [protected, virtual]
 

Draw point marks

Implements QSContour.

virtual void QSNonGriddedContour::freeRuntimeData   [protected, virtual]
 

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

Reimplemented from QSContour.

virtual bool QSNonGriddedContour::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 bool QSNonGriddedContour::getNeighbouringTriangle int *    number,
int *    edge
[protected, virtual]
 

Returns if there is a neighbouring triangle. In 'number' and 'edge' returns a neighbouring triangle and edge of triangle 'number' and edge 'edge'.

Implements QSContour.

virtual void QSNonGriddedContour::getTriangle int    number,
QSPt3f    pts[3],
double    level = -10.0
[protected, virtual]
 

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()

Implements QSContour.

virtual void QSNonGriddedContour::loadStateFromStream QDataStream &    stream,
QSObjectFactory   factory
[virtual]
 

Restores all graphics atributes

Reimplemented from QSContour.

virtual bool QSNonGriddedContour::prepare   [protected, virtual]
 

This will be called until it returns true and can be reimplemented for some in the background stuff.

Reimplemented from QSContour.

virtual void QSNonGriddedContour::saveStateToStream QDataStream &    stream,
QSObjectFactory   factory
[virtual]
 

Saves all graphics attributes

Reimplemented from QSContour.

virtual int QSNonGriddedContour::triangleAtPos const QSPt2f   pos [protected, virtual]
 

Returns a number of a triangle which contains the point 'pos' if any or -1. Used by 'isClicked' and 'posInfo' subroutines. Nothing really nessesary

Implements QSContour.

virtual int QSNonGriddedContour::triangles   [protected, virtual]
 

Returns a total number of triangles.

Implements QSContour.

virtual QString QSNonGriddedContour::vertexInfo int    t,
int    v,
QSPt2f   pos
[protected, virtual]
 

Returns info about the vertex 'v' of the triangle 't'. Nothing really nessesary

Implements QSContour.


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