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

#include <zq_title.hpp>

Inheritance diagram for ZqTitle:
ZqObject ZqObject ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName ZqbVisible ZqbAutoName

Public Types

enum  Alignment {
  AlignCenter, AlignNorth, AlignSouth, AlignWest,
  AlignEast, AlignNorthWest, AlignNorthEast, AlignSouthWest,
  AlignSouthEast, AlignCenter, AlignNorth, AlignSouth,
  AlignWest, AlignEast, AlignNorthWest, AlignNorthEast,
  AlignSouthWest, AlignSouthEast
}
 
enum  Alignment {
  AlignCenter, AlignNorth, AlignSouth, AlignWest,
  AlignEast, AlignNorthWest, AlignNorthEast, AlignSouthWest,
  AlignSouthEast, AlignCenter, AlignNorth, AlignSouth,
  AlignWest, AlignEast, AlignNorthWest, AlignNorthEast,
  AlignSouthWest, AlignSouthEast
}
 

Public Member Functions

 ZqTitle (const char *szName=NULL)
 
 ZqTitle (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual void setPen (const QPen &pen)
 
virtual const QPen & getPen () const
 
virtual QPen & pen ()
 
virtual void setFont (const QFont &font)
 
virtual const QFont & getFont () const
 
virtual QFont & font ()
 
virtual void setText (const QString &text)
 
virtual const QString & getText () const
 
virtual QString & text ()
 
virtual void setAlignment (Alignment align)
 
virtual Alignment getAlignment () const
 
virtual void fitTextHeight (bool bFit=true)
 
virtual void fitTextWidth (bool bFit=true)
 
virtual void redraw (QPainter &paint)
 
virtual void updateLimits (QPainter *paint=NULL)
 
 ZqTitle (const char *szName=NULL)
 
 ZqTitle (ZqbPlaceholder *pPh, const char *szName=NULL)
 
virtual void setPen (const QPen &pen)
 
virtual const QPen & getPen () const
 
virtual QPen & pen ()
 
virtual void setFont (const QFont &font)
 
virtual const QFont & getFont () const
 
virtual QFont & font ()
 
virtual void setText (const QString &text)
 
virtual const QString & getText () const
 
virtual QString & text ()
 
virtual void setAlignment (Alignment align)
 
virtual Alignment getAlignment () const
 
virtual void setOrientation (Qt::Orientation orientation)
 
Qt::Orientation getOrientation () const
 
virtual void fitTextHeight (bool bFit=true)
 
virtual void fitTextWidth (bool bFit=true)
 
virtual void redraw (QPainter &paint)
 
virtual void updateLimits (QPainter *paint=NULL)
 
- 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 ZqbEventHint input (QEvent &event)
 
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 ZqbEventHint input (QEvent &event)
 
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 Member Functions

void calcSize (QSize &box, QPainter *paint=NULL)
 
void calcSize (QSize &box, QPainter *paint=NULL)
 

Protected Attributes

QPen m_qPen
 
QFont m_qFont
 
QString m_qText
 
Alignment m_eTextAlign
 
bool m_bFitHeight
 
bool m_bFitWidth
 
Qt::Orientation m_eOrientation
 
- 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

Simple object which draws title text label in own placeholder.

test_zq_title_2.png

Member Enumeration Documentation

Title text alignment in the bounding box

Title text alignment in the bounding box

Constructor & Destructor Documentation

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

Create title object without placeholder.

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

Create title object at given place.

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

Create title object without placeholder.

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

Create title object at given place.

Member Function Documentation

void ZqTitle::calcSize ( QSize &  box,
QPainter *  paint = NULL 
)
protected

Calculate minimum allowed size elapsed by current text in current font. If painter is not set (NULL) then font metric for screen is used.

void ZqTitle::calcSize ( QSize &  box,
QPainter *  paint = NULL 
)
protected

Calculate minimum allowed size elapsed by current text in current font. If painter is not set (NULL) then font metric for screen is used.

INLINE void ZqTitle::fitTextHeight ( bool  bFit = true)
virtual

Fit height of the object to height of title text.

virtual void ZqTitle::fitTextHeight ( bool  bFit = true)
virtual

Fit height of the object to height of title text.

INLINE void ZqTitle::fitTextWidth ( bool  bFit = true)
virtual

Fit width of the object to width of title text.

virtual void ZqTitle::fitTextWidth ( bool  bFit = true)
virtual

Fit width of the object to width of title text.

virtual QFont& ZqTitle::font ( )
virtual

Access font used for title text drawing.

INLINE QFont & ZqTitle::font ( )
virtual

Access font used for title text drawing.

INLINE ZqTitle::Alignment ZqTitle::getAlignment ( ) const
virtual

Get title text alignment.

virtual Alignment ZqTitle::getAlignment ( ) const
virtual

Get title text alignment.

virtual const QFont& ZqTitle::getFont ( ) const
virtual

Get font used for title text drawing.

INLINE const QFont & ZqTitle::getFont ( ) const
virtual

Get font used for title text drawing.

virtual const QPen& ZqTitle::getPen ( ) const
virtual

Get pen used for title text drawing.

INLINE const QPen & ZqTitle::getPen ( ) const
virtual

Get pen used for title text drawing.

INLINE const QString & ZqTitle::getText ( ) const
virtual

Get text to draw.

virtual const QString& ZqTitle::getText ( ) const
virtual

Get text to draw.

virtual QPen& ZqTitle::pen ( )
virtual

Access pen used for title text drawing.

INLINE QPen & ZqTitle::pen ( )
virtual

Access pen used for title text drawing.

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

Draw title text.

Reimplemented from ZqObject.

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

Draw title text.

Reimplemented from ZqObject.

INLINE void ZqTitle::setAlignment ( Alignment  align)
virtual

Set title text alignment.

virtual void ZqTitle::setAlignment ( Alignment  align)
virtual

Set title text alignment.

INLINE void ZqTitle::setFont ( const QFont &  font)
virtual

Set font for title text drawing.

virtual void ZqTitle::setFont ( const QFont &  font)
virtual

Set font for title text drawing.

virtual void ZqTitle::setPen ( const QPen &  pen)
virtual

Set pen for title text drawing. Default pen color is black.

INLINE void ZqTitle::setPen ( const QPen &  pen)
virtual

Set pen for title text drawing. Default pen color is black.

INLINE void ZqTitle::setText ( const QString &  text)
virtual

Set text to draw. Default text is an empty string "".

virtual void ZqTitle::setText ( const QString &  text)
virtual

Set text to draw. Default text is an empty string "".

virtual QString& ZqTitle::text ( )
virtual

Access text drawn as a title.

INLINE QString & ZqTitle::text ( )
virtual

Access text drawn as a title.

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

Recalculate min.size limitations for title text bounding box using current values for text and font and optionally device specific information about font metrics.

Reimplemented from ZqObject.

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

Recalculate min.size limitations for title text bounding box using current values for text and font and optionally device specific information about font metrics.

Reimplemented from ZqObject.

Member Data Documentation

bool ZqTitle::m_bFitHeight
protected

Flag to turn on fitting height of object's bounding box to the height of the title text.

bool ZqTitle::m_bFitWidth
protected

Flag to turn on fitting width of object's bounding box to the width of the title text.

Qt::Orientation ZqTitle::m_eOrientation
protected

Orientation of the title.

Alignment ZqTitle::m_eTextAlign
protected

Stored title text alignment.

QFont ZqTitle::m_qFont
protected

Stored font used for drawing title text.

QPen ZqTitle::m_qPen
protected

Stored pen used for drawing title text.

QString ZqTitle::m_qText
protected

Stored text to draw as title.


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