TickMarksGenerator Class
Class that generates tickmarks to a pixmap (intended for internal use). More...
Header: | #include <CDPBaseWidgets/TickMarksGenerator.h> |
Public Types
enum | AlarmLevel { Normal, Warning, WarningHigh, Error } |
enum | GenMajorTickMethod { SpecifyNumber, SpecifyInterval } |
enum | GenNumPos { NoNumbers, NumbersShow, NumbersAutoRight, NumbersAutoLeft } |
enum | GenNumPrecision { AutoLimited, AutoNoLimit, Fixed } |
enum | GenTickPos { NoTicks, TicksAbove, TicksLeft, TicksBelow, TicksRight, TicksBothSides } |
Public Functions
TickMarksGenerator() | |
int | adjustLeftTicks() const |
int | adjustRightTicks() const |
virtual QColor | alarmColor(TickMarksGenerator::AlarmLevel level) |
virtual bool | alarmIndicators() |
virtual double | alarmMaxValue(TickMarksGenerator::AlarmLevel level, bool indicatorRight = false) |
virtual double | alarmMinValue(TickMarksGenerator::AlarmLevel level, bool indicatorRight = false) |
void | drawAlarmIndicators(QPainter &painter, QRect rect, const QMargins *margins = 0) |
void | drawTickMarks(QPixmap &pixmap, const QMargins &margins) |
virtual int | getPrecisionMethod() |
double | getTicksScalingFactor() |
virtual bool | invertAxis() |
int | majorTickLength() const |
int | majorTickMethod() |
double | majorTickWidth() const |
virtual double | majorTicks() |
int | maxNumberWidth() const |
virtual double | maxValue() const |
virtual double | minValue() const |
int | minorTickLength() const |
double | minorTickWidth() const |
virtual int | minorTicks() |
virtual QColor | numColor() |
virtual const QFont & | numFont() |
virtual int | numPosition() const |
virtual QString | numPostfix() const |
virtual bool | numRotate() |
int | numberAndPostfixHeight() const |
int | numberAndPostfixWidth() const |
int | numberAndTickWidthLeft() const |
int | numberAndTickWidthRight() const |
int | numberPrecision() const |
int | numberToTickSpacing() const |
int | postfixWidth() const |
virtual int | precision() |
virtual bool | separateIndicatorsRight() |
virtual void | setAlarmColor(QColor color, TickMarksGenerator::AlarmLevel level) |
virtual void | setAlarmIndicators(bool enable) |
virtual void | setAlarmMaxValue(double value, TickMarksGenerator::AlarmLevel level, bool indicatorRight = false) |
virtual void | setAlarmMinValue(double value, TickMarksGenerator::AlarmLevel level, bool indicatorRight = false) |
virtual void | setInvertAxis(bool invert) |
void | setMajorTickLength(int length) |
void | setMajorTickMethod(int method) |
void | setMajorTickWidth(double width) |
virtual void | setMajorTicks(double ticks) |
virtual void | setMaxValue(double value) |
virtual void | setMinValue(double value) |
void | setMinorTickLength(int length) |
void | setMinorTickWidth(double width) |
virtual void | setMinorTicks(int ticks) |
virtual void | setNumColor(const QColor &color) |
virtual void | setNumFont(const QFont &font) |
virtual void | setNumPosition(int pos) |
virtual void | setNumPostfix(QString postfix) |
virtual void | setNumRotate(bool rotate) |
void | setNumberToTickSpacing(int value) |
virtual void | setPrecision(int value) |
virtual void | setPrecisionMethod(int value) |
virtual void | setSeparateIndicatorsRight(bool indicatorRight) |
void | setTickAntialiasing(bool enable) |
void | setTickColor(const QColor &color) |
virtual void | setTickPosition(int pos) |
virtual void | setTickShow(bool show) |
bool | tickAntialiasing() |
QColor | tickColor() |
virtual int | tickPosition() const |
virtual bool | tickShow() const |
int | topAndBottomMargin() const |
void | updateAutoPrecision() |
void | updateScalingFactor(QRect rect, const QMargins &margins) |
Static Public Members
bool | validRange(double value) |
Detailed Description
Class that generates tickmarks to a pixmap (intended for internal use).
The tickmarks are drawn at the outer edges of the pixmap. Use the margin argument to position the tickmarks in the pixmap if you do not want them at the edges.
The class can add numbers to the pixmap at the major tickmarks. Note that the tickmarks are positioned using the margin argument as usual.
-- -- 4 - - -- -- 2 - - -- -- 0
Member Type Documentation
enum TickMarksGenerator::AlarmLevel
enum TickMarksGenerator::GenMajorTickMethod
enum TickMarksGenerator::GenNumPos
enum TickMarksGenerator::GenNumPrecision
enum TickMarksGenerator::GenTickPos
Member Function Documentation
TickMarksGenerator::TickMarksGenerator()
Default constructs an instance of TickMarksGenerator.
int TickMarksGenerator::adjustLeftTicks() const
int TickMarksGenerator::adjustRightTicks() const
[virtual]
QColor TickMarksGenerator::alarmColor(TickMarksGenerator::AlarmLevel level)
See also setAlarmColor().
[virtual]
bool TickMarksGenerator::alarmIndicators()
See also setAlarmIndicators().
[virtual]
double TickMarksGenerator::alarmMaxValue(TickMarksGenerator::AlarmLevel level, bool indicatorRight = false)
See also setAlarmMaxValue().
[virtual]
double TickMarksGenerator::alarmMinValue(TickMarksGenerator::AlarmLevel level, bool indicatorRight = false)
See also setAlarmMinValue().
void TickMarksGenerator::drawAlarmIndicators(QPainter &painter, QRect rect, const QMargins *margins = 0)
void TickMarksGenerator::drawTickMarks(QPixmap &pixmap, const QMargins &margins)
[virtual]
int TickMarksGenerator::getPrecisionMethod()
double TickMarksGenerator::getTicksScalingFactor()
[virtual]
bool TickMarksGenerator::invertAxis()
See also setInvertAxis().
int TickMarksGenerator::majorTickLength() const
See also setMajorTickLength().
int TickMarksGenerator::majorTickMethod()
See also setMajorTickMethod().
double TickMarksGenerator::majorTickWidth() const
See also setMajorTickWidth().
[virtual]
double TickMarksGenerator::majorTicks()
See also setMajorTicks().
int TickMarksGenerator::maxNumberWidth() const
[virtual]
double TickMarksGenerator::maxValue() const
See also setMaxValue().
[virtual]
double TickMarksGenerator::minValue() const
See also setMinValue().
int TickMarksGenerator::minorTickLength() const
See also setMinorTickLength().
double TickMarksGenerator::minorTickWidth() const
See also setMinorTickWidth().
[virtual]
int TickMarksGenerator::minorTicks()
See also setMinorTicks().
[virtual]
QColor TickMarksGenerator::numColor()
See also setNumColor().
[virtual]
const QFont &TickMarksGenerator::numFont()
See also setNumFont().
[virtual]
int TickMarksGenerator::numPosition() const
See also setNumPosition().
[virtual]
QString TickMarksGenerator::numPostfix() const
See also setNumPostfix().
[virtual]
bool TickMarksGenerator::numRotate()
See also setNumRotate().
int TickMarksGenerator::numberAndPostfixHeight() const
int TickMarksGenerator::numberAndPostfixWidth() const
int TickMarksGenerator::numberAndTickWidthLeft() const
int TickMarksGenerator::numberAndTickWidthRight() const
int TickMarksGenerator::numberPrecision() const
int TickMarksGenerator::numberToTickSpacing() const
See also setNumberToTickSpacing().
int TickMarksGenerator::postfixWidth() const
[virtual]
int TickMarksGenerator::precision()
See also setPrecision().
[virtual]
bool TickMarksGenerator::separateIndicatorsRight()
See also setSeparateIndicatorsRight().
[virtual]
void TickMarksGenerator::setAlarmColor(QColor color, TickMarksGenerator::AlarmLevel level)
See also alarmColor().
[virtual]
void TickMarksGenerator::setAlarmIndicators(bool enable)
See also alarmIndicators().
[virtual]
void TickMarksGenerator::setAlarmMaxValue(double value, TickMarksGenerator::AlarmLevel level, bool indicatorRight = false)
See also alarmMaxValue().
[virtual]
void TickMarksGenerator::setAlarmMinValue(double value, TickMarksGenerator::AlarmLevel level, bool indicatorRight = false)
See also alarmMinValue().
[virtual]
void TickMarksGenerator::setInvertAxis(bool invert)
See also invertAxis().
void TickMarksGenerator::setMajorTickLength(int length)
See also majorTickLength().
void TickMarksGenerator::setMajorTickMethod(int method)
See also majorTickMethod().
void TickMarksGenerator::setMajorTickWidth(double width)
See also majorTickWidth().
[virtual]
void TickMarksGenerator::setMajorTicks(double ticks)
See also majorTicks().
[virtual]
void TickMarksGenerator::setMaxValue(double value)
See also maxValue().
[virtual]
void TickMarksGenerator::setMinValue(double value)
See also minValue().
void TickMarksGenerator::setMinorTickLength(int length)
See also minorTickLength().
void TickMarksGenerator::setMinorTickWidth(double width)
See also minorTickWidth().
[virtual]
void TickMarksGenerator::setMinorTicks(int ticks)
See also minorTicks().
[virtual]
void TickMarksGenerator::setNumColor(const QColor &color)
See also numColor().
[virtual]
void TickMarksGenerator::setNumFont(const QFont &font)
See also numFont().
[virtual]
void TickMarksGenerator::setNumPosition(int pos)
See also numPosition().
[virtual]
void TickMarksGenerator::setNumPostfix(QString postfix)
See also numPostfix().
[virtual]
void TickMarksGenerator::setNumRotate(bool rotate)
See also numRotate().
void TickMarksGenerator::setNumberToTickSpacing(int value)
See also numberToTickSpacing().
[virtual]
void TickMarksGenerator::setPrecision(int value)
See also precision().
[virtual]
void TickMarksGenerator::setPrecisionMethod(int value)
[virtual]
void TickMarksGenerator::setSeparateIndicatorsRight(bool indicatorRight)
See also separateIndicatorsRight().
void TickMarksGenerator::setTickAntialiasing(bool enable)
See also tickAntialiasing().
void TickMarksGenerator::setTickColor(const QColor &color)
See also tickColor().
[virtual]
void TickMarksGenerator::setTickPosition(int pos)
See also tickPosition().
[virtual]
void TickMarksGenerator::setTickShow(bool show)
See also tickShow().
bool TickMarksGenerator::tickAntialiasing()
See also setTickAntialiasing().
QColor TickMarksGenerator::tickColor()
See also setTickColor().
[virtual]
int TickMarksGenerator::tickPosition() const
See also setTickPosition().
[virtual]
bool TickMarksGenerator::tickShow() const
See also setTickShow().
int TickMarksGenerator::topAndBottomMargin() const
void TickMarksGenerator::updateAutoPrecision()
void TickMarksGenerator::updateScalingFactor(QRect rect, const QMargins &margins)
[static]
bool TickMarksGenerator::validRange(double value)
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.