RoutingContainer Class
The RoutingContainer enables relative routing in widget children More...
Header: | #include <CDPBaseWidgets/RoutingContainer.h> |
Inherits: | RoutingContainerBase and |
Properties
- cdpFullTargetRouting : const QString
- cdpTargetRouting : QString
Public Functions
RoutingContainer(QWidget *parent = nullptr) |
- 3 public functions inherited from RoutingContainerBase
Public Slots
virtual void | setCdpTargetRouting(const QString &routing) override |
Additional Inherited Members
- 3 static public members inherited from RoutingContainerBase
Detailed Description
The RoutingContainer enables relative routing in widget children
Adding routing to the cdpTargetRouting property in the RoutingContainer makes it possible to use relative routings in child widget properties. In the child widget routing properties, a relative routing is started using a dot (.) character. To illustrate this with an example, imagine having a container with widgets showing the configuration of a Sine component. If the container is configured with cdpTargetRouting set to Application.Sine, a bar that is to show the Sine amplitude can be configured with .Amplitude.Value (the .Value part is added automatically). The full routing set on the bar would then resolve to Application.Sine.Amplitude.Value.
The main reason to use the RoutingContainer is to make reusable GUI elements that target control system objects with a fixed structure. Copying such GUI elements will only require setting the target routing on the RoutingContainer.
The RoutingContainer supports relative routing when placed inside other RoutingContainers. Widget children can use both relative and absolute paths in their routing properties.
The cdpTargetRouting is provided as a slot, enabling runtime target changes via Qt signals. Alternatively, the developer can add the dynamic routing property cdpTargetRoutingRouting for direct control, allowing real-time adjustments from the control system.
Property Documentation
cdpFullTargetRouting : const QString
This property holds the context routing when the cdpTargetRouting contains relative routing.
cdpTargetRouting : QString
This property holds the target routing that will be used as base for relative routing in child widget properties.
Access functions:
virtual void | setCdpTargetRouting(const QString &routing) override |
Member Function Documentation
RoutingContainer::RoutingContainer(QWidget *parent = nullptr)
Default constructs an instance of RoutingContainer.
[override virtual slot]
void RoutingContainer::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.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.