UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Protected Attributes | List of all members
ZqObject Class Reference

#include <zq_object.hpp>

Inheritance diagram for ZqObject:
ZqbAutoName ZqbVisible ZqbAutoName ZqbVisible ZqbName ZqbName ZqbName ZqbName ZqBBox ZqBBox ZqGrid ZqGrid ZqLayout ZqLayout ZqPolygon ZqPolygon ZqRubberBox ZqRubberBox ZqRubberLine ZqRubberLine ZqScale ZqScaledPalette ZqScaledPalette ZqScrollBar ZqScrollBar ZqTitle ZqTitle ZqView ZqView

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 QzqAreagetArea () const
 
virtual QWidget * getAreaWidget () const
 
virtual void setAreaWidget (QWidget *pWidget)
 
virtual bool isHardcopy () const
 
bool isPlaced () const
 
ZqbPlaceholdergetPlace () const
 
ZqbPixGrpMemberpx () const
 
ZqbPixGrpMemberpy () 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 QzqAreagetArea () const
 
virtual QWidget * getAreaWidget () const
 
virtual void setAreaWidget (QWidget *pWidget)
 
virtual bool isHardcopy () const
 
bool isPlaced () const
 
ZqbPlaceholdergetPlace () const
 
ZqbPixGrpMemberpx () const
 
ZqbPixGrpMemberpy () 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 ()
 
ZqbNameoperator= (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 ()
 
ZqbNameoperator= (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

ZqbPlaceholderm_pPh
 
ZqbPixGrpMemberm_pPx
 
ZqbPixGrpMemberm_pPy
 
bool m_bInteractive
 
- Protected Attributes inherited from ZqbName
char * m_szName
 
char * m_szRoot
 

Detailed Description

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.

Constructor & Destructor Documentation

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 ZqObject::~ZqObject ( )
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 ZqObject::~ZqObject ( )
virtual

Destroy the object detaching the placeholder.

Member Function Documentation

virtual bool ZqObject::attachToPlace ( ZqbPlaceholder pPh)
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 bool ZqObject::attachToPlace ( ZqbPlaceholder pPh)
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 void ZqObject::clearPlace ( )
virtual

Clear bounding box of the object. Used for refreshing view of exact object in event handlers. Don't use in redraw()!!!.

virtual void ZqObject::clearPlace ( )
virtual

Clear bounding box of the object. Used for refreshing view of exact object in event handlers. Don't use in redraw()!!!.

virtual void ZqObject::debugState ( )
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:

  • type of all objects to be printed;
  • name of an object to be printed.
virtual void ZqObject::debugState ( )
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:

  • type of all objects to be printed;
  • name of an object to be printed.
virtual bool ZqObject::detachFromPlace ( )
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 bool ZqObject::detachFromPlace ( )
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 void ZqObject::fullRedraw ( bool  bForce = false)
virtual

Call for QzqArea::redraw() method.

virtual void ZqObject::fullRedraw ( bool  bForce = false)
virtual

Call for QzqArea::redraw() method.

virtual QzqArea* ZqObject::getArea ( ) const
virtual

Return pointer to QzqArea or NULL if not available.

virtual QzqArea* ZqObject::getArea ( ) const
virtual

Return pointer to QzqArea or NULL if not available.

virtual QWidget* ZqObject::getAreaWidget ( ) const
virtual

Return pointer to Qt widget used for drawing area or NULL if it's not accessible.

Implements ZqbVisible.

virtual QWidget* ZqObject::getAreaWidget ( ) const
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 QPainter* ZqObject::getScreenPainter ( ) const
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 QPainter* ZqObject::getScreenPainter ( ) const
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 ZqbEventHint ZqObject::input ( QEvent &  event)
virtual
virtual ZqbEventHint ZqObject::input ( QEvent &  event)
virtual
virtual void ZqObject::interactiveRedraw ( )
virtual

Call for QzqArea::interactiveRedraw() method.

virtual void ZqObject::interactiveRedraw ( )
virtual

Call for QzqArea::interactiveRedraw() method.

virtual bool ZqObject::isDirty ( ) const
virtual

Return value of the redraw request flag.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual bool ZqObject::isDirty ( ) const
virtual

Return value of the redraw request flag.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual bool ZqObject::isHardcopy ( ) const
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 bool ZqObject::isHardcopy ( ) const
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 ZqbPlaceholderVector* ZqObject::placeholders ( )
virtual

Return internal list of placeholders if the object has nested structure. By default returns NULL.

Reimplemented in ZqLayout, and ZqLayout.

virtual ZqbPlaceholderVector* ZqObject::placeholders ( )
virtual

Return internal list of placeholders if the object has nested structure. By default returns NULL.

Reimplemented in ZqLayout, and ZqLayout.

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 void ZqObject::redraw ( QPainter &  paint)
virtual
virtual void ZqObject::redraw ( QPainter &  paint)
virtual
virtual void ZqObject::resetDirty ( )
virtual

Undo request for redraw.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual void ZqObject::resetDirty ( )
virtual

Undo request for redraw.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual void ZqObject::setAreaWidget ( QWidget *  pWidget)
virtual

Set pointer to Qt widget used for drawing area. NULL pointer is acceptable.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual void ZqObject::setAreaWidget ( QWidget *  pWidget)
virtual

Set pointer to Qt widget used for drawing area. NULL pointer is acceptable.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual void ZqObject::setDirty ( )
virtual

Request for redraw.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual void ZqObject::setDirty ( )
virtual

Request for redraw.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

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 void ZqObject::setScreenPainter ( QPainter *  pPainter)
virtual

In general set pointer to default graphics context (screen drawing). But this implementation is dummy - it does nothing.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual void ZqObject::setScreenPainter ( QPainter *  pPainter)
virtual

In general set pointer to default graphics context (screen drawing). But this implementation is dummy - it does nothing.

Implements ZqbVisible.

Reimplemented in ZqLayout, and ZqLayout.

virtual void ZqObject::updateGeometry ( )
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 void ZqObject::updateGeometry ( )
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 void ZqObject::updateLimits ( QPainter *  paint = NULL)
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 void ZqObject::updateLimits ( QPainter *  paint = NULL)
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.

Member Data Documentation

bool ZqObject::m_bInteractive
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.

ZqbPlaceholder * ZqObject::m_pPh
protected

Pointer to the place where object should draw itself. Maybe NULL if object does not want to receive events and draw anything.

ZqbPixGrpMember * ZqObject::m_pPx
protected

Representative pixel group members to be able to set own size hints.


The documentation for this class was generated from the following files: