CDPBaseTickMarks Class
The CDPBaseTickMarks is inherited by widgets that use ticks to show values. More...
Header: | #include <CDPBaseWidgets/CDPBaseTickMarks.h> |
Inherits: | CDPBaseWidget |
Inherited By: |
Public Types
enum | MajorTickMethod { SpecifyNumber, SpecifyInterval } |
enum | NumPos { NoNumbers, NumbersShow, NumbersAutoRight, NumbersAutoLeft } |
enum | NumPrecision { AutoLimited, AutoNoLimit, Fixed } |
enum | TickPos { NoTicks, TicksAbove, TicksLeft, TicksBelow, TicksRight, TicksBothSides } |
Properties
- 6 properties inherited from CDPBaseWidget
Public Functions
CDPBaseTickMarks(QWidget *parent = 0) | |
int | GetNumFontHeight() |
virtual double | alarmMaxValue(TickMarksGenerator::AlarmLevel level, bool indicatorRight = false) |
virtual double | alarmMinValue(TickMarksGenerator::AlarmLevel level, bool indicatorRight = false) |
virtual QString | cdpMaxValueRouting() |
virtual QString | cdpMinValueRouting() |
virtual QString | cdpValueMaxErrorRouting() |
virtual QString | cdpValueMaxNormalRouting() |
virtual QString | cdpValueMaxWarningHighRouting() |
virtual QString | cdpValueMaxWarningRouting() |
virtual QColor | errorColor() |
virtual NumPos | getNumPos() const |
virtual NumPrecision | getPrecisionMethod() |
virtual TickPos | getTickPos() const |
virtual bool | invertAxis() |
virtual void | loadPixmaps(bool skipSVG = false) |
virtual int | majorTickLength() const |
virtual MajorTickMethod | majorTickMethod() |
virtual int | majorTickWidth() |
virtual double | majorTicks() |
int | maxNumberWidth() const |
virtual double | maxValue() |
virtual double | minValue() |
virtual int | minorTickLength() |
virtual int | minorTickWidth() |
virtual int | minorTicks() |
virtual QColor | normalColor() |
virtual QColor | numColor() |
virtual const QFont & | numFont() |
virtual QString | numPostfix() const |
virtual bool | numRotate() |
virtual int | numberToTickSpacing() const |
virtual int | precision() |
virtual bool | separateIndicatorsRight() |
virtual void | setAlarmMaxValue(double value, TickMarksGenerator::AlarmLevel level, bool indicatorRight = false) |
virtual void | setAlarmMinValue(double value, TickMarksGenerator::AlarmLevel level, bool indicatorRight = false) |
virtual void | setErrorColor(QColor color) |
virtual void | setInvertAxis(bool invert) |
virtual void | setMajorTickLength(int value) |
virtual void | setMajorTickMethod(MajorTickMethod method) |
virtual void | setMajorTickWidth(int width) |
virtual void | setMajorTicks(double ticks) |
virtual void | setMinorTickLength(int value) |
virtual void | setMinorTickWidth(int width) |
virtual void | setMinorTicks(int ticks) |
virtual void | setNormalColor(QColor color) |
virtual void | setNumColor(const QColor &color) |
virtual void | setNumFont(const QFont &font) |
virtual void | setNumPos(NumPos pos) |
virtual void | setNumPostfix(QString postfix) |
virtual void | setNumRotate(bool rotate) |
virtual void | setNumberToTickSpacing(int value) |
virtual void | setPrecision(int value) |
virtual void | setPrecisionMethod(NumPrecision value) |
virtual void | setSeparateIndicatorsRight(bool indicatorRight) |
virtual void | setShowAlarms(bool show) |
virtual void | setTickColor(const QColor &color) |
virtual void | setTickPos(TickPos pos) |
virtual void | setTickShow(bool show) |
virtual void | setValueMaxErrorRight(double value) |
virtual void | setValueMaxNormalRight(double value) |
virtual void | setValueMaxWarningHighRight(double value) |
virtual void | setValueMaxWarningRight(double value) |
virtual void | setValueMinErrorRight(double value) |
virtual void | setValueMinNormalRight(double value) |
virtual void | setValueMinWarningHighRight(double value) |
virtual void | setValueMinWarningRight(double value) |
virtual void | setWarningColor(QColor color) |
virtual void | setWarningHighColor(QColor color) |
virtual bool | showAlarms() |
virtual QColor | tickColor() |
virtual bool | tickShow() const |
virtual double | valueMaxError() |
virtual double | valueMaxErrorRight() |
virtual double | valueMaxNormal() |
virtual double | valueMaxNormalRight() |
virtual double | valueMaxWarning() |
virtual double | valueMaxWarningHigh() |
virtual double | valueMaxWarningHighRight() |
virtual double | valueMaxWarningRight() |
virtual double | valueMinError() |
virtual double | valueMinErrorRight() |
virtual double | valueMinNormal() |
virtual double | valueMinNormalRight() |
virtual double | valueMinWarning() |
virtual double | valueMinWarningHigh() |
virtual double | valueMinWarningHighRight() |
virtual double | valueMinWarningRight() |
virtual QColor | warningColor() |
virtual QColor | warningHighColor() |
Reimplemented Public Functions
virtual void | setWidgetFont(const QString &font) |
- 8 public functions inherited from CDPBaseWidget
- 4 public functions inherited from CDPBaseControlVisible
Public Slots
void | setCdpMaxValueRouting(QString routing) |
void | setCdpMinValueRouting(QString routing) |
void | setCdpValueMaxErrorRouting(QString routing) |
void | setCdpValueMaxNormalRouting(QString routing) |
void | setCdpValueMaxWarningHighRouting(QString routing) |
void | setCdpValueMaxWarningRouting(QString routing) |
virtual void | setMaxValue(double value) |
virtual void | setMinValue(double value) |
virtual void | setValueMaxError(double value) |
virtual void | setValueMaxNormal(double value) |
virtual void | setValueMaxWarning(double value) |
virtual void | setValueMaxWarningHigh(double value) |
virtual void | setValueMinError(double value) |
virtual void | setValueMinNormal(double value) |
virtual void | setValueMinWarning(double value) |
virtual void | setValueMinWarningHigh(double value) |
- 10 public slots inherited from CDPBaseWidget
Additional Inherited Members
- 1 signal inherited from CDPBaseWidget
- 1 protected function inherited from CDPBaseControlVisible
Detailed Description
The CDPBaseTickMarks is inherited by widgets that use ticks to show values.
This is not a plugin widget for stand-alone use, but a widget that provides certain functionality for the widgets that inherit from it.
Member Type Documentation
enum CDPBaseTickMarks::MajorTickMethod
This enum type specifies the major tick method:
Constant | Value | Description |
---|---|---|
CDPBaseTickMarks::SpecifyNumber | 0 | Major ticks are read as number of ticks. |
CDPBaseTickMarks::SpecifyInterval | 1 | Major ticks are read as tick interval. |
enum CDPBaseTickMarks::NumPos
This enum type specifies the number position:
Constant | Value | Description |
---|---|---|
CDPBaseTickMarks::NoNumbers | 0 | Disable numbering (on major ticks). |
CDPBaseTickMarks::NumbersShow | 1 | Show numbers. |
CDPBaseTickMarks::NumbersAutoRight | 2 | Enable numbers at tick pos (right if ticks on both sides) |
CDPBaseTickMarks::NumbersAutoLeft | 3 | Enable numbers at tick pos (left if ticks on both sides). |
enum CDPBaseTickMarks::NumPrecision
This enum type specifies number precision methods:
Constant | Value | Description |
---|---|---|
CDPBaseTickMarks::AutoLimited | 0 | Auto selects precision limited by precision. |
CDPBaseTickMarks::AutoNoLimit | 1 | Ignores specified precision and goes fully auto. |
CDPBaseTickMarks::Fixed | 2 | Uses the specified precision. |
enum CDPBaseTickMarks::TickPos
This enum type specifies the position of ticks:
Constant | Value | Description |
---|---|---|
CDPBaseTickMarks::NoTicks | 0 | Do not use ticks. |
CDPBaseTickMarks::TicksAbove | 1 | Place ticks above the main element. |
CDPBaseTickMarks::TicksLeft | TicksAbove | Place ticks to the left of the main element. |
CDPBaseTickMarks::TicksBelow | 2 | Place ticks below the main element. |
CDPBaseTickMarks::TicksRight | TicksBelow | Place ticks to th eright of the main element. |
CDPBaseTickMarks::TicksBothSides | 3 | Place ticks on both sides of the main element. |
Property Documentation
ErrorColor : QColor
This property holds the color for values in the high error range.
Access functions:
virtual QColor | errorColor() |
virtual void | setErrorColor(QColor color) |
See also NormalColor, WarningColor, and WarningHighColor.
NormalColor : QColor
This property holds the color for values in the normal range.
Access functions:
virtual QColor | normalColor() |
virtual void | setNormalColor(QColor color) |
See also WarningColor, WarningHighColor, and ErrorColor.
WarningColor : QColor
This property holds the color for values in the warning range.
Access functions:
virtual QColor | warningColor() |
virtual void | setWarningColor(QColor color) |
See also NormalColor, WarningHighColor, and ErrorColor.
WarningHighColor : QColor
This property holds the color for values in the high warning range.
Access functions:
virtual QColor | warningHighColor() |
virtual void | setWarningHighColor(QColor color) |
See also NormalColor, WarningColor, and ErrorColor.
alarmIndicatorsRight : bool
This property holds whether to have different alarm idication values on the right side if tickPos is set to "TicksBothSides".
With this option enabled it is possible to set separate alarm indication ranges to the right side ticks.
Access functions:
virtual bool | separateIndicatorsRight() |
virtual void | setSeparateIndicatorsRight(bool indicatorRight) |
alarmShow : bool
This property holds whether to display alarm indication colors on ticks.
Access functions:
virtual bool | showAlarms() |
virtual void | setShowAlarms(bool show) |
See also NormalColor, WarningColor, WarningHighColor, and ErrorColor.
axisInvert : bool
This property holds whether to invert the range or not.
Access functions:
virtual bool | invertAxis() |
virtual void | setInvertAxis(bool invert) |
cdpMaxValueRouting : QString
This property holds the path to the signal that controls maxValue (if wanted).
Access functions:
virtual QString | cdpMaxValueRouting() |
void | setCdpMaxValueRouting(QString routing) |
See also maxValue.
cdpMinValueRouting : QString
This property holds the path to the signal that controls minValue (if wanted).
Access functions:
virtual QString | cdpMinValueRouting() |
void | setCdpMinValueRouting(QString routing) |
See also minValue.
cdpValueMaxErrorRouting : QString
This property holds the path to the signal that controls valueMaxError (if wanted).
Access functions:
virtual QString | cdpValueMaxErrorRouting() |
void | setCdpValueMaxErrorRouting(QString routing) |
See also ErrorColor, valueMinError, and valueMaxError.
cdpValueMaxNormalRouting : QString
This property holds the path to the signal that controls valueMaxNormal (if wanted).
Access functions:
virtual QString | cdpValueMaxNormalRouting() |
void | setCdpValueMaxNormalRouting(QString routing) |
See also NormalColor, valueMinNormal, and valueMaxNormal.
cdpValueMaxWarningHighRouting : QString
This property holds the path to the signal that controls valueMaxWarningHigh (if wanted).
Access functions:
virtual QString | cdpValueMaxWarningHighRouting() |
void | setCdpValueMaxWarningHighRouting(QString routing) |
See also WarningHighColor, valueMinWarningHigh, and valueMaxWarningHigh.
cdpValueMaxWarningRouting : QString
This property holds the path to the signal that controls valueMaxWarning (if wanted).
Access functions:
virtual QString | cdpValueMaxWarningRouting() |
void | setCdpValueMaxWarningRouting(QString routing) |
See also WarningColor, valueMinWarning, and valueMaxWarning.
majorTickLength : int
This property holds the visual length of major ticks.
Access functions:
virtual int | majorTickLength() const |
virtual void | setMajorTickLength(int value) |
See also minorTickLength and majorTickWidth.
majorTickMethod : MajorTickMethod
This property holds the method of defining major ticks.
Options are: "SpecifyNumber" (places a concrete number of major ticks on the scale) "SpecifyInterval" (specifies the interval between every pair of consecutive major ticks)
Access functions:
virtual MajorTickMethod | majorTickMethod() |
virtual void | setMajorTickMethod(MajorTickMethod method) |
See also majorTicks.
majorTickWidth : int
This property holds the visual width of major ticks.
Access functions:
virtual int | majorTickWidth() |
virtual void | setMajorTickWidth(int width) |
See also majorTickLength and minorTickWidth.
majorTicks : double
This property holds how many major ticks to place on the scale dependant on majorTickMethod.
If majorTickMethod is set to "SpecifyNumber" then majorTicks specifies how many major ticks are placed within the range of the scale. If majorTickMethod is set to "SpecifyInterval" then majorTicks specifies the interval between each pair of consecutive major ticks.
Access functions:
virtual double | majorTicks() |
virtual void | setMajorTicks(double ticks) |
See also majorTickMethod.
maxValue : double
This property holds the end of the range to show.
Access functions:
virtual double | maxValue() |
virtual void | setMaxValue(double value) |
See also minValue and cdpMaxValueRouting.
minValue : double
This property holds the start of the range to show.
Access functions:
virtual double | minValue() |
virtual void | setMinValue(double value) |
See also maxValue.
minorTickLength : int
This property holds the visual length of minor ticks.
Access functions:
virtual int | minorTickLength() |
virtual void | setMinorTickLength(int value) |
See also majorTickLength and minorTickWidth.
minorTickWidth : int
This property holds the visual width of minor ticks.
Access functions:
virtual int | minorTickWidth() |
virtual void | setMinorTickWidth(int width) |
See also minorTickLength and majorTickWidth.
minorTicks : int
This property holds how many minor ticks to place between major ticks.
Access functions:
virtual int | minorTicks() |
virtual void | setMinorTicks(int ticks) |
See also majorTicks.
numColor : QColor
This property holds the color of the numbers.
Access functions:
virtual QColor | numColor() |
virtual void | setNumColor(const QColor &color) |
See also numFont.
numFont : QFont
This property holds the font of the numbers.
Access functions:
virtual const QFont & | numFont() |
virtual void | setNumFont(const QFont &font) |
See also numColor.
numPos : NumPos
This property holds the position of the lable numbers.
Options are: "NoNumbers" (Don't show numbers) "NumbersShow" (Always show numbers on tick side. If ticks are on both sides, then show numbers on both sides. If there are no ticks are shown on right side by default.) "NumbersAutoRight" (Enable numbers at tick position but prefers right if ticks are on both sides) "NumbersAutoLeft" (Enable numbers at tick position but prefers left if ticks are on both sides)
Note: Number position is always calculated from the edges of the widget.
Access functions:
virtual NumPos | getNumPos() const |
virtual void | setNumPos(NumPos pos) |
numPostfix : QString
This property holds the string that is appended to the number.
Access functions:
virtual QString | numPostfix() const |
virtual void | setNumPostfix(QString postfix) |
numPrecision : int
This property holds the number of decimal places to show.
Access functions:
virtual int | precision() |
virtual void | setPrecision(int value) |
See also numPrecisionMethod.
numPrecisionMethod : NumPrecision
This property holds the number precision method.
Options are: "AutoLimited" (Auto selects precision limited by numPrecision) "AutoNoLimit" (Auto selects precision) "Fixed" (Uses the precision specified by numPrecision)
Access functions:
virtual NumPrecision | getPrecisionMethod() |
virtual void | setPrecisionMethod(NumPrecision value) |
See also numPrecision.
numRotate : bool
This property holds whether to rotate the numbers by 90° or not.
Access functions:
virtual bool | numRotate() |
virtual void | setNumRotate(bool rotate) |
numTickOffset : int
This property holds the distance between numbers and ticks in pixels.
Access functions:
virtual int | numberToTickSpacing() const |
virtual void | setNumberToTickSpacing(int value) |
See also numPos.
tickColor : QColor
This property holds the color of the ticks.
Access functions:
virtual QColor | tickColor() |
virtual void | setTickColor(const QColor &color) |
tickPos : TickPos
This property holds the tick position.
Options are: "NoTicks" (No ticks are shown) "TicksAbove" (If widget is horizontal, then ticks are placed above the indicator, if the widget is vertical, then ticks are placed to the left of the indicator) "TicksLeft"(Same as "TicksAbove") "TicksBelow"(If widget is horizontal, then ticks are placed below the indicator, if the widget is vertical, then ticks are placed to the right of the indicator) "TicksRight"(Same as "TicksBelow") "TicksBothSides"(Ticks are placed to both sides of the indicator)
Access functions:
virtual TickPos | getTickPos() const |
virtual void | setTickPos(TickPos pos) |
tickShow : bool
This property holds whether to display tick marks or not.
Access functions:
virtual bool | tickShow() const |
virtual void | setTickShow(bool show) |
valueMaxError : double
This property holds the highest value that is considered to be in the error range.
Access functions:
virtual double | valueMaxError() |
virtual void | setValueMaxError(double value) |
See also valueMinError, cdpValueMaxErrorRouting, and ErrorColor.
valueMaxErrorRight : double
This property holds the highest value that is considered to be in the error range for the right side.
Note: tickPos has to be set to "TicksBothSides" for this to take effect.
Access functions:
virtual double | valueMaxErrorRight() |
virtual void | setValueMaxErrorRight(double value) |
See also ErrorColor.
valueMaxNormal : double
This property holds the highest value that is considered to be in the normal range.
Access functions:
virtual double | valueMaxNormal() |
virtual void | setValueMaxNormal(double value) |
See also valueMinNormal, cdpValueMaxNormalRouting, and NormalColor.
valueMaxNormalRight : double
This property holds the highest value that is considered to be in the normal range for the right side.
Note: tickPos has to be set to "TicksBothSides" for this to take effect.
Access functions:
virtual double | valueMaxNormalRight() |
virtual void | setValueMaxNormalRight(double value) |
See also NormalColor.
valueMaxWarning : double
This property holds the highest value that is considered to be in the warning range.
Access functions:
virtual double | valueMaxWarning() |
virtual void | setValueMaxWarning(double value) |
See also valueMinWarning, cdpValueMaxWarningRouting, and WarningColor.
valueMaxWarningHigh : double
This property holds the highest value that is considered to be in the high warning range.
Access functions:
virtual double | valueMaxWarningHigh() |
virtual void | setValueMaxWarningHigh(double value) |
See also valueMinWarningHigh, cdpValueMaxWarningHighRouting, and WarningHighColor.
valueMaxWarningHighRight : double
This property holds the highest value that is considered to be in the high warning range for the right side.
Note: tickPos has to be set to "TicksBothSides" for this to take effect.
Access functions:
virtual double | valueMaxWarningHighRight() |
virtual void | setValueMaxWarningHighRight(double value) |
See also WarningHighColor.
valueMaxWarningRight : double
This property holds the highest value that is considered to be in the warning range for the right side.
Note: tickPos has to be set to "TicksBothSides" for this to take effect.
Access functions:
virtual double | valueMaxWarningRight() |
virtual void | setValueMaxWarningRight(double value) |
See also WarningColor.
valueMinError : double
This property holds the lowest value that is considered to be in the error range.
Access functions:
virtual double | valueMinError() |
virtual void | setValueMinError(double value) |
See also valueMaxError, cdpValueMaxErrorRouting, and ErrorColor.
valueMinErrorRight : double
This property holds the lowest value that is considered to be in the error range for the right side.
Note: tickPos has to be set to "TicksBothSides" for this to take effect.
Access functions:
virtual double | valueMinErrorRight() |
virtual void | setValueMinErrorRight(double value) |
See also ErrorColor.
valueMinNormal : double
This property holds the lowest value that is considered to be in the normal range.
Access functions:
virtual double | valueMinNormal() |
virtual void | setValueMinNormal(double value) |
See also valueMaxNormal, cdpValueMaxNormalRouting, and NormalColor.
valueMinNormalRight : double
This property holds the lowest value that is considered to be in the normal range for the right side.
Note: tickPos has to be set to "TicksBothSides" for this to take effect.
Access functions:
virtual double | valueMinNormalRight() |
virtual void | setValueMinNormalRight(double value) |
See also NormalColor.
valueMinWarning : double
This property holds the lowest value that is considered to be in the warning range.
Access functions:
virtual double | valueMinWarning() |
virtual void | setValueMinWarning(double value) |
See also valueMaxWarning, cdpValueMaxWarningRouting, and WarningColor.
valueMinWarningHigh : double
This property holds the lowest value that is considered to be in the high warning range.
Access functions:
virtual double | valueMinWarningHigh() |
virtual void | setValueMinWarningHigh(double value) |
See also valueMaxWarningHigh, cdpValueMaxWarningHighRouting, and WarningHighColor.
valueMinWarningHighRight : double
This property holds the lowest value that is considered to be in the high warning range for the right side.
Note: tickPos has to be set to "TicksBothSides" for this to take effect.
Access functions:
virtual double | valueMinWarningHighRight() |
virtual void | setValueMinWarningHighRight(double value) |
See also WarningHighColor.
valueMinWarningRight : double
This property holds the lowest value that is considered to be in the warning range for the right side.
Note: tickPos has to be set to "TicksBothSides" for this to take effect.
Access functions:
virtual double | valueMinWarningRight() |
virtual void | setValueMinWarningRight(double value) |
See also WarningColor.
Member Function Documentation
CDPBaseTickMarks::CDPBaseTickMarks(QWidget *parent = 0)
Default constructs an instance of CDPBaseTickMarks.
int CDPBaseTickMarks::GetNumFontHeight()
[virtual]
double CDPBaseTickMarks::alarmMaxValue(TickMarksGenerator::AlarmLevel level, bool indicatorRight = false)
See also setAlarmMaxValue().
[virtual]
double CDPBaseTickMarks::alarmMinValue(TickMarksGenerator::AlarmLevel level, bool indicatorRight = false)
See also setAlarmMinValue().
[virtual]
void CDPBaseTickMarks::loadPixmaps(bool skipSVG = false)
int CDPBaseTickMarks::maxNumberWidth() const
[virtual]
void CDPBaseTickMarks::setAlarmMaxValue(double value, TickMarksGenerator::AlarmLevel level, bool indicatorRight = false)
See also alarmMaxValue().
[virtual]
void CDPBaseTickMarks::setAlarmMinValue(double value, TickMarksGenerator::AlarmLevel level, bool indicatorRight = false)
See also alarmMinValue().
[virtual]
void CDPBaseTickMarks::setWidgetFont(const QString &font)
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.