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
ZqRubberLine Class Reference

#include <zq_rubberline.hpp>

Inheritance diagram for ZqRubberLine:
ZqObject ZqObject ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName

Public Types

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

Public Member Functions

 ZqRubberLine (const char *szName=NULL)
 
 ZqRubberLine (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 redraw (QPainter &paint)
 
virtual ZqbEventHint input (QEvent &event)
 
virtual void setInputable (bool bFlag)
 
virtual void line (QRect r)
 
 ZqRubberLine (const char *szName=NULL)
 
 ZqRubberLine (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual ~ZqRubberLine ()
 
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 redraw (QPainter &paint)
 
virtual ZqbEventHint input (QEvent &event)
 
virtual void setInputable (bool bFlag)
 
virtual void line (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 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 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 drawRubberLine (const QRect &p)
 
void drawRubberLine (const QRect &p)
 
void hideRubberLine ()
 

Protected Attributes

bool m_bDrawn
 
QRect m_qLine
 
QPoint m_qCurrent
 
QPoint m_qStart
 
int m_iThickness
 
int m_mMode
 
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 line drawing.

Member Enumeration Documentation

Enumerated values for range selection mode.

Enumerator
Vertical 

1D vertical coordinate range selection.

Horizontal 

1D horizontal coordinate range selection.

Vertical 

1D vertical coordinate range selection.

Horizontal 

1D horizontal coordinate range selection.

Enumerated values for range selection mode.

Enumerator
Vertical 

1D vertical coordinate range selection.

Horizontal 

1D horizontal coordinate range selection.

Vertical 

1D vertical coordinate range selection.

Horizontal 

1D horizontal coordinate range selection.

Constructor & Destructor Documentation

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

Create rubber line object without placeholder.

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

Create rubber line object at given place.

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

Create rubber line object without placeholder.

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

Create rubber line object at given place.

virtual ZqRubberLine::~ZqRubberLine ( )
virtual

Destroy rubber line.

Member Function Documentation

virtual bool ZqRubberLine::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 bool ZqRubberLine::detachFromPlace ( )
virtual

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

Reimplemented from ZqObject.

void ZqRubberLine::drawRubberLine ( const QRect &  p)
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 ZqRubberLine::drawRubberLine ( const QRect &  p)
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 ZqRubberLine::getRangeMode ( ) const
virtual

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

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

virtual int ZqRubberLine::getRangeMode ( ) const
virtual

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

INLINE int ZqRubberLine::getThickness ( ) const
virtual

Get thickness of the rectangle lines.

virtual int ZqRubberLine::getThickness ( ) const
virtual

Get thickness of the rectangle lines.

void ZqRubberLine::hideRubberLine ( )
protected

Erasing of drawn rubber line.

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

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

Reimplemented from ZqObject.

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

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

Reimplemented from ZqObject.

virtual void ZqRubberLine::line ( QRect  r)
virtual

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

virtual void ZqRubberLine::line ( QRect  r)
virtual

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

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

Just to mark line as not drawn.

Reimplemented from ZqObject.

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

Just to mark line as not drawn.

Reimplemented from ZqObject.

virtual void ZqRubberLine::setInputable ( bool  bFlag)
virtual

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

Reimplemented from ZqbVisible.

virtual void ZqRubberLine::setInputable ( bool  bFlag)
virtual

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

Reimplemented from ZqbVisible.

INLINE void ZqRubberLine::setRangeMode ( int  mMode)
virtual

Set mode of rubber line selection: vertical 1D range or horizontal 1D range. ORed flags are welcome.

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

virtual void ZqRubberLine::setRangeMode ( int  mMode)
virtual

Set mode of rubber line selection: vertical 1D range or horizontal 1D range. ORed flags are welcome.

INLINE void ZqRubberLine::setThickness ( int  iThickness)
virtual

Set thickness of the rectangle lines.

virtual void ZqRubberLine::setThickness ( int  iThickness)
virtual

Set thickness of the rectangle lines.

Member Data Documentation

bool ZqRubberLine::m_bDrawn
protected

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

int ZqRubberLine::m_iThickness
protected

Thickness of lines used for rectangle drawing.

int ZqRubberLine::m_mMode
protected

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

QRect ZqRubberLine::m_qLine
protected

Current line coordinates.

QRubberBand* ZqRubberLine::m_qRB
protected

Rubber band to draw.


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