• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Products
    • Automation Designer
    • HMI Designer
    • Maritime HMIs
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • GUI - CDP Widgets
  • CDPBaseSlideIndicator

CDPBaseSlideIndicator Class

The Slide Indicator is a linear gauge that can have up to 4 indicator knobs on a rail, showing values of routed cdp properties or signals. More...

Header: #include <CDPBaseSlideIndicator>
Inherits: CDPBaseSlider
  • List of all members, including inherited members

Properties

  • cdp1ErrorSecRouting : QString
  • cdp1NormalSecRouting : QString
  • cdp1WarningHighSecRouting : QString
  • cdp1WarningSecRouting : QString
  • cdp2ErrorSecRouting : QString
  • cdp2NormalSecRouting : QString
  • cdp2WarningHighSecRouting : QString
  • cdp2WarningSecRouting : QString
  • cdpCenterSecRouting : QString
  • ignoreMouseEvents : bool
  • knob2Enabled : bool
  • knob2Offset : int
  • knob2Routing : QString
  • knob2Style : int
  • knob2Value : double
  • knob3Enabled : bool
  • knob3Offset : int
  • knob3Routing : QString
  • knob3Style : int
  • knob3Value : double
  • knob4Enabled : bool
  • knob4Offset : int
  • knob4Routing : QString
  • knob4Style : int
  • knob4Value : double
  • railOffset : const int
  • 28 properties inherited from CDPBaseSlider
  • 49 properties inherited from CDPBaseTickMarks
  • 6 properties inherited from CDPBaseWidget

Public Functions

CDPBaseSlideIndicator(QWidget *parent = 0)
QString centerSecRouting()
QString errorSecRouting1()
QString errorSecRouting2()
virtual bool indicatorEnabled(int number = 1)
virtual int indicatorOffsetMin(int number = 1)
virtual QString indicatorRouting(int number = 1)
virtual int indicatorStyle(int number = 1)
virtual double indicatorValue(int number = 1)
virtual bool knob3Enabled()
virtual int knob3Offset()
virtual QString knob3Routing()
virtual int knob3Style()
virtual double knob3Value()
virtual bool knob4Enabled()
virtual int knob4Offset()
virtual QString knob4Routing()
virtual int knob4Style()
virtual double knob4Value()
QString normalSecRouting1()
QString normalSecRouting2()
void setCenterSecRouting(QString routing)
void setErrorSecRouting1(QString routing)
void setErrorSecRouting2(QString routing)
virtual void setIndicatorEnabled(bool enabled = true, int number = 1)
virtual void setIndicatorOffsetMin(int offset, int number = 1)
virtual void setIndicatorRouting(QString routing, int number = 1)
virtual void setIndicatorStyle(int style, int number = 1)
virtual void setIndicatorValue(double value, int number = 1)
virtual void setKnob3Enabled(bool enabled)
virtual void setKnob3Offset(int offset)
virtual void setKnob3Routing(QString routing)
virtual void setKnob3Style(int style)
virtual void setKnob4Enabled(bool enabled)
virtual void setKnob4Offset(int offset)
virtual void setKnob4Routing(QString routing)
virtual void setKnob4Style(int style)
void setNormalSecRouting1(QString routing)
void setNormalSecRouting2(QString routing)
void setWarningHighSecRouting1(QString routing)
void setWarningHighSecRouting2(QString routing)
void setWarningSecRouting1(QString routing)
void setWarningSecRouting2(QString routing)
QString warningHighSecRouting1()
QString warningHighSecRouting2()
QString warningSecRouting1()
QString warningSecRouting2()

Reimplemented Public Functions

virtual void resizeEvent(QResizeEvent *ev) override
virtual void setIgnoreMouseEvents(bool ignore) override
virtual void setMaxValue(double value) override
virtual void setMinValue(double value) override
virtual void setOfflineValue(double value) override
virtual void setOfflineValueEnabled(bool enabled) override
virtual void setOrientation(Qt::Orientation orientation) override
virtual void setSvgFile(const QString &svg) override
  • 60 public functions inherited from CDPBaseSlider
  • 90 public functions inherited from CDPBaseTickMarks
  • 3 public functions inherited from StateChanger
  • 17 public functions inherited from CDPBaseCom
  • 8 public functions inherited from CDPBaseWidget
  • 4 public functions inherited from CDPBaseControlVisible

Public Slots

virtual void setKnob2Value(double value)
virtual void setKnob3Value(double value)
virtual void setKnob4Value(double value)
  • 27 public slots inherited from CDPBaseSlider
  • 16 public slots inherited from CDPBaseTickMarks
  • 10 public slots inherited from CDPBaseWidget

Protected Functions

virtual CDPBaseSlider *addChildIndicator(int knobNumber)

Reimplemented Protected Functions

virtual void loadPixmaps(bool skipSVG = false) override
  • 18 protected functions inherited from CDPBaseSlider
  • 4 protected functions inherited from CDPBaseCom
  • 1 protected function inherited from CDPBaseControlVisible

Additional Inherited Members

  • 5 signals inherited from CDPBaseSlider
  • 1 signal inherited from CDPBaseWidget
  • 2 static public members inherited from CDPBaseCom

Detailed Description

The Slide Indicator is a linear gauge that can have up to 4 indicator knobs on a rail, showing values of routed cdp properties or signals.

Styling by svg is done similar to a standard CDPBaseSlider, but be aware that the size of the different knob styles must be identical for all knobs to show at correct positions.

Two sets of dynamic alarm sectors can be added to the rail. Indicators and alarm sectors can both be controlled by CDP objects.

All widgets support controlling any class property of string or numeric types using routing. When there is no routing property available for a certain feature, we can add it using a Dynamic Property. For more information about this, see the Design Mode Manual regarding Dynamic Routing.

Property Documentation

cdp1ErrorSecRouting : QString

This property holds the routing to a CDPSignal that controls the size of the 1st error alarm sector.

Access functions:

QString errorSecRouting1()
void setErrorSecRouting1(QString routing)

See also cdpCenterSecRouting.

cdp1NormalSecRouting : QString

This property holds the routing to a CDPSignal that controls the size of the 1st normal alarm sector.

Access functions:

QString normalSecRouting1()
void setNormalSecRouting1(QString routing)

See also cdpCenterSecRouting.

cdp1WarningHighSecRouting : QString

This property holds the routing to a CDPSignal that controls the size of the 1st high warning alarm sector.

Access functions:

QString warningHighSecRouting1()
void setWarningHighSecRouting1(QString routing)

See also cdpCenterSecRouting.

cdp1WarningSecRouting : QString

This property holds the routing to a CDPSignal that controls the size of the 1st warning alarm sector.

Access functions:

QString warningSecRouting1()
void setWarningSecRouting1(QString routing)

See also cdpCenterSecRouting.

cdp2ErrorSecRouting : QString

This property holds the routing to a CDPSignal that controls the size of the 2nd error alarm sector.

Access functions:

QString errorSecRouting2()
void setErrorSecRouting2(QString routing)

See also cdpCenterSecRouting.

cdp2NormalSecRouting : QString

This property holds the routing to a CDPSignal that controls the size of the 2nd normal alarm sector.

Access functions:

QString normalSecRouting2()
void setNormalSecRouting2(QString routing)

See also cdpCenterSecRouting.

cdp2WarningHighSecRouting : QString

This property holds the routing to a CDPSignal that controls the size of the 2nd high warning alarm sector.

Access functions:

QString warningHighSecRouting2()
void setWarningHighSecRouting2(QString routing)

See also cdpCenterSecRouting.

cdp2WarningSecRouting : QString

This property holds the routing to a CDPSignal that controls the size of the 2nd warning alarm sector.

Access functions:

QString warningSecRouting2()
void setWarningSecRouting2(QString routing)

See also cdpCenterSecRouting.

cdpCenterSecRouting : QString

This property holds the routing to a CDPSignal that controls the center position of all alarm sectors.

All alarm sectors can be defined using cdp routings and they are always placed symetrically on the scale so that their midpoint is defined by cdpCenterSecRouting.

Note: Defining the alarm sectors via cdp routings will override the sector ranges defined in the CDPBaseTickMarks component.

Note: Whereas the CDPBaseSlideIndicator supports having two separate alarm sectors, the midpoint defined by cdpCenterSecRouting is common for both of them.

Access functions:

QString centerSecRouting()
void setCenterSecRouting(QString routing)

See also cdp1NormalSecRouting, cdp1WarningSecRouting, cdp1WarningHighSecRouting, cdp1ErrorSecRouting, cdp2NormalSecRouting, cdp2WarningSecRouting, cdp2WarningHighSecRouting, and cdp2ErrorSecRouting.

ignoreMouseEvents : bool

This property holds whether to ignore mouse actions done on the widget or not.

Setting this property will make the indicator knobs unmovable by mouse.

Access functions:

virtual void setIgnoreMouseEvents(bool ignore) override

knob2Enabled : bool

This property holds whether to enable the second knob or not.

Access functions:

virtual bool indicatorEnabled(int number = 1)
virtual void setIndicatorEnabled(bool enabled = true, int number = 1)

knob2Offset : int

This property holds the value in pixels for how much to offset the knob.

Access functions:

virtual int indicatorOffsetMin(int number = 1)
virtual void setIndicatorOffsetMin(int offset, int number = 1)

knob2Routing : QString

This property holds the path to the CDP object that controls this knob.

Access functions:

virtual QString indicatorRouting(int number = 1)
virtual void setIndicatorRouting(QString routing, int number = 1)

knob2Style : int

This property holds the style to select from svg file.

Access functions:

virtual int indicatorStyle(int number = 1)
virtual void setIndicatorStyle(int style, int number = 1)

knob2Value : double

This property holds the position of the knob.

Access functions:

virtual double indicatorValue(int number = 1)
virtual void setIndicatorValue(double value, int number = 1)

knob3Enabled : bool

This property holds whether to enable the second knob or not.

Access functions:

virtual bool knob3Enabled()
virtual void setKnob3Enabled(bool enabled)

knob3Offset : int

This property holds the value in pixels for how much to offset the knob.

Access functions:

virtual int knob3Offset()
virtual void setKnob3Offset(int offset)

knob3Routing : QString

This property holds the path to the CDP object that controls this knob.

Access functions:

virtual QString knob3Routing()
virtual void setKnob3Routing(QString routing)

knob3Style : int

This property holds the style to select from svg file.

Access functions:

virtual int knob3Style()
virtual void setKnob3Style(int style)

knob3Value : double

This property holds the position of the knob.

Access functions:

virtual double knob3Value()
virtual void setKnob3Value(double value)

knob4Enabled : bool

This property holds whether to enable the second knob or not.

Access functions:

virtual bool knob4Enabled()
virtual void setKnob4Enabled(bool enabled)

knob4Offset : int

This property holds the value in pixels for how much to offset the knob.

Access functions:

virtual int knob4Offset()
virtual void setKnob4Offset(int offset)

knob4Routing : QString

This property holds the path to the CDP object that controls this knob.

Access functions:

virtual QString knob4Routing()
virtual void setKnob4Routing(QString routing)

knob4Style : int

This property holds the style to select from svg file.

Access functions:

virtual int knob4Style()
virtual void setKnob4Style(int style)

knob4Value : double

This property holds the position of the knob.

Access functions:

virtual double knob4Value()
virtual void setKnob4Value(double value)

railOffset : const int

This property holds the offset of the slider from the left/top of the widget.

If the widget orientation is horizontal, then the offset is calculated from the top edge. If the widget orientation is vertical then the offset is calculated from the left edge.

Member Function Documentation

CDPBaseSlideIndicator::CDPBaseSlideIndicator(QWidget *parent = 0)

Default constructs an instance of CDPBaseSlideIndicator.

[virtual protected] CDPBaseSlider *CDPBaseSlideIndicator::addChildIndicator(int knobNumber)

[override virtual protected] void CDPBaseSlideIndicator::loadPixmaps(bool skipSVG = false)

[override virtual] void CDPBaseSlideIndicator::resizeEvent(QResizeEvent *ev)

[virtual slot] void CDPBaseSlideIndicator::setKnob2Value(double value)

[override virtual] void CDPBaseSlideIndicator::setMaxValue(double value)

[override virtual] void CDPBaseSlideIndicator::setMinValue(double value)

[override virtual] void CDPBaseSlideIndicator::setOfflineValue(double value)

[override virtual] void CDPBaseSlideIndicator::setOfflineValueEnabled(bool enabled)

[override virtual] void CDPBaseSlideIndicator::setOrientation(Qt::Orientation orientation)

[override virtual] void CDPBaseSlideIndicator::setSvgFile(const QString &svg)

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2025 CDP Technologies. Privacy and cookie policy.

Return to top