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

#include <zqb_placeholder.hpp>

Inheritance diagram for ZqbPlaceholder:
ZqbAutoName ZqbVisible ZqbContainer ZqbAutoName ZqbVisible ZqbContainer ZqbName ZqbName ZqbName ZqbName

Public Member Functions

 ZqbPlaceholder (ZqbContainer &container, ZqbPixGroup *pPGX, ZqbPixGroup *pPGY, const char *szPhName=NULL)
 
virtual ~ZqbPlaceholder ()
 
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 QWidget * getAreaWidget () const
 
virtual void setAreaWidget (QWidget *pWidget)
 
virtual QRect getRect () const
 
virtual bool addObject (ZqObject *obj)
 
virtual bool removeObject (ZqObject *obj)
 
virtual bool toFront (ZqObject *obj)
 
virtual bool toBack (ZqObject *obj)
 
virtual int setDrawOrder (const ZqbObjectArray &objects)
 
bool isPlaced () const
 
bool clipLine (int x[2], int y[2])
 
void setDirty ()
 
void resetDirty ()
 
bool isDirty () const
 
void setAutoClear (bool bAutoClear)
 
void setAutoClear (bool bAutoClear, QColor qcFillColor)
 
bool getAutoClear (QColor *qcFillColor=NULL) const
 
 ZqbPlaceholder (ZqbContainer &container, ZqbPixGroup *pPGX, ZqbPixGroup *pPGY, const char *szPhName=NULL)
 
virtual ~ZqbPlaceholder ()
 
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 QWidget * getAreaWidget () const
 
virtual void setAreaWidget (QWidget *pWidget)
 
virtual QRect getRect () const
 
virtual bool addObject (ZqObject *obj)
 
virtual bool removeObject (ZqObject *obj)
 
virtual bool toFront (ZqObject *obj)
 
virtual bool toBack (ZqObject *obj)
 
virtual int setDrawOrder (const ZqbObjectArray &objects)
 
bool isPlaced () const
 
bool clipLine (int x[2], int y[2])
 
void setDirty ()
 
void resetDirty ()
 
bool isDirty () const
 
void setAutoClear (bool bAutoClear)
 
void setAutoClear (bool bAutoClear, QColor qcFillColor)
 
bool getAutoClear (QColor *qcFillColor=NULL) const
 
- 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 bool isHardcopy () const
 
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 bool isHardcopy () const
 
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 &)
 
- Public Member Functions inherited from ZqbContainer
virtual ~ZqbContainer ()
 
virtual int numberOfObjects () const
 
virtual bool isEmpty () const
 
virtual int setDrawOrder (ZqObject *obj1,...)
 
ZqbObjectArray::iterator begin ()
 
ZqbObjectArray::iterator end ()
 
ZqbObjectArray::reverse_iterator rbegin ()
 
ZqbObjectArray::reverse_iterator rend ()
 
void addInteractiveObjects (bool bFlag, ZqbContainer &cont)
 
void redrawObjects (QPainter *paint)
 
size_t size () const
 
virtual ~ZqbContainer ()
 
virtual int numberOfObjects () const
 
virtual bool isEmpty () const
 
virtual int setDrawOrder (ZqObject *obj1,...)
 
ZqbObjectArray::iterator begin ()
 
ZqbObjectArray::iterator end ()
 
ZqbObjectArray::reverse_iterator rbegin ()
 
ZqbObjectArray::reverse_iterator rend ()
 
void addInteractiveObjects (bool bFlag, ZqbContainer &cont)
 
void redrawObjects (QPainter *paint)
 
size_t size () const
 

Public Attributes

ZqbPixGrpMember px
 
ZqbPixGrpMember py
 

Protected Attributes

ZqbContainerm_Container
 
QPainter * m_pqPainter
 
QWidget * m_pqWidget
 
ZqObjectm_pGrabber
 
bool m_bDirty
 
bool m_bAutoClear
 
QColor m_qcFillColor
 
- Protected Attributes inherited from ZqbName
char * m_szName
 
char * m_szRoot
 
- Protected Attributes inherited from ZqbContainer
ZqbObjectArray m_Objects
 

Detailed Description

Class for rectangular screen area abstraction as a location for numerous objects placed one over another.

Placeholders are managed inside some layout. Each placeholder has two pixel group memebers which refer to pixel groups in layout.

Constructor & Destructor Documentation

ZqbPlaceholder::ZqbPlaceholder ( ZqbContainer container,
ZqbPixGroup pPGX,
ZqbPixGroup pPGY,
const char *  szPhName = NULL 
)

