UNIVERS
15.3
UNIVERS base processing software API
|
#include <zq_scale.hpp>
Public Types | |
enum | Placement { Undefined, TopSide, BottomSide, LeftSide, RightSide, Undefined, TopSide, BottomSide, LeftSide, RightSide } |
enum | AxisDecor { Standard = 0x0000, NoSubticks = 0x0001, NoTicks = 0x0002, NoLabels = 0x0004, Standard = 0x0000, NoSubticks = 0x0001, NoTicks = 0x0002, NoLabels = 0x0004 } |
enum | Placement { Undefined, TopSide, BottomSide, LeftSide, RightSide, Undefined, TopSide, BottomSide, LeftSide, RightSide } |
enum | AxisDecor { Standard = 0x0000, NoSubticks = 0x0001, NoTicks = 0x0002, NoLabels = 0x0004, Standard = 0x0000, NoSubticks = 0x0001, NoTicks = 0x0002, NoLabels = 0x0004 } |
Public Member Functions | |
ZqScale (ZqbNatGroup &rNatAxis, const char *szName=NULL) | |
ZqScale (ZqbNatGroup &rNatAxis, 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 | setPlacement (Placement ePlacement) |
virtual Placement | getPlacement () const |
virtual void | setIntegerTicks (bool bFlag) |
virtual bool | isIntegerTicks () const |
virtual void | setAxisDecor (int mMode) |
virtual int | getAxisDecor () const |
virtual void | redraw (QPainter &paint) |
virtual void | updateLimits (QPainter *paint=NULL) |
virtual void | onSetCoords () |
virtual QString | prepareLabel (double fCoord) |
virtual void | prepareTicks (ZqbNatGroup::Ticks &ticks) |
virtual bool | insideRect (QPoint p) |
bool | isRect (QPoint p) |
ZqScale (ZqbNatGroup &rNatAxis, const char *szName=NULL) | |
ZqScale (ZqbNatGroup &rNatAxis, 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 | setPlacement (Placement ePlacement) |
virtual Placement | getPlacement () const |
virtual void | setIntegerTicks (bool bFlag) |
virtual bool | isIntegerTicks () const |
virtual void | setAxisDecor (int mMode) |
virtual int | getAxisDecor () const |
virtual void | redraw (QPainter &paint) |
virtual void | updateLimits (QPainter *paint=NULL) |
virtual void | onSetCoords () |
virtual QString | prepareLabel (double fCoord) |
virtual void | prepareTicks (ZqbNatGroup::Ticks &ticks) |
virtual bool | insideRect (QPoint p) |
bool | isRect (QPoint p) |
virtual bool | compatibleDoc (const ZdDocument *pDoc) const |
Public Member Functions inherited from ZqView | |
ZqView (const char *szName=NULL) | |
ZqView (ZqbPlaceholder *pPh, const char *szName=NULL) | |
virtual void | updateView () |
virtual void | attachDoc (ZdDocument *pData) |
virtual void | detachDoc () |
ZqView (const char *szName=NULL) | |
ZqView (ZqbPlaceholder *pPh, const char *szName=NULL) | |
virtual void | updateView () |
virtual void | attachDoc (ZdDocument *pData) |
virtual void | detachDoc () |
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 QzqArea * | getArea () const |
virtual QWidget * | getAreaWidget () const |
virtual void | setAreaWidget (QWidget *pWidget) |
virtual bool | isHardcopy () const |
bool | isPlaced () const |
ZqbPlaceholder * | getPlace () const |
ZqbPixGrpMember * | px () const |
ZqbPixGrpMember * | py () 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 QzqArea * | getArea () const |
virtual QWidget * | getAreaWidget () const |
virtual void | setAreaWidget (QWidget *pWidget) |
virtual bool | isHardcopy () const |
bool | isPlaced () const |
ZqbPlaceholder * | getPlace () const |
ZqbPixGrpMember * | px () const |
ZqbPixGrpMember * | py () 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 () |
ZqbName & | operator= (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 () |
ZqbName & | operator= (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 &) |
Public Member Functions inherited from ZqbView | |
ZqbView (const char *szName=NULL) | |
virtual | ~ZqbView () |
virtual ZdDocument * | doc () |
virtual void | updateDoc () |
ZqbView (const char *szName=NULL) | |
virtual | ~ZqbView () |
virtual ZdDocument * | doc () |
virtual void | updateDoc () |
Public Member Functions inherited from ZqbNatGrpMember | |
ZqbNatGrpMember (ZqbNatGroup *pNatGroup) | |
ZqbNatGrpMember (ZqbNatGroup *pNatGroup, void(*CustomOnSetCoord)(void *), void *pUserData=NULL) | |
virtual | ~ZqbNatGrpMember () |
virtual ZqbNatGroup & | group () const |
virtual void | unsetBounds () |
virtual void | setBounds (double b[2]) |
void | setBounds (double b1, double b2) |
virtual bool | getBounds (double b[2]=NULL) const |
virtual void | onTickChange () |
ZqbNatGrpMember (ZqbNatGroup *pNatGroup) | |
ZqbNatGrpMember (ZqbNatGroup *pNatGroup, void(*CustomOnSetCoord)(void *), void *pUserData=NULL) | |
virtual | ~ZqbNatGrpMember () |
virtual ZqbNatGroup & | group () const |
virtual void | unsetBounds () |
virtual void | setBounds (double b[2]) |
void | setBounds (double b1, double b2) |
virtual bool | getBounds (double b[2]=NULL) const |
Static Public Attributes | |
static int | s_iMainTickSize |
static int | s_iSecTickSize |
static int | s_iLabelOffset |
static int | s_iBetweenLabels |
Protected Member Functions | |
void | adjustSizeLimits (QPainter &paint) |
virtual void | adjustSizeLimits (QPainter &paint) |
Protected Attributes | |
QPen | m_qPen |
QFont | m_qFont |
Placement | m_ePlacement |
bool | m_bIntegerLabels |
int | m_mAxisDecor |
Protected Attributes inherited from ZqObject | |
ZqbPlaceholder * | m_pPh |
ZqbPixGrpMember * | m_pPx |
ZqbPixGrpMember * | m_pPy |
bool | m_bInteractive |
Protected Attributes inherited from ZqbName | |
char * | m_szName |
char * | m_szRoot |
Protected Attributes inherited from ZqbNatGrpMember | |
ZqbNatGroup * | m_pNatGroup |
bool | m_bKnownBounds |
double | m_fBounds [2] |
void(* | m_pCustomOnSetCoord )(void *pUserData) |
void * | m_pUserData |
Additional Inherited Members | |
Static Public Member Functions inherited from ZqbView | |
static bool | findTypeAmong (const ZdDocument *pDoc, const char *szExpectedType1,...) |
static bool | findTypeAmong (const ZdDocument *pDoc, const char *szExpectedType1,...) |
Object for scale drawing.
enum ZqScale::AxisDecor |
Axis decoration variants.
enum ZqScale::AxisDecor |
Axis decoration variants.
enum ZqScale::Placement |
Placement of the scale which defines its drawing orientation (horizontal or vertical) and axis and text alignment.
enum ZqScale::Placement |
Placement of the scale which defines its drawing orientation (horizontal or vertical) and axis and text alignment.
ZqScale::ZqScale | ( | ZqbNatGroup & | rNatAxis, |
const char * | szName = NULL |
||
) |
Create scale object without placeholder. Natural coordinates group is provided.
ZqScale::ZqScale | ( | ZqbNatGroup & | rNatAxis, |
ZqbPlaceholder * | pPh, | ||
const char * | szName = NULL |
||
) |
Create scale object at given place. Natural coordinates group is provided.
ZqScale::ZqScale | ( | ZqbNatGroup & | rNatAxis, |
const char * | szName = NULL |
||
) |
Create scale object without placeholder. Natural coordinates group is provided.
ZqScale::ZqScale | ( | ZqbNatGroup & | rNatAxis, |
ZqbPlaceholder * | pPh, | ||
const char * | szName = NULL |
||
) |
Create scale object at given place. Natural coordinates group is provided.
|
protected |
Adjust limitations of the scale according to current painter device settings.
|
protectedvirtual |
Adjust limitations of the scale according to current painter device settings.
Reimplemented in ZqCustomScale.
|
virtual |
Return true if passed object is in list of compatible documents for this view. Usual implemention is handy to implement using findTypeAmong():
Implements ZqbView.
Reimplemented in ZqCustomScale.
|
virtual |
Access font used for label drawing on main ticks.
|
virtual |
Access font used for label drawing on main ticks.
|
virtual |
Return current mode of axis decoration.
|
virtual |
Return current mode of axis decoration.
|
virtual |
Get font used for label drawing on main ticks.
|
virtual |
Get font used for label drawing on main ticks.
|
virtual |
Get pen used for scale drawing.
|
virtual |
Get pen used for scale drawing.
|
virtual |
Get placement of the scale.
|
virtual |
Get placement of the scale.
|
virtual |
Check for the point belongs to this rectangle.
|
virtual |
Check for the point belongs to this rectangle.
|
virtual |
Return flag of integer numbers used for ticks.
|
virtual |
Return flag of integer numbers used for ticks.
|
virtual |
Be warned about coordinate changes to adjust size of scale according to current natural coordinates.
Reimplemented from ZqbNatGrpMember.
|
virtual |
Be warned about coordinate changes to adjust size of scale according to current natural coordinates.
Reimplemented from ZqbNatGrpMember.
|
virtual |
Access pen used for scale drawing.
|
virtual |
Access pen used for scale drawing.
|
virtual |
Prepare string with label for given tick coordinate. May be reimplemented to obtain another format or other effects. To avoid drawing label just return empty string.
|
virtual |
Prepare string with label for given tick coordinate. May be reimplemented to obtain another format or other effects. To avoid drawing label just return empty string.
|
virtual |
Prepare array of ticks for drawing including subdivision ticks.
|
virtual |
Prepare array of ticks for drawing including subdivision ticks.
|
virtual |
|
virtual |
|
virtual |
Set axis decoration mode composed of ORed AxisDecor values.
|
virtual |
Set axis decoration mode composed of ORed AxisDecor values.
|
virtual |
Set font for label drawing on main ticks.
|
virtual |
Set font for label drawing on main ticks.
|
virtual |
Set flag of integer numbers used for ticks. It allows to prevent #####.0 when it's known for sure that ticks are integer.
Set flag of integer numbers used for ticks. It allows to prevent
|
virtual |
Set flag of integer numbers used for ticks. It allows to prevent #####.0 when it's known for sure that ticks are integer.
|
virtual |
Set pen for scale drawing. Default pen color is black.
|
virtual |
Set pen for scale drawing. Default pen color is black.
|
virtual |
Set placement of the scale relative to the target placeholder.
|
virtual |
Set placement of the scale relative to the target placeholder.
|
virtual |
Adjust size of scale according to current font settings.
Reimplemented from ZqObject.
|
virtual |
Adjust size of scale according to current font settings.
Reimplemented from ZqObject.
|
protected |
Flag of integer numbers used for tick labels. false by default.
|
protected |
Placement defines the kind of scale to draw. Top and bottom locations define horizontal scale; left and right - vertical.
|
protected |
Mask of decoration mode of the axis drawing. Standard by default.
|
protected |
Stored font used for label drawing on main ticks.
|
protected |
Stored pen used for drawing scale.
|
static |
Some visual properties which can be changed not very frequently