#include <qscobject.h>
Inheritance diagram for QSCObject:
Public Types | |
enum | Style { Rotateable = 1U<<0, Resizeable = 1U<<1, Moveable = 1U<<2 } |
Public Slots | |
virtual void | parametersChanging () |
virtual void | parametersChanged () |
virtual void | forceUpdate () |
Signals | |
void | sigDrawEnds (QSCObject *me) |
void | sigUpdate (QSCObject *me) |
void | sigUpdate () |
Public Methods | |
QSCObject (QObject *parent=NULL) | |
virtual | ~QSCObject () |
QSCGroup * | group () const |
QSCObjectCollection * | collection () const |
QSCObjectCollection * | rootCollection () |
virtual void | setParentAxes (QSAxes *axes) |
QSAxes * | parentAxes () const |
virtual int | style () |
virtual void | setAutoUpdates (bool enabled) |
bool | autoUpdates () const |
virtual void | raise () |
virtual void | lower () |
virtual void | toFront () |
virtual void | toBack () |
virtual void | reorder (int newPosition) |
virtual void | paintSkeleton (QPainter *p, double dpi=72.0) |
virtual void | paint (QPainter *p, double dpi=72.0, bool blocking=true, bool transparent=true) |
virtual void | draw (QSDrv *drv, bool blocking=true, bool transparent=true)=0 |
virtual bool | busy () const |
virtual void | stop () |
virtual bool | isHit (const QSPt2f &p, QSDrv *drv) |
virtual void | setBox (const QSRectf &canvas_rect, QSDrv *drv) |
virtual QSRectf | box (QSDrv *drv) |
virtual void | setAngle (int deg) |
virtual int | angle () const |
virtual QSPt2f | rCenter (QSDrv *drv) |
virtual QString | name () |
virtual bool | isAxesShadow () |
void | setDefaultAxis (QSAxis *axis) |
QSAxis * | defaultAxis (int axisType) const |
QSPt3f | mixedToCanvas (const QSPt3f &pos, int xCoordIn, int yCoordIn, int zCoordIn, double dpi) |
QSPt3f | canvasToMixed (const QSPt3f &pos, int xCoordOut, int yCoordOut, int zCoordOut, double dpi) |
void | setDefaultXAxis (int axisIndex) |
void | setDefaultYAxis (int axisIndex) |
void | setDefaultZAxis (int axisIndex) |
int | defaultXAxis () const |
int | defaultYAxis () const |
int | defaultZAxis () const |
virtual void | loadStateFromStream (QDataStream &stream, QSObjectFactory *factory) |
virtual void | saveStateToStream (QDataStream &stream, QSObjectFactory *factory) |
Protected Methods | |
virtual void | setCollection (QSCObjectCollection *collection) |
virtual void | setGroup (QSCGroup *group) |
Protected Attributes | |
QSAxes * | m_parent_axes |
QSAxis * | m_default_axis [3] |
bool | m_auto_updates |
QSCObjectCollection * | m_collection |
QSCGroup * | m_group |
It can paint itself using the given painter - see paint(). Sometimes it takes much time to draw some objects such as graphs with many datapoints, so it supports drawing in the background. See paint() ( 'blocking' argument ), busy(), stop(), sigDrawEnds() methods. QSCObject is usually a member of some object collection, see collection(). It can be the main object collection of QSPage, but it can be also QSCGroup collection if object is grouped with others. In this case group() method returns a pointer to this group. QSCObject can be bound to some QSAxes object - see setParentAxes(). It is useful when, for example, QSCArrow should point at some data point in your graph. You can transform coordinates between various coordinate systems using mixedToCanvas(), canvasToMixed(). Notice that a single QSAxes object can have many coordinate systems, defined by every set of its axes. So you can choose which axes you want to use - see setDefaultXAxis(), setDefaultYAxis(), setDefaultZAxis(). OQSCObject notifies when its parameters are changing, so it needs redrawing - see sigUpdate(). Use setBox() for positioning and resizing the object.
|
Style of this object. |
|
Constructor. |
|
Destructor. Removes an object from a parent child list. |
|
Returns the current angle |
|
Returns auto-update state |
|
Return a bounding box of the object. Result rect can be unnormalized ( size can be < 0 ) Drv is used to obtains size of text labels etc. Reimplemented in QSCAxesShadow. |
|
When drawing is in background Reimplemented in QSCAxesShadow. |
|
If there are no parent axes it always maps pixlesToMM. Useful tool to use in your own objects. See QSAxes::CoordinateSystem |
|
Returns collection to which this object belongs to or NULL. If collection is not autoDelete object doesn't belong to it. |
|
Default X,Y or Z axis. |
|
Returns an index of the default axis |
|
Returns an index of the default axis |
|
Returns an index of the default axis |
|
Requests a repaint operation. If blocking is false the driver is copied using QSDrv::copy(), this function returns and drawing is performed in the background Implemented in QSCAxesShadow. |
|
Emits sigUpdate() Reimplemented in QSCAxesShadow. |
|
Returns object's parent group if it is grouped or NULL. |
|
Don't change it. It must always return 'false'. Do not reimplement this function in your own objects !. Reimplemented in QSCAxesShadow. |
|
Return true if object is hit by mouse click. Reimplemented in QSCAxesShadow. |
|
Saves all QObject properties Reimplemented from QSSerializable. Reimplemented in QSCAxesShadow. |
|
Lowers object on a parent collection stack. |
|
Maps position 'pos' to canvas ( screen ) coords. It is a simple wrapper around QSAxes::mixedToCanvas(). If there are no parent axes it always maps mmToPixels Returns a depth also. See QSAxes::CoordinateSystem |
|
Returns an object's name ( for a list of object etc. ) Reimplemented in QSCAxesShadow. |
|
Requests a repaint operation. If blocking is false the painter is copied using QSDrvQt::copyPainter(), this function returns and drawing is performed in the background Reimplemented in QSCAxesShadow. |
|
Paint simplified version of this object ( called when resizing, redrawing ). Reimplemented in QSCAxesShadow. |
|
Emits sigUpdate() |
|
Calls stop() |
|
Returns a parent axes or NULL |
|
Raises object on a parent collection stack. |
|
Return a center of a rotation. |
|
Moves object to position 'newPosition' on a parent collection stack. |
|
Returns a root group of this object It digs through all group hierarchy. It will be usually the main object collection on QSPage. |
|
Restores all QObject properties Reimplemented from QSSerializable. Reimplemented in QSCAxesShadow. |
|
Called when a new angle is set. |
|
Control whether sigParametersChnged emits sigUpdate Reimplemented in QSCAxesShadow. |
|
Resize to canvas rect. Rect can be unnormalized ( size can be < 0 ). Drv ( its dpi value ) is used to map this values to mm's, calculating sizes of text labels, etc. Reimplemented in QSCAxesShadow. |
|
Called by collection when this object is inserted or removed (collection=NULL) from its list. |
|
Sets default X,Y or Z axia. Does not emit sigUpdate. |
|
Sets the default axis. |
|
Sets the default axis. |
|
Sets the default axis. |
|
Called when object is grouped or ungrouped(group=NULL) |
|
Sets a parent axes object. Position of this object can be set as a relative to the parent object position. This function is called by QSAxes object ( or rather by its shadow QSCObject ), when this object is grouped with axes. Reimplemented in QSCAxesShadow. |
|
Parameters has changed ( the same as a signal above ). |
|
Parameters has changed |
|
Stops repainting immediately. This should be reimplemented if you allowind to repaint object in background. Reimplemented in QSCAxesShadow. |
|
Returns a bitwise-OR of Style values. Informs the parent what actions on this object are allowed. Currently not used. Reimplemented in QSCAxesShadow. |
|
Sends object to back on a parent collection stack. |
|
Brings object to front on a parent collection stack. |