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

CDPBaseButtonPopDlg Class

The Popup Dialog Button is a button widget that can load a UI file when clicked. More...

Header: #include <CDPBaseButtonPopDlg>
Inherits: CDPBaseButtonMarker, DialogLoader, and RoutingContainerBase
Inherited By:

CDPBaseButtonMenu and CDPBaseButtonWithLamp

  • List of all members, including inherited members

Properties

  • cdpFullTargetRouting : const QString
  • cdpTargetRouting : QString
  • pinCode : const double
  • pinTimeoutSec : const int
  • preferParent : const bool
  • routingReplacement : const QString
  • uiFileName : QString
  • useCache : const bool
  • 21 properties inherited from CDPBaseButtonMarker
  • 5 properties inherited from CDPBaseButtonMsg
  • 31 properties inherited from CDPBaseButton

Public Functions

CDPBaseButtonPopDlg(QWidget *parent)
virtual ~CDPBaseButtonPopDlg()

Reimplemented Public Functions

virtual void setIQtCDPPointer(IQtCDP *pIQtCDP)
  • 3 public functions inherited from CDPBaseButtonMarker
  • 11 public functions inherited from DialogLoader
  • 3 public functions inherited from RoutingContainerBase
  • 9 public functions inherited from CDPBaseButtonMsg
  • 48 public functions inherited from MultiMarker
  • 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 setCdpTargetRouting(const QString &routing) override
void setCdpTargetRoutingAndShowDialog(const QString &routing)
virtual void setUiFileName(QString filename = "?", IQtCDP *pInterface = 0, QWidget *parent = 0)
virtual void showDialog(bool show = true)
virtual void showDialogOnMatch(double pin = 0)
  • 3 public slots inherited from CDPBaseButtonMarker
  • 5 public slots inherited from CDPBaseButtonMsg
  • 15 public slots inherited from CDPBaseButton

Signals

void clickedPinProtected(int)
  • 2 signals inherited from CDPBaseButtonMarker
  • 3 signals inherited from CDPBaseButtonMsg
  • 7 signals inherited from CDPBaseButton

Protected Functions

virtual void updateChecked()
  • 2 protected functions inherited from CDPBaseButtonMarker
  • 1 protected function inherited from CDPBaseButtonMsg
  • 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

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

Detailed Description

The Popup Dialog Button is a button widget that can load a UI file when clicked.

The button supports pin protection and global cache for reusing dialogs in multiple widgets.

Before displaying a dialog, the button will update any relative routings in its child widgets to ensure that the dialog content reflects the correct context. This update will only occur if the button can resolve a full target routing, either as configured in cdpTargetRouting or by searching further up the parent chain. Therefore, in a dialog where this updating is not desired, it can be disabled by ensuring that no target routings exist in the parent chain.

The Popup Dialog Button has all the properties and functionality of CDPBaseButtonMsg and CDPBaseButton.

See the Button Examples for more information about different button features.

Note: Make sure that all objects that are connected using signals and slots have unique names across .ui files. Failing to do so might cause source objects to connect wrong targets. In addition, be aware that connections are error prone when maintaining projects as they are not visible in normal mode and not possible to copy.

Property Documentation

cdpFullTargetRouting : const QString

cdpTargetRouting : QString

Access functions:

virtual void setCdpTargetRouting(const QString &routing) override

pinCode : const double

This property holds the pin code to be used when loading pin pad.

Note: pinCode will change num pad property to PinPad when set.

This will popup a pin code dialog when the button is clicked. When a matching pin code is entered, the ui specified in uiFileName is loaded.

pinTimeoutSec : const int

This property holds an optional time period the user does not have to retype the pin.

preferParent : const bool

This property holds whether to strive to set main window as parent for the loaded dialog or not.

routingReplacement : const QString

This property holds the string to use when replacing routing in loaded dialog.

This feature is most often used when loading global dialogs. The string added here will replace the replaceable routing string in all base widget children in the dialog (when clicked and opened).

Click here for further details.

uiFileName : QString

This property holds the path to the dialog we want to load when clicking the button.

Note: Make sure that all objects that are connected using signals and slots have unique names across .ui files. Failing to do so might cause source objects to connect wrong targets. In addition, be aware that connections are error prone when maintaining projects as they are not visible in normal mode and not possible to copy.

Access functions:

virtual void setUiFileName(QString filename = "?", IQtCDP *pInterface = 0, QWidget *parent = 0)

useCache : const bool

This property holds whether to reuse dialogs from a global cache or create a unique instance.

If this property is true, the system will attempt to retrieve a UI file from the cache. If the requested UI file is not found in the cache, a new instance of the UI will be created and loaded into the cache for potential reuse by other buttons.

The cache is typically used in conjunction with the replaceable routing feature, allowing dialogs to be reused for displaying information about similar elements, such as valves or pumps.

Member Function Documentation

CDPBaseButtonPopDlg::CDPBaseButtonPopDlg(QWidget *parent)

Default constructs an instance of CDPBaseButtonPopDlg.

[virtual] CDPBaseButtonPopDlg::~CDPBaseButtonPopDlg()

Destroys the instance of CDPBaseButtonPopDlg. The destructor is virtual.

[signal] void CDPBaseButtonPopDlg::clickedPinProtected(int)

[override virtual slot] void CDPBaseButtonPopDlg::setCdpTargetRouting(const QString &routing)

Reimplemented from RoutingContainerBase::setCdpTargetRouting().

Sets the target routing that will be used as base for relative routing in child widget properties.

This method, exposed as a Qt slot, allows the user to configure the target routing for the container widget and propagate it to all of its child widgets. By connecting a signal to this slot, the routing can be dynamically adjusted at runtime, ensuring that all child widgets follow the specified routing pattern.

Note: Setter function for property cdpTargetRouting.

[slot] void CDPBaseButtonPopDlg::setCdpTargetRoutingAndShowDialog(const QString &routing)

Sets the target routing and displays the dialog.

This slot allows the user to set the target routing for the dialog and immediately display it in one step. It is useful when the dialog content needs to be configured based on specific routing before being shown.

This function is particularly effective when used with node-based widgets like Node Table or Node List, where it can pop up a dialog with the appropriate context based on the selected nodes.

[virtual] void CDPBaseButtonPopDlg::setIQtCDPPointer(IQtCDP *pIQtCDP)

[virtual slot] void CDPBaseButtonPopDlg::showDialog(bool show = true)

[virtual slot] void CDPBaseButtonPopDlg::showDialogOnMatch(double pin = 0)

[virtual protected] void CDPBaseButtonPopDlg::updateChecked()

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