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

QSData Class Reference

Object which contains data ( list of matrices ). More...

#include <qsdata.h>

Inheritance diagram for QSData:

Inheritance graph
[legend]
List of all members.

Public Types

enum  ColumnType {
  ColumnUnknown = 0, ColumnX, ColumnY, ColumnZ,
  ColumnV, ColumnDX, ColumnDY, ColumnSize,
  ColumnWidth, ColumnLineStyle, ColumnFillStyle, ColumnPointStyle,
  ColumnPointFill, ColumnArrowStyle, ColumnFontFamily, ColumnFontSize,
  ColumnFontBold, ColumnFontItalic, ColumnRed, ColumnGreen,
  ColumnBlue, ColumnAlpha, ColumnByte, ColumnInt,
  ColumnBool, ColumnString
}

Signals

void sigNameChanged (const char *name)
void sigNameChanged (QSData *thisOrChildObject, const char *name)
void sigDataChanged (QSData *thisOrChildObject, int channel)
void sigChildAdded (QSData *newChild)
void sigChildRemoved (QSData *removedChild)
void sigChildOrder ()
void sigChildListChanged ()
void sigDeleted (QSData *thisObject)

Public Methods

 QSData (QObject *parent=NULL, QSData *parentObject=NULL, const char *name=0)
virtual ~QSData ()
virtual void setObjectName (const char *name)
const char * objectName () const
virtual bool setMatrix (int channel, QSMatrix *m)
virtual QSMatrixmatrix (int channel) const
virtual QSMatrixtakeMatrix (int channel, QSMatrix *newMatrix=NULL)
virtual void deleteMatrix (int channel)
virtual int channelCount () const
virtual void dataChanging (int channel=-1)
virtual void dataChanged (int channel=-1)
virtual QSData * parentObject () const
virtual int childCount () const
virtual QSData * child (int index) const
virtual int childIndex (QSData *child) const
virtual QString channelVariable (int channel) const
virtual ColumnType columnType (int channel, int column) const
virtual void loadStateFromStream (QDataStream &stream, QSObjectFactory *factory)
virtual void saveStateToStream (QDataStream &stream, QSObjectFactory *factory)

Protected Methods

virtual void dataChanging (QSData *object, int channel=-1)
virtual void dataChanged (QSData *object, int channel=-1)
virtual void nameChanged (QSData *object, const char *newName)

Protected Attributes

QSData * m_parent_object

Detailed Description

Object which contains data ( list of matrices ).

Object, which contains data - a list of matrices, see setMatrix(), matrix(). This class is inherited by all dataset types: QSSurface, QSCurve, etc. and axes : QSAxes2D, QSAxes3D etc. For example an ordinary XYPlot ( QSCurve ) contains XVector, YVector, DX Vector, DYVector. and draws all succesive ( x, y ,dx, dy ) points as a curve with error bars. This object can own child QSData objects, for example: axes contains curves ( but curves have no furher child object ) - see child(), childCount(), childIndex(). This is only an interface class and does not contain implementation of matrix list. If you are going to change data ( change value of some matrix element, etc ) you have to notify QSData object using dataChanging(), dataChanged() before and after the change, and it notifies outside world about this fact using sigDataChanged() .

See also:
QSMatrix
Author:
Kamil Dobkowski


Member Enumeration Documentation

enum QSData::ColumnType
 

Column type


Constructor & Destructor Documentation

QSData::QSData QObject *    parent = NULL,
QSData *    parentObject = NULL,
const char *    name = 0
 

Constructor

virtual QSData::~QSData   [virtual]
 

Destructor. It should delete all child object as well.


Member Function Documentation

virtual int QSData::channelCount   const [virtual]
 

Returns the total number of channels.

Reimplemented in QSGraphicalData.

virtual QString QSData::channelVariable int    channel const [inline, virtual]
 

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

Reimplemented in QSGriddedContour.

virtual QSData* QSData::child int    index const [inline, virtual]
 

Returns a child object

Reimplemented in QSAxes.

virtual int QSData::childCount   const [inline, virtual]
 

Number of child QSData objects

Reimplemented in QSAxes.

virtual int QSData::childIndex QSData *    child const [virtual]
 

Returns a child index.

virtual ColumnType QSData::columnType int    channel,
int    column
const [inline, virtual]
 

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

Reimplemented in QSAxis.

virtual void QSData::dataChanged QSData *    object,
int    channel = -1
[protected, virtual]
 

Emits sigDataChanged(). This function collects all 'dataChanged()' calls from this object and child objects. and if parent is not NULL calls parent->dataChanged( this, channel );

Reimplemented in QSAxes.

virtual void QSData::dataChanged int    channel = -1 [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 in QSGriddedContour.

virtual void QSData::dataChanging QSData *    object,
int    channel = -1
[protected, virtual]
 

Does nothing. This function collects all 'dataChanging()' calls from this object and child objects. if parent is not NULL calls parent->dataChanging( this, channel );

Reimplemented in QSAxes.

virtual void QSData::dataChanging int    channel = -1 [virtual]
 

This function is called before data is changed by 'setMatrix' method. You should also call it by hand, when you are going to change the data in any matrix.. It informs derived classes to stop a drawing process if it is in progress at the moment. Default implementation calls dataChanging( this, channel ),

virtual void QSData::deleteMatrix int    channel [virtual]
 

Deletes the choosen matrix.

Reimplemented in QSGraphicalData.

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

Restores all QObject properties. Loads all matrices

Reimplemented from QSSerializable.

Reimplemented in QSAxes.

virtual QSMatrix* QSData::matrix int    channel const [virtual]
 

Returns matrix 'channel' if any, or NULL.

Reimplemented in QSGraphicalData.

const char* QSData::objectName   const [inline]
 

The same as name()

virtual QSData* QSData::parentObject   const [inline, virtual]
 

Returns the parent object.

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

Saves all QObjects properties. Saves all matrices.

Reimplemented from QSSerializable.

Reimplemented in QSAxes.

virtual bool QSData::setMatrix int    channel,
QSMatrix   m
[virtual]
 

Sets a new matrix as the given channel in the plot.

Reimplemented in QSGraphicalData.

virtual void QSData::setObjectName const char *    name [virtual]
 

The same as setName() but emits nameChanged( const char *newName ).

void QSData::sigChildAdded QSData *    newChild [signal]
 

A new child object was added to the child list.

void QSData::sigChildListChanged   [signal]
 

sigChildAdded() + sigChildRemoved() + sigChildOrder()

void QSData::sigChildOrder   [signal]
 

Index of some child object was changed ( the list was reordered ).

void QSData::sigChildRemoved QSData *    removedChild [signal]
 

Child object is about to be removed from the list.

void QSData::sigDataChanged QSData *    thisOrChildObject,
int    channel
[signal]
 

Data has changed in this or any child object.

void QSData::sigDeleted QSData *    thisObject [signal]
 

Ups ! It is emmited from destructor of this object.

void QSData::sigNameChanged QSData *    thisOrChildObject,
const char *    name
[signal]
 

Name of this object has changed

void QSData::sigNameChanged const char *    name [signal]
 

Name of this object has changed

virtual QSMatrix* QSData::takeMatrix int    channel,
QSMatrix   newMatrix = NULL
[virtual]
 

Gives ownership of the matrix to caller and sets data to newMatrix.

Reimplemented in QSGraphicalData.


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