UNIVERS
15.3
UNIVERS base processing software API
|
#include <zq_object.hpp>
Public Member Functions | |
ZqObject (const char *szName=NULL) | |
ZqObject (ZqbPlaceholder *pPh, const char *szName=NULL) | |
virtual | ~ZqObject () |
virtual void | debugState () |
virtual void | clearPlace () |
virtual ZqbPlaceholderVector * | placeholders () |
virtual void | redraw (QPainter &paint) |
virtual ZqbEventHint | input (QEvent &event) |
virtual void | updateLimits (QPainter *paint=NULL) |
virtual void | updateGeometry () |
virtual QPainter * | getScreenPainter () const |
virtual void | setScreenPainter (QPainter *pPainter) |
virtual QzqArea * | getArea () const |
virtual QWidget * | getAreaWidget () const |
virtual void | setAreaWidget (QWidget *pWidget) |
virtual bool | isHardcopy () const |
bool | isPlaced () const |
ZqbPlaceholder * | getPlace () const |
ZqbPixGrpMember * | px () const |
ZqbPixGrpMember * | py () const |
bool | getRect (QRect &rect) const |
virtual bool | attachToPlace (ZqbPlaceholder *pPh) |
virtual bool | detachFromPlace () |
virtual void | setDirty () |
virtual void | resetDirty () |
virtual bool | isDirty () const |
void | setInteractive (bool bInteractive) |
bool | isInteractive () const |
virtual void | fullRedraw (bool bForce=false) |
virtual void | interactiveRedraw () |
ZqObject (const char *szName=NULL) | |
ZqObject (ZqbPlaceholder *pPh, const char *szName=NULL) | |
virtual | ~ZqObject () |
virtual void | debugState () |
virtual void | clearPlace () |
virtual ZqbPlaceholderVector * | placeholders () |
virtual void | redraw (QPainter &paint) |
virtual ZqbEventHint | input (QEvent &event) |
virtual void | updateLimits (QPainter *paint=NULL) |
virtual void | updateGeometry () |
virtual QPainter * | getScreenPainter () const |
virtual void | setScreenPainter (QPainter *pPainter) |
virtual QzqArea * | getArea () const |
virtual QWidget * | getAreaWidget () const |
virtual void | setAreaWidget (QWidget *pWidget) |
virtual bool | isHardcopy () const |
bool | isPlaced () const |
ZqbPlaceholder * | getPlace () const |
ZqbPixGrpMember * | px () const |
ZqbPixGrpMember * | py () const |
bool | getRect (QRect &rect) const |
virtual bool | attachToPlace (ZqbPlaceholder *pPh) |
virtual bool | detachFromPlace () |
virtual void | setDirty () |
virtual void | resetDirty () |
virtual bool | isDirty () const |
void | setInteractive (bool bInteractive) |
bool | isInteractive () const |
virtual void | fullRedraw (bool bForce=false) |
virtual void | interactiveRedraw () |
Public Member Functions inherited from ZqbAutoName | |
ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL) | |
virtual | ~ZqbAutoName () |
ZqbAutoName (int *pCounter, const char *szRoot, const char *szCustomName=NULL) | |
virtual | ~ZqbAutoName () |
Public Member Functions inherited from ZqbName | |
ZqbName (const char *szRoot, const char *szCustomName=NULL) | |
ZqbName (const ZqbName &name) | |
virtual | ~ZqbName () |
ZqbName & | operator= (const ZqbName &name) |
virtual const char * | getName () const |
virtual const char * | getType () const |
bool | hasName (const char *szString) const |
ZqbName (const char *szRoot, const char *szCustomName=NULL) | |
ZqbName (const ZqbName &name) | |
virtual | ~ZqbName () |
ZqbName & | operator= (const ZqbName &name) |
virtual const char * | getName () const |
virtual const char * | getType () const |
bool | hasName (const char *szString) const |
Public Member Functions inherited from ZqbVisible | |
ZqbVisible (bool bDrawable=false, bool bInputable=false, bool bTipable=false) | |
virtual | ~ZqbVisible () |
virtual bool | isDrawable () const |
virtual void | setDrawable (bool bFlag) |
virtual void | redraw () |
virtual void | setTipable (bool bFlag) |
virtual bool | isTipable () const |
virtual bool | tip (const QPoint &p, QString &qsShort, QString &qsLong) |
virtual bool | isInputable () const |
virtual void | setInputable (bool bFlag) |
virtual bool | getRect (QRect &) |
virtual bool | setRect (const QRect &) |
ZqbVisible (bool bDrawable=false, bool bInputable=false, bool bTipable=false) | |
virtual | ~ZqbVisible () |
virtual bool | isDrawable () const |
virtual void | setDrawable (bool bFlag) |
virtual void | redraw () |
virtual void | setTipable (bool bFlag) |
virtual bool | isTipable () const |
virtual bool | tip (const QPoint &p, QString &qsShort, QString &qsLong) |
virtual bool | isInputable () const |
virtual void | setInputable (bool bFlag) |
virtual bool | getRect (QRect &) |
virtual bool | setRect (const QRect &) |
Protected Attributes | |
ZqbPlaceholder * | m_pPh |
ZqbPixGrpMember * | m_pPx |
ZqbPixGrpMember * | m_pPy |
bool | m_bInteractive |
Protected Attributes inherited from ZqbName | |
char * | m_szName |
char * | m_szRoot |
Basic functionality of every Zqools application specific object should inherit this one.
The first, ZqObject is a member of two pixel groups which defines this geometry on the screen. This memebership is implemented by using external object ZqbPlaceholder.
The second, ZqObject is visible object, so it can draw itself, process events and manage own internal geometry.
The third, ZqObject should have name. Automatically generated name is a good choice for usability, so each derivation of ZqObject should provide own root name for autonaming.
The fourth, a subclass of ZqObject may be a member of several natural groups, which provides transparent capability for synchronization between curves, seismic fields, scales, grids, scrollbars, zoom etc.
ZqObject::ZqObject | ( | const char * | szName = NULL | ) |
Create object which is not attached to placeholder. Placeholder may be attached later.
ZqObject::ZqObject | ( | ZqbPlaceholder * | pPh, |
const char * | szName = NULL |
||
) |
Create object attached to given placeholder from the birth. It can be detached at any moment and be attached to another place.
|
virtual |
Destroy the object detaching the placeholder.
ZqObject::ZqObject | ( | const char * | szName = NULL | ) |
Create object which is not attached to placeholder. Placeholder may be attached later.
ZqObject::ZqObject | ( | ZqbPlaceholder * | pPh, |
const char * | szName = NULL |
||
) |
Create object attached to given placeholder from the birth. It can be detached at any moment and be attached to another place.
|
virtual |
Destroy the object detaching the placeholder.
|
virtual |
Attach to the placeholder and return true. If the object is already attached to some placeholder returns false.
Reimplemented in ZqLayout, ZqLayout, ZqScrollBar, ZqScrollBar, ZqLithColumn, ZqLithColumn, ZqRubberBox, and ZqRubberLine.
|
virtual |
Attach to the placeholder and return true. If the object is already attached to some placeholder returns false.
Reimplemented in ZqLayout, ZqLayout, ZqScrollBar, ZqScrollBar, ZqLithColumn, ZqLithColumn, ZqRubberBox, and ZqRubberLine.
|
virtual |
Clear bounding box of the object. Used for refreshing view of exact object in event handlers. Don't use in redraw()!!!.
|
virtual |
Clear bounding box of the object. Used for refreshing view of exact object in event handlers. Don't use in redraw()!!!.
|
virtual |
Debugging facility: printing state of the object. Environment variable ZQ_DEBUG is used. It can contain ALL or list of comma/semicolon values. In case of ALL every object in redraw cycle will be printed (type, name, flags, pixel coordinates). Each value in the list may be:
|
virtual |
Debugging facility: printing state of the object. Environment variable ZQ_DEBUG is used. It can contain ALL or list of comma/semicolon values. In case of ALL every object in redraw cycle will be printed (type, name, flags, pixel coordinates). Each value in the list may be:
|
virtual |
Detach from the placeholder and return true. If the object is not attached returns false.
Reimplemented in ZqLayout, ZqLayout, ZqScrollBar, ZqScrollBar, ZqRubberBox, and ZqRubberLine.
|
virtual |
Detach from the placeholder and return true. If the object is not attached returns false.
Reimplemented in ZqLayout, ZqLayout, ZqScrollBar, ZqScrollBar, ZqRubberBox, and ZqRubberLine.
|
virtual |
Call for QzqArea::redraw() method.
|
virtual |
Call for QzqArea::redraw() method.
|
virtual |
Return pointer to QzqArea or NULL if not available.
|
virtual |
Return pointer to QzqArea or NULL if not available.
|
virtual |
Return pointer to Qt widget used for drawing area or NULL if it's not accessible.
Implements ZqbVisible.
|
virtual |
Return pointer to Qt widget used for drawing area or NULL if it's not accessible.
Implements ZqbVisible.
ZqbPlaceholder* ZqObject::getPlace | ( | ) | const |
Return pointer to attached placeholder or NULL if the object is not attached.
ZqbPlaceholder* ZqObject::getPlace | ( | ) | const |
Return pointer to attached placeholder or NULL if the object is not attached.
bool ZqObject::getRect | ( | QRect & | rect | ) | const |
Return the position and the size of the object if it's placed.
bool ZqObject::getRect | ( | QRect & | rect | ) | const |
Return the position and the size of the object if it's placed.
|
virtual |
Return pointer to default graphics context (screen drawing) or NULL if it's not accessible. Actually, returns screen painter of current placeholder or NULL if it's not attached to place.
Implements ZqbVisible.
|
virtual |
Return pointer to default graphics context (screen drawing) or NULL if it's not accessible. Actually, returns screen painter of current placeholder or NULL if it's not attached to place.
Implements ZqbVisible.
|
virtual |
General event processing method.
Implements ZqbVisible.
Reimplemented in ZqCoordMarker, ZqCoordMarker, ZqZoom, ZqZoom, ZqScaledPalette, ZqScaledPalette, ZqRubberBox, ZqPolygon, ZqPolygon, ZqRubberLine, ZqRubberBox, ZqRubberLine, ZqLayout, and ZqLayout.
|
virtual |
General event processing method.
Implements ZqbVisible.
Reimplemented in ZqCoordMarker, ZqCoordMarker, ZqZoom, ZqZoom, ZqScaledPalette, ZqScaledPalette, ZqRubberBox, ZqPolygon, ZqPolygon, ZqRubberLine, ZqRubberBox, ZqRubberLine, ZqLayout, and ZqLayout.
|
virtual |
Call for QzqArea::interactiveRedraw() method.
|
virtual |
Call for QzqArea::interactiveRedraw() method.
|
virtual |
Return value of the redraw request flag.
Implements ZqbVisible.
|
virtual |
Return value of the redraw request flag.
Implements ZqbVisible.
|
virtual |
Return true if the object should be drawn to produce hardcopy (that is, painter is some external device or pixmap prepared for output). Return false in case of normal screen painting.
Reimplemented from ZqbVisible.
|
virtual |
Return true if the object should be drawn to produce hardcopy (that is, painter is some external device or pixmap prepared for output). Return false in case of normal screen painting.
Reimplemented from ZqbVisible.
bool ZqObject::isInteractive | ( | ) | const |
Get flag of interactive drawing.
bool ZqObject::isInteractive | ( | ) | const |
Get flag of interactive drawing.
bool ZqObject::isPlaced | ( | ) | const |
Returns true if both pixel groups are placed and false otherwise.
bool ZqObject::isPlaced | ( | ) | const |
Returns true if both pixel groups are placed and false otherwise.
|
virtual |
|
virtual |
ZqbPixGrpMember* ZqObject::px | ( | ) | const |
Return representative pixel group member for horizontal dimention or NULL if the object is not attached to placeholder.
ZqbPixGrpMember* ZqObject::px | ( | ) | const |
Return representative pixel group member for horizontal dimention or NULL if the object is not attached to placeholder.
ZqbPixGrpMember* ZqObject::py | ( | ) | const |
Return representative pixel group member for vertical dimention or NULL if the object is not attached to placeholder.
ZqbPixGrpMember* ZqObject::py | ( | ) | const |
Return representative pixel group member for vertical dimention or NULL if the object is not attached to placeholder.
|
virtual |
General drawing method.
Implements ZqbVisible.
Reimplemented in ZqSeismicView, ZqSeismicView, ZqCurve, ZqCurve, ZqSeismicTrace, ZqSeismicTrace, ZqLithColumn, ZqSurface, ZqLithColumn, ZqSurface, ZqCoordMarker, ZqScale, ZqCoordMarker, ZqScale, ZqTitle, ZqTitle, ZqPolygon, ZqPolygon, ZqCustomScale, ZqScaledPalette, ZqScaledPalette, ZqRubberLine, ZqGrid, ZqGrid, ZqBBox, ZqBBox, ZqRubberLine, ZqScrollBar, ZqScrollBar, ZqLayout, and ZqLayout.
|
virtual |
General drawing method.
Implements ZqbVisible.
Reimplemented in ZqSeismicView, ZqSeismicView, ZqCurve, ZqCurve, ZqSeismicTrace, ZqSeismicTrace, ZqLithColumn, ZqSurface, ZqLithColumn, ZqSurface, ZqCoordMarker, ZqScale, ZqCoordMarker, ZqScale, ZqTitle, ZqTitle, ZqPolygon, ZqPolygon, ZqCustomScale, ZqScaledPalette, ZqScaledPalette, ZqRubberLine, ZqGrid, ZqGrid, ZqBBox, ZqBBox, ZqRubberLine, ZqScrollBar, ZqScrollBar, ZqLayout, and ZqLayout.
|
virtual |
|
virtual |
|
virtual |
Set pointer to Qt widget used for drawing area. NULL pointer is acceptable.
Implements ZqbVisible.
|
virtual |
Set pointer to Qt widget used for drawing area. NULL pointer is acceptable.
Implements ZqbVisible.
|
virtual |
|
virtual |
void ZqObject::setInteractive | ( | bool | bInteractive | ) |
Set flag of interactive drawing to given value.
void ZqObject::setInteractive | ( | bool | bInteractive | ) |
Set flag of interactive drawing to given value.
|
virtual |
In general set pointer to default graphics context (screen drawing). But this implementation is dummy - it does nothing.
Implements ZqbVisible.
|
virtual |
In general set pointer to default graphics context (screen drawing). But this implementation is dummy - it does nothing.
Implements ZqbVisible.
|
virtual |
General method to recalculate geometry of children objects (if any) because it's called when own geometry of the object is already calculated and assigned via pixel groups membership. For application specific objects this method should be empty.
Implements ZqbVisible.
Reimplemented in ZqScrollBar, ZqScrollBar, ZqLayout, and ZqLayout.
|
virtual |
General method to recalculate geometry of children objects (if any) because it's called when own geometry of the object is already calculated and assigned via pixel groups membership. For application specific objects this method should be empty.
Implements ZqbVisible.
Reimplemented in ZqScrollBar, ZqScrollBar, ZqLayout, and ZqLayout.
|
virtual |
General method to recalculate size limitations of the object. This method is called before updateGeometry() in top-level redraw(). Optionally a painter may be passed as an argument. In case of painter it should be used for device specific sizes. Otherwise, default (usually, screen) settings are used (such as QFontMetrics).
Implements ZqbVisible.
Reimplemented in ZqScale, ZqScale, ZqTitle, ZqTitle, ZqScaledPalette, ZqScaledPalette, ZqLayout, and ZqLayout.
|
virtual |
General method to recalculate size limitations of the object. This method is called before updateGeometry() in top-level redraw(). Optionally a painter may be passed as an argument. In case of painter it should be used for device specific sizes. Otherwise, default (usually, screen) settings are used (such as QFontMetrics).
Implements ZqbVisible.
Reimplemented in ZqScale, ZqScale, ZqTitle, ZqTitle, ZqScaledPalette, ZqScaledPalette, ZqLayout, and ZqLayout.
|
protected |
Flag of interactive drawing. Allows to mark some objects as dynamically redrawn in opposition to all other. Such objects should not be cached in pixmap. The rest objects may be cached since they are suggested as constant during interactive operations.
|
protected |
Pointer to the place where object should draw itself. Maybe NULL if object does not want to receive events and draw anything.
|
protected |
Representative pixel group members to be able to set own size hints.