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

#include <zq_rubberbox.hpp>

Inheritance diagram for ZqRubberBox:
ZqObject ZqObject ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName ZqZoom ZqZoom

Public Types

enum  RangeMode {
  Vertical = 0x01, Horizontal = 0x02, Rectangle = 0x03, Vertical = 0x01,
  Horizontal = 0x02, Rectangle = 0x03
}
 
enum  RangeMode {
  Vertical = 0x01, Horizontal = 0x02, Rectangle = 0x03, Vertical = 0x01,
  Horizontal = 0x02, Rectangle = 0x03
}
 

Public Member Functions

 ZqRubberBox (const char *szName=NULL)
 
 ZqRubberBox (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual void setThickness (int iThickness)
 
virtual int getThickness () const
 
virtual void setRangeMode (int mMode)
 
virtual int getRangeMode () const
 
virtual void setSensExtWidth (int iWidth)
 
virtual int getSensExtWidth () const
 
virtual ZqbEventHint input (QEvent &event)
 
virtual void setInputable (bool bFlag)
 
virtual void box (QRect r)
 
virtual void click (QRect r)
 
 ZqRubberBox (const char *szName=NULL)
 
 ZqRubberBox (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual ~ZqRubberBox ()
 
virtual bool attachToPlace (ZqbPlaceholder *pPh)
 
virtual bool detachFromPlace ()
 
virtual void setThickness (int iThickness)
 
virtual int getThickness () const
 
virtual void setRangeMode (int mMode)
 
virtual int getRangeMode () const
 
virtual void setSensExtWidth (int iWidth)
 
virtual int getSensExtWidth () const
 
virtual ZqbEventHint input (QEvent &event)
 
virtual void setInputable (bool bFlag)
 
virtual void box (QRect r)
 
virtual void click (QRect r)
 
- Public Member Functions inherited from ZqObject
 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 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 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 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 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 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 bool getRect (QRect &)
 
virtual bool setRect (const QRect &)
 

Protected Member Functions

void drawRubberRect (const QRect &r)
 
void drawRubberRect (const QRect &r)
 
void updateRubberRect (const QRect &r)
 
void hideRubberRect ()
 

Protected Attributes

bool m_bDrawn
 
QRect m_qRect
 
QPoint m_qCurrent
 
QPoint m_qStart
 
int m_iThickness
 
int m_mMode
 
int m_iExtWidth
 
QRubberBand * m_qRB
 
- Protected Attributes inherited from ZqObject
ZqbPlaceholderm_pPh
 
ZqbPixGrpMemberm_pPx
 
ZqbPixGrpMemberm_pPy
 
bool m_bInteractive
 
- Protected Attributes inherited from ZqbName
char * m_szName
 
char * m_szRoot
 

Detailed Description

Class for interactive rubber rectangle drawing.

Member Enumeration Documentation

Enumerated values for range selection mode.

Enumerator
Vertical 

1D vertical coordinate range selection.

Horizontal 

1D horizontal coordinate range selection.

Rectangle 

2D both coordinates range selection. It's equal to Vertical+Horizontal. This is the default mode.

Vertical 

1D vertical coordinate range selection.

Horizontal 

1D horizontal coordinate range selection.

Rectangle 

2D both coordinates range selection. It's equal to Vertical+Horizontal. This is the default mode.

Enumerated values for range selection mode.

Enumerator
Vertical 

1D vertical coordinate range selection.

Horizontal 

1D horizontal coordinate range selection.

Rectangle 

2D both coordinates range selection. It's equal to Vertical+Horizontal. This is the default mode.

Vertical 

1D vertical coordinate range selection.

Horizontal 

1D horizontal coordinate range selection.

Rectangle 

2D both coordinates range selection. It's equal to Vertical+Horizontal. This is the default mode.

Constructor & Destructor Documentation

ZqRubberBox::ZqRubberBox ( const char *  szName = NULL)

Create rubber box object without placeholder.

ZqRubberBox::ZqRubberBox ( ZqbPlaceholder pPh,
const char *  szName = NULL 
)

Create rubber box object at given place.

ZqRubberBox::ZqRubberBox ( const char *  szName = NULL)

Create rubber box object without placeholder.

ZqRubberBox::ZqRubberBox ( ZqbPlaceholder pPh,
const char *  szName = NULL 
)

Create rubber box object at given place.

virtual ZqRubberBox::~ZqRubberBox ( )
virtual

Destroy rubber box.

Member Function Documentation

virtual bool ZqRubberBox::attachToPlace ( ZqbPlaceholder pPh)
virtual

Attach to the placeholder and return true. If the object is already attached to some placeholder returns false.

Reimplemented from ZqObject.

virtual void ZqRubberBox::box ( QRect  r)
virtual

The method is called when rectangle selection is finished. By default it does nothing.

Reimplemented in ZqZoom, and ZqZoom.

virtual void ZqRubberBox::box ( QRect  r)
virtual

The method is called when rectangle selection is finished. By default it does nothing.

Reimplemented in ZqZoom, and ZqZoom.

virtual void ZqRubberBox::click ( QRect  r)
virtual

The method is called when rectangle selection is finished but the rectangle is too small, so, it seems a click was made by mistake. By default it does nothing.

Reimplemented in ZqZoom, and ZqZoom.

virtual void ZqRubberBox::click ( QRect  r)
virtual

The method is called when rectangle selection is finished but the rectangle is too small, so, it seems a click was made by mistake. By default it does nothing.

Reimplemented in ZqZoom, and ZqZoom.

virtual bool ZqRubberBox::detachFromPlace ( )
virtual

Detach from the placeholder and return true. If the object is not attached returns false.

Reimplemented from ZqObject.

void ZqRubberBox::drawRubberRect ( const QRect &  r)
protected

Drawing the rectangle using current coordinates of the placeholder, default screen painter and custom thickness. The method does not change or analyze m_bDrawn flag.

void ZqRubberBox::drawRubberRect ( const QRect &  r)
protected

Drawing the rectangle using current coordinates of the placeholder, default screen painter and custom thickness. The method does not change or analyze m_bDrawn flag.

INLINE int ZqRubberBox::getRangeMode ( ) const
virtual

Get mode of rubber rectangle selection. ORed mask of flags is returned.

virtual int ZqRubberBox::getRangeMode ( ) const
virtual

Get mode of rubber rectangle selection. ORed mask of flags is returned.

INLINE int ZqRubberBox::getSensExtWidth ( ) const
virtual

Get sensitive area extension width in pixels.

virtual int ZqRubberBox::getSensExtWidth ( ) const
virtual

Get sensitive area extension width in pixels.

INLINE int ZqRubberBox::getThickness ( ) const
virtual

Get thickness of the rectangle lines.

virtual int ZqRubberBox::getThickness ( ) const
virtual

Get thickness of the rectangle lines.

void ZqRubberBox::hideRubberRect ( )
protected

Hiding the rectangle if it was drawn.

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

Mouse press/move/release events are processed to obtain target rectangle.

Reimplemented from ZqObject.

Reimplemented in ZqZoom, and ZqZoom.

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

Mouse press/move/release events are processed to obtain target rectangle.

Reimplemented from ZqObject.

Reimplemented in ZqZoom, and ZqZoom.

virtual void ZqRubberBox::setInputable ( bool  bFlag)
virtual

Remove rubber rectangle on-the-fly if the object is said to become not inputable.

Reimplemented from ZqbVisible.

virtual void ZqRubberBox::setInputable ( bool  bFlag)
virtual

Remove rubber rectangle on-the-fly if the object is said to become not inputable.

Reimplemented from ZqbVisible.

INLINE void ZqRubberBox::setRangeMode ( int  mMode)
virtual

Set mode of rubber rectangle selection: vertical 1D range, horizontal 1D range or 2D range to select. ORed flags are welcome.

virtual void ZqRubberBox::setRangeMode ( int  mMode)
virtual

Set mode of rubber rectangle selection: vertical 1D range, horizontal 1D range or 2D range to select. ORed flags are welcome.

INLINE void ZqRubberBox::setSensExtWidth ( int  iWidth)
virtual

Set sensitive area extension width in pixels.

virtual void ZqRubberBox::setSensExtWidth ( int  iWidth)
virtual

Set sensitive area extension width in pixels.

INLINE void ZqRubberBox::setThickness ( int  iThickness)
virtual

Set thickness of the rectangle lines.

virtual void ZqRubberBox::setThickness ( int  iThickness)
virtual

Set thickness of the rectangle lines.

Member Data Documentation

bool ZqRubberBox::m_bDrawn
protected

Flag of drawn rectangle. Since XorROP is used for drawing then drawn twice means erased.

int ZqRubberBox::m_iExtWidth
protected

Width of the band around placement rectangle used for input events sensitive area enlargement.

int ZqRubberBox::m_iThickness
protected

Thickness of lines used for rectangle drawing.

int ZqRubberBox::m_mMode
protected

Range mode selection. ORed mask of flags mentioned in enum RangeMode.

QRubberBand* ZqRubberBox::m_qRB
protected

Rubber band to draw.

QRect ZqRubberBox::m_qRect
protected

Current rectangle coordinates.


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