• 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
  • CDPBaseButtonMsg

CDPBaseButtonMsg Class

The Message Button sends message to a CDP object specified in cdpRouting. More...

Header: #include <CDPBaseButtonMsg>
Inherits: CDPBaseButton and CDPBaseCom
Inherited By:

CDPBaseButtonMarker

  • List of all members, including inherited members

Properties

  • cdpAutoDisable : bool
  • cdpParameter : QString
  • cdpProperty : QString
  • cdpRouting : QString
  • cdpTextCommand : QString
  • 31 properties inherited from CDPBaseButton

Public Functions

CDPBaseButtonMsg(QWidget *parent = 0)
virtual ~CDPBaseButtonMsg()
virtual void ConnectionChanged(bool bConnected)
virtual int MessageConfirmed(MessageACK *pMessageACK)
virtual int MessageTimedout(MessageACK *pMessageACK)
virtual void PropertyChanged(std::string strFullPropertyName, std::string strNewPropertyValue)
virtual bool cdpAutoDisable()
virtual QString cdpParameter() const
virtual QString cdpPropertyName()
virtual QString cdpTextCommand() const
QString routing() override
  • 62 public functions inherited from CDPBaseButton
  • 17 public functions inherited from CDPBaseCom
  • 26 public functions inherited from CDPBasePadLauncher
  • 3 public functions inherited from StateChanger
  • 4 public functions inherited from CDPBaseControlVisible

Public Slots

virtual void setCdpAutoDisable(bool autoDisable)
virtual void setCdpParameter(QString parameter)
virtual void setCdpPropertyName(QString prop)
virtual void setCdpTextCommand(QString textCommand)
void setRouting(QString destination) override
  • 15 public slots inherited from CDPBaseButton

Signals

void messageFailure()
void messageSuccess()
void signalConnectionChanged(bool)
  • 7 signals inherited from CDPBaseButton

Protected Functions

virtual void setEnabledControlledByAuto(bool enable)
  • 13 protected functions inherited from CDPBaseButton
  • 4 protected functions inherited from CDPBaseCom
  • 1 protected function inherited from CDPBasePadLauncher
  • 1 protected function inherited from CDPBaseControlVisible

Additional Inherited Members

  • 2 static public members inherited from CDPBaseCom
  • 9 protected slots inherited from CDPBaseButton

Detailed Description

The Message Button sends message to a CDP object specified in cdpRouting.

The message is sent as a CM_TEXTCOMMAND with textcommand and parameter.

Setting cdpProperty will make the button send a SetProperty message rather than a text command message. Note that you could use this along with cdpParameter to set a signal value when clicking the button (e.g. setting cdpProperty to Value and adding a number to cdpParameter).

If configured to show a key or num pad, accepted values will be sent along with the message or as value to SetProperty if cdpProperty is set.

If cdpAutoDisable is set to true, the button will get disabled if not connected or while the message is in transit.

Note: when you are using both cdpAutoDisable and the textColor property, you have to ensure that the button is enabled when changing color.

The Message Button have all the properties and functionality of CDPBaseButton. Visit that documentation and have a look at the Button Examples for more information about styling and other button features.

Property Documentation

cdpAutoDisable : bool

This property holds whether to disable the button while message is in transit.

Access functions:

virtual bool cdpAutoDisable()
virtual void setCdpAutoDisable(bool autoDisable)

cdpParameter : QString

This property holds an optional parameter that can be sent with the message.

Access functions:

virtual QString cdpParameter() const
virtual void setCdpParameter(QString parameter)

cdpProperty : QString

This property holds the name of the property to update in routed cdp object. The property will get updated with the text added in cdpParameter.

Access functions:

virtual QString cdpPropertyName()
virtual void setCdpPropertyName(QString prop)

cdpRouting : QString

This property holds the full name of the cdp object that we want to message.

Access functions:

QString routing() override
void setRouting(QString destination) override

cdpTextCommand : QString

This property holds the text command to send to destination.

Access functions:

virtual QString cdpTextCommand() const
virtual void setCdpTextCommand(QString textCommand)

Member Function Documentation

CDPBaseButtonMsg::CDPBaseButtonMsg(QWidget *parent = 0)

Default constructs an instance of CDPBaseButtonMsg.

[virtual] CDPBaseButtonMsg::~CDPBaseButtonMsg()

Destroys the instance of CDPBaseButtonMsg. The destructor is virtual.

[virtual] void CDPBaseButtonMsg::ConnectionChanged(bool bConnected)

[virtual] int CDPBaseButtonMsg::MessageConfirmed(MessageACK *pMessageACK)

[virtual] int CDPBaseButtonMsg::MessageTimedout(MessageACK *pMessageACK)

[virtual] void CDPBaseButtonMsg::PropertyChanged(std::string strFullPropertyName, std::string strNewPropertyValue)

[signal] void CDPBaseButtonMsg::messageFailure()

[signal] void CDPBaseButtonMsg::messageSuccess()

[virtual protected] void CDPBaseButtonMsg::setEnabledControlledByAuto(bool enable)

[signal] void CDPBaseButtonMsg::signalConnectionChanged(bool)

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