Create placeholder with given name. If NULL pointer is passed as name an automatically generated name will be used. Reference to the external objects container and pointers to two pixel groups should be provided.

virtual ZqbPlaceholder::~ZqbPlaceholder ( )
virtual

Destroy this object.

ZqbPlaceholder::ZqbPlaceholder ( ZqbContainer container,
ZqbPixGroup pPGX,
ZqbPixGroup pPGY,
const char *  szPhName = NULL 
)

Create placeholder with given name. If NULL pointer is passed as name an automatically generated name will be used. Reference to the external objects container and pointers to two pixel groups should be provided.

virtual ZqbPlaceholder::~ZqbPlaceholder ( )
virtual

Destroy this object.

Member Function Documentation

virtual bool ZqbPlaceholder::addObject ( ZqObject obj)
virtual

Insert new object on the top of previous objects and return true. If object already added to this container or to another one lets do nothing and return false.

Reimplemented from ZqbContainer.

virtual bool ZqbPlaceholder::addObject ( ZqObject obj)
virtual

Insert new object on the top of previous objects and return true. If object already added to this container or to another one lets do nothing and return false.

Reimplemented from ZqbContainer.

bool ZqbPlaceholder::clipLine ( int  x[2],
int  y[2] 
)

Clip given line segment by bounding rectangle of the placeholder. Clipped coordinates of the line segment are returned instead of input coordinates. Returns true if final line segment is inside place rectangle at least partially and false if line segment is outside the place rectangle. If geometry of the place is unknown then return false.

bool ZqbPlaceholder::clipLine ( int  x[2],
int  y[2] 
)

Clip given line segment by bounding rectangle of the placeholder. Clipped coordinates of the line segment are returned instead of input coordinates. Returns true if final line segment is inside place rectangle at least partially and false if line segment is outside the place rectangle. If geometry of the place is unknown then return false.

virtual QWidget* ZqbPlaceholder::getAreaWidget ( ) const
virtual

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

Implements ZqbVisible.

virtual QWidget* ZqbPlaceholder::getAreaWidget ( ) const
virtual

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

Implements ZqbVisible.

bool ZqbPlaceholder::getAutoClear ( QColor *  qcFillColor = NULL) const

Get value of clear flag and optinally get fill color.

bool ZqbPlaceholder::getAutoClear ( QColor *  qcFillColor = NULL) const

Get value of clear flag and optinally get fill color.

virtual QRect ZqbPlaceholder::getRect ( ) const
virtual

Return bounding box of the placeholder.

virtual QRect ZqbPlaceholder::getRect ( ) const
virtual

Return bounding box of the placeholder.

virtual QPainter* ZqbPlaceholder::getScreenPainter ( ) const
virtual

Return pointer to default graphics context (screen drawing) or NULL if it's not accessible.

Implements ZqbVisible.

virtual QPainter* ZqbPlaceholder::getScreenPainter ( ) const
virtual

Return pointer to default graphics context (screen drawing) or NULL if it's not accessible.

Implements ZqbVisible.

virtual ZqbEventHint ZqbPlaceholder::input ( QEvent &  event)
virtual

General event processing method.

Implements ZqbVisible.

virtual ZqbEventHint ZqbPlaceholder::input ( QEvent &  event)
virtual

General event processing method.

Implements ZqbVisible.

bool ZqbPlaceholder::isDirty ( ) const
virtual

Return value of the redraw request flag.

Implements ZqbVisible.

bool ZqbPlaceholder::isDirty ( ) const
virtual

Return value of the redraw request flag.

Implements ZqbVisible.

bool ZqbPlaceholder::isPlaced ( ) const

Returns true if both pixel groups are placed and false otherwise.

bool ZqbPlaceholder::isPlaced ( ) const

Returns true if both pixel groups are placed and false otherwise.

virtual void ZqbPlaceholder::redraw ( QPainter &  paint)
virtual

General drawing method.

Implements ZqbVisible.

virtual void ZqbPlaceholder::redraw ( QPainter &  paint)
virtual

General drawing method.

Implements ZqbVisible.

virtual bool ZqbPlaceholder::removeObject ( ZqObject obj)
virtual

Remove object from container and return true. If object is not found in this container lets do nothing and return false.

Reimplemented from ZqbContainer.

virtual bool ZqbPlaceholder::removeObject ( ZqObject obj)
virtual

Remove object from container and return true. If object is not found in this container lets do nothing and return false.

Reimplemented from ZqbContainer.

void ZqbPlaceholder::resetDirty ( )
virtual

Undo request for redraw.

Implements ZqbVisible.

void ZqbPlaceholder::resetDirty ( )
virtual

Undo request for redraw.

Implements ZqbVisible.

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

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

Implements ZqbVisible.

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

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

Implements ZqbVisible.

void ZqbPlaceholder::setAutoClear ( bool  bAutoClear)

Set clear flag to exact value. It does not touch filling color.

void ZqbPlaceholder::setAutoClear ( bool  bAutoClear)

Set clear flag to exact value. It does not touch filling color.

void ZqbPlaceholder::setAutoClear ( bool  bAutoClear,
QColor  qcFillColor 
)

Set clear flag to exact value and provide filling color.

void ZqbPlaceholder::setAutoClear ( bool  bAutoClear,
QColor  qcFillColor 
)

Set clear flag to exact value and provide filling color.

void ZqbPlaceholder::setDirty ( )
virtual

Request to redraw all objects in this placeholder.

Implements ZqbVisible.

void ZqbPlaceholder::setDirty ( )
virtual

Request to redraw all objects in this placeholder.

Implements ZqbVisible.

virtual int ZqbPlaceholder::setDrawOrder ( const ZqbObjectArray objects)
virtual

Place listed objects in given order of drawing. The first listed object will be drawn the first, the last one will be drawn the last atop of other objects. Returns number of objects actually found in the container.

Reimplemented from ZqbContainer.

virtual int ZqbPlaceholder::setDrawOrder ( const ZqbObjectArray objects)
virtual

Place listed objects in given order of drawing. The first listed object will be drawn the first, the last one will be drawn the last atop of other objects. Returns number of objects actually found in the container.

Reimplemented from ZqbContainer.

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

Set pointer to default graphics context (screen drawing). NULL pointer is acceptable.

Implements ZqbVisible.

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

Set pointer to default graphics context (screen drawing). NULL pointer is acceptable.

Implements ZqbVisible.

virtual bool ZqbPlaceholder::toBack ( ZqObject obj)
virtual

Move the object under other objects and return true. If object is not found in this container then do nothing and return false.

Reimplemented from ZqbContainer.

virtual bool ZqbPlaceholder::toBack ( ZqObject obj)
virtual

Move the object under other objects and return true. If object is not found in this container then do nothing and return false.

Reimplemented from ZqbContainer.

virtual bool ZqbPlaceholder::toFront ( ZqObject obj)
virtual

Move the object atop of other objects and return true. If object is not found in this container then do nothing and return false.

Reimplemented from ZqbContainer.

virtual bool ZqbPlaceholder::toFront ( ZqObject obj)
virtual

Move the object atop of other objects and return true. If object is not found in this container then do nothing and return false.

Reimplemented from ZqbContainer.

virtual void ZqbPlaceholder::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.

Implements ZqbVisible.

virtual void ZqbPlaceholder::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.

Implements ZqbVisible.

virtual void ZqbPlaceholder::updateLimits ( QPainter *  paint = NULL)
virtual

General method to recalculate own size limitations and all children objects. In case the painter isn't a NULL it should be used for device specific sizes such as QFontMetrics.

Implements ZqbVisible.

virtual void ZqbPlaceholder::updateLimits ( QPainter *  paint = NULL)
virtual

General method to recalculate own size limitations and all children objects. In case the painter isn't a NULL it should be used for device specific sizes such as QFontMetrics.

Implements ZqbVisible.

Member Data Documentation

bool ZqbPlaceholder::m_bAutoClear
protected

Auto-clear flag value. It's off (false) by default. The flag is used for fast redrawing of one placeholder only without rest area.

bool ZqbPlaceholder::m_bDirty
protected

Flag is set to true when the placeholder should be redrawn.

ZqbContainer & ZqbPlaceholder::m_Container
protected

External collection of objects.

ZqObject * ZqbPlaceholder::m_pGrabber
protected

Pointer to object who grabs the inpout or NULL if noone grab the input.

QPainter * ZqbPlaceholder::m_pqPainter
protected

External default graphics context (screen drawing).

QWidget * ZqbPlaceholder::m_pqWidget
protected

External widget used as common parent for all Qt objects inside Zq area.

QColor ZqbPlaceholder::m_qcFillColor
protected

Color used to auto-clear feature.

ZqbPixGrpMember ZqbPlaceholder::px

1D geometry along X axis of the screen.

ZqbPixGrpMember ZqbPlaceholder::py

1D geometry along Y axis of the screen.


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