• 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

  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • GUI - CDP Widgets
  • CDPComWidget

CDPComWidget Class

The Com Widget is a proxy for commucation with cdp using qt signals and slots More...

Header: #include <CDPBaseWidgets/CDPComWidget.h>
Inherits: CDPBaseCom,
  • List of all members, including inherited members

Properties

  • cdpOfflineValue : const double
  • cdpOfflineValueEnabled : const bool
  • cdpRouting : QString
  • cdpScaling : const double
  • emitBitChanged : bool
  • pushRoutables : const QStringList

Public Functions

CDPComWidget(QWidget *parent = 0)
QString cdpRouting()
bool emitBitChanged()
void setEmitBitChanged(bool enabled)
  • 16 public functions inherited from CDPBaseCom

Public Slots

virtual const QStringList &pushRoutables() const
void sendValue(double value)
void sendValue(int value)
void sendValue(bool value)
void setCdpRouting(QString routing)
void setGlobalFont(const QString &font)
void setGlobalInCommand(bool enable = true)
void setGlobalSmoothPixmap(bool smooth = true)
void setGlobalStyle(int style)
void setGlobalStyle(double style)

Signals

void bit00Changed(bool value)
void bit01Changed(bool value)
void bit02Changed(bool value)
void bit03Changed(bool value)
void bit04Changed(bool value)
void bit05Changed(bool value)
void bit06Changed(bool value)
void bit07Changed(bool value)
void bit08Changed(bool value)
void bit09Changed(bool value)
void bit10Changed(bool value)
void bit11Changed(bool value)
void bit12Changed(bool value)
void bit13Changed(bool value)
void bit14Changed(bool value)
void bit15Changed(bool value)
void bit16Changed(bool value)
void bit17Changed(bool value)
void bit18Changed(bool value)
void bit19Changed(bool value)
void bit20Changed(bool value)
void bit21Changed(bool value)
void bit22Changed(bool value)
void bit23Changed(bool value)
void bit24Changed(bool value)
void bit25Changed(bool value)
void bit26Changed(bool value)
void bit27Changed(bool value)
void bit28Changed(bool value)
void bit29Changed(bool value)
void bit30Changed(bool value)
void bit31Changed(bool value)
void connectionChanged(bool value)
void pushRoutablesChanged(const QStringList &pushers)
void valueChanged(double value)
void valueChanged(int value)
void valueChanged(qint64 value)
void valueChanged(uint value)
void valueChanged(QString value)

Protected Functions

void setIQtCDPPointer(IQtCDP *pIQtCDP) override

Reimplemented Protected Functions

virtual void ConnectionChanged(bool bConnected) override
virtual void setValue(double value) override
virtual bool setValue(QString value, bool bScale) override
  • 4 protected functions inherited from CDPBaseCom

Detailed Description



The Com Widget is a proxy for commucation with cdp using qt signals and slots

The widget is also a container to avoid taking up space in the layouts. Place the widget that are to communicate with the com widget inside it and add a layout. Then press f4 within the designer to enable signal mode and drag and drop connections. Press f3 to go back to standard edit mode. Note that you might want to remove layout margins if this is not something you want.

Note: the possibility for emitting bits of the value as separate qt signals when emitBitChanged is enabled.

Note: that this widget should only be used when there are no communication available in the widget that you for some reason have to use. Having hidden functionality, with signals and slots, can be confusing and hard to maintain.

Property Documentation

cdpOfflineValue : const double

This property holds the value to show when communication is offline and cdpOfflineValueEnabled is set to true.

The property has no effect when cdpOfflineValueEnabled is set to false.

See also cdpOfflineValueEnabled.

cdpOfflineValueEnabled : const bool

This property holds whether or not to show cdpOfflineValue when communication is offline.

Setting the property to false will make the widget keep/show the last value when communication is down.

See also cdpOfflineValue.

cdpRouting : QString

This property holds the routing to the cdp object we want to communicate with.

Access functions:

QString cdpRouting()
void setCdpRouting(QString routing)

cdpScaling : const double

This property holds the scaling factor to be used when sending/recieving communication values.

Input-values to the CDPComWidget will be multiplied with this value, output-values will be divided.

emitBitChanged : bool

This property holds whether to emit bits of received value as separate qt signals.

Access functions:

bool emitBitChanged()
void setEmitBitChanged(bool enabled)

pushRoutables : const QStringList

Access functions:

virtual const QStringList &pushRoutables() const

Notifier signal:

void pushRoutablesChanged(const QStringList &pushers)

Member Function Documentation

CDPComWidget::CDPComWidget(QWidget *parent = 0)

Default constructs an instance of CDPComWidget.

[override virtual protected] void CDPComWidget::ConnectionChanged(bool bConnected)

[signal] void CDPComWidget::bit00Changed(bool value)

[signal] void CDPComWidget::bit01Changed(bool value)

[signal] void CDPComWidget::bit02Changed(bool value)

[signal] void CDPComWidget::bit03Changed(bool value)

[signal] void CDPComWidget::bit04Changed(bool value)

[signal] void CDPComWidget::bit05Changed(bool value)

[signal] void CDPComWidget::bit06Changed(bool value)

[signal] void CDPComWidget::bit07Changed(bool value)

[signal] void CDPComWidget::bit08Changed(bool value)

[signal] void CDPComWidget::bit09Changed(bool value)

[signal] void CDPComWidget::bit10Changed(bool value)

[signal] void CDPComWidget::bit11Changed(bool value)

[signal] void CDPComWidget::bit12Changed(bool value)

[signal] void CDPComWidget::bit13Changed(bool value)

[signal] void CDPComWidget::bit14Changed(bool value)

[signal] void CDPComWidget::bit15Changed(bool value)

[signal] void CDPComWidget::bit16Changed(bool value)

[signal] void CDPComWidget::bit17Changed(bool value)

[signal] void CDPComWidget::bit18Changed(bool value)

[signal] void CDPComWidget::bit19Changed(bool value)

[signal] void CDPComWidget::bit20Changed(bool value)

[signal] void CDPComWidget::bit21Changed(bool value)

[signal] void CDPComWidget::bit22Changed(bool value)

[signal] void CDPComWidget::bit23Changed(bool value)

[signal] void CDPComWidget::bit24Changed(bool value)

[signal] void CDPComWidget::bit25Changed(bool value)

[signal] void CDPComWidget::bit26Changed(bool value)

[signal] void CDPComWidget::bit27Changed(bool value)

[signal] void CDPComWidget::bit28Changed(bool value)

[signal] void CDPComWidget::bit29Changed(bool value)

[signal] void CDPComWidget::bit30Changed(bool value)

[signal] void CDPComWidget::bit31Changed(bool value)

[signal] void CDPComWidget::connectionChanged(bool value)

[slot] void CDPComWidget::sendValue(double value)

[slot] void CDPComWidget::sendValue(int value)

[slot] void CDPComWidget::sendValue(bool value)

[slot] void CDPComWidget::setGlobalFont(const QString &font)

Set global font family for all CDP base widgets that implement this feature.

[slot] void CDPComWidget::setGlobalInCommand(bool enable = true)

Set global in-command by setting enable to true or false. This will disable/enable CDP base widgets that implement this feature.

Note: This feature is usually controlled from the control system.

[slot] void CDPComWidget::setGlobalSmoothPixmap(bool smooth = true)

Set global smooth pixmap transform to true or false. This will disable/enable smoothing after transformations in widgets that implements the feature.

Note: Disabling smooth pixmap transform might improve performance on systems with limited resources, but will also make transformed/rotated pixmaps look pixelated.

[slot] void CDPComWidget::setGlobalStyle(int style)

Set a global widget style number to be used by all CDP base widgets that implement this widget styling.

[slot] void CDPComWidget::setGlobalStyle(double style)

Set a global widget style number to be used by all CDP base widgets that implement this widget styling.

[protected] void CDPComWidget::setIQtCDPPointer(IQtCDP *pIQtCDP)

[override virtual protected] void CDPComWidget::setValue(double value)

[override virtual protected] bool CDPComWidget::setValue(QString value, bool bScale)

[signal] void CDPComWidget::valueChanged(double value)

Note: Signal valueChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(cDPComWidget, static_cast<void(CDPComWidget::*)(double)>(&CDPComWidget::valueChanged),
    [=](double value){ /* ... */ });

[signal] void CDPComWidget::valueChanged(int value)

Note: Signal valueChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(cDPComWidget, static_cast<void(CDPComWidget::*)(int)>(&CDPComWidget::valueChanged),
    [=](int value){ /* ... */ });

[signal] void CDPComWidget::valueChanged(qint64 value)

Note: Signal valueChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(cDPComWidget, static_cast<void(CDPComWidget::*)(qint64)>(&CDPComWidget::valueChanged),
    [=](qint64 value){ /* ... */ });

[signal] void CDPComWidget::valueChanged(uint value)

Note: Signal valueChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(cDPComWidget, static_cast<void(CDPComWidget::*)(uint)>(&CDPComWidget::valueChanged),
    [=](uint value){ /* ... */ });

[signal] void CDPComWidget::valueChanged(QString value)

Note: Signal valueChanged is overloaded in this class. To connect to this one using the function pointer syntax, you must specify the signal type in a static cast, as shown in this example:

connect(cDPComWidget, static_cast<void(CDPComWidget::*)(QString)>(&CDPComWidget::valueChanged),
    [=](QString value){ /* ... */ });

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

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

    © Copyright 2022 CDP Technologies. Privacy and cookie policy.

    Return to top