#include <qsdata.h>
Inheritance diagram for QSData:
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 QSMatrix * | matrix (int channel) const |
virtual QSMatrix * | takeMatrix (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 |
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() .
|
Column type |
|
Constructor |
|
Destructor. It should delete all child object as well. |
|
Returns the total number of channels. Reimplemented in QSGraphicalData. |
|
Returns a variable name ( 'x', 'y', 'z', 'v' etc ) for use in formulas. Reimplemented in QSGriddedContour. |
|
Returns a child object Reimplemented in QSAxes. |
|
Number of child QSData objects Reimplemented in QSAxes. |
|
Returns a child index. |
|
Metadata - type of the given column. It should be reimplemented in derived classes. Used to create editors in sheet Reimplemented in QSAxis. |
|
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. |
|
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. |
|
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. |
|
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 ), |
|
Deletes the choosen matrix. Reimplemented in QSGraphicalData. |
|
Restores all QObject properties. Loads all matrices Reimplemented from QSSerializable. Reimplemented in QSAxes. |
|
Returns matrix 'channel' if any, or NULL. Reimplemented in QSGraphicalData. |
|
The same as name() |
|
Returns the parent object. |
|
Saves all QObjects properties. Saves all matrices. Reimplemented from QSSerializable. Reimplemented in QSAxes. |
|
Sets a new matrix as the given channel in the plot. Reimplemented in QSGraphicalData. |
|
The same as setName() but emits nameChanged( const char *newName ). |
|
A new child object was added to the child list. |
|
sigChildAdded() + sigChildRemoved() + sigChildOrder() |
|
Index of some child object was changed ( the list was reordered ). |
|
Child object is about to be removed from the list. |
|
Data has changed in this or any child object. |
|
Ups ! It is emmited from destructor of this object. |
|
Name of this object has changed |
|
Name of this object has changed |
|
Gives ownership of the matrix to caller and sets data to newMatrix. Reimplemented in QSGraphicalData. |