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

QSGriddedContour Class Reference

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

#include <qscontour.h>

Inheritance diagram for QSGriddedContour:

Inheritance graph
[legend]
List of all members.

Public Types

enum  Channels { XVector = 0, YVector = 1, Data = 2 }

Public Methods

 QSGriddedContour (QSAxes *parent, const char *name=0)
virtual ~QSGriddedContour ()
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 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 ()
virtual bool rectangleGrid () const
virtual void getRectangle (int triangleNumber, QSPt3f pts[4])

Detailed Description

Dataset : Draws contours over gridded data.

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

Author:
Kamil Dobkowski


Member Enumeration Documentation

enum QSGriddedContour::Channels
 

Descriptive names of data channels. See QSData::setMatrix(). Data contains Z values, XVector ( optional ) contains x coordinates of a grid, YVector ( optional ) contains y coordinates of a grid. cols(XVector) == cols(Data) and rows(YVector) == rows(Data), both vectors must be monotone.


Constructor & Destructor Documentation

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

Destructor.

virtual QSGriddedContour::~QSGriddedContour   [virtual]
 

Destructor.


Member Function Documentation

virtual void QSGriddedContour::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 QSGriddedContour::channelVariable int    channel const [virtual]
 

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

Reimplemented from QSData.

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

Draw grid ( lines connecting data points )

Implements QSContour.

virtual void QSGriddedContour::drawPoints   [protected, virtual]
 

Draw point marks

Implements QSContour.

virtual void QSGriddedContour::freeRuntimeData   [protected, virtual]
 

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

Reimplemented from QSContour.

virtual bool QSGriddedContour::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 QSGriddedContour::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 QSGriddedContour::getRectangle int    triangleNumber,
QSPt3f    pts[4]
[protected, virtual]
 

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 from QSContour.

virtual void QSGriddedContour::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 QSGriddedContour::loadStateFromStream QDataStream &    stream,
QSObjectFactory   factory
[virtual]
 

Restores all graphics atributes

Reimplemented from QSContour.

virtual bool QSGriddedContour::rectangleGrid   const [inline, protected, virtual]
 

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 from QSContour.

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

Saves all graphics attributes

Reimplemented from QSContour.

virtual int QSGriddedContour::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 QSGriddedContour::triangles   [protected, virtual]
 

Returns a total number of triangles.

Implements QSContour.

virtual QString QSGriddedContour::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:48 2002 for KMatplot library by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002