![]() |
ImFusion SDK 4.3
|
#include <ImFusion/GUI/DefaultControllerDecorator.h>
Wrapper class to decorate Controller instances and place them in the GUI of MainWindowBase using Qt Widgets. More...
Inheritance diagram for DefaultControllerDecorator:Wrapper class to decorate Controller instances and place them in the GUI of MainWindowBase using Qt Widgets.
This class is designed to work with MainWindowBase and supports the available default locations of Controllers. Usually, you don't need to create instances of this class manually since MainWindowBase takes care of it.
Public Member Functions | |
| DefaultControllerDecorator (Controller &controller, MainWindowBase &mwb) | |
| Instantiates a new container widget wrapping controller and placing it inside mwb. | |
| bool | setLocation (Controller::Location location) override |
| Sets how the controller should be decorated and where it should be placed in the parent MainWindowBase. | |
| Controller::Location | location () const override |
| Returns the current location of the controller, i.e. where it is placed in the parent MainWindowBase. | |
| void | setVisible (bool value) override |
| Sets whether the controller should be visible or hidden from the GUI. | |
| bool | isVisible () const override |
| Returns whether the controller widget is currently visible. | |
| void | setUserClosable (bool closable) override |
| Sets whether the container widget should show a button to close the underlying Controller. | |
| bool | isUserClosable () const override |
| Returns whether the container widget should show a button to close the underlying Controller. | |
| void | setExpanded (bool value) |
| Convenience function to set whether the boxContainer() should be expanded or not. | |
| bool | isExpanded () const |
| Convenience function to return whether the boxContainer() is expanded or not. | |
| void | setResizable (bool value) |
| Convenience function to set whether the boxContainer() should be resizable or not. | |
| bool | isResizable () const |
| Convenience function to return whether the boxContainer() is resizable or not. | |
| void | setTitleOverride (const std::string &title) |
| Sets an optional text to show instead of Controller::title() in the title section. | |
| ExpandableGroupBox * | boxContainer () |
Returns the container widget if the location is PrimaryDock, SecondaryDock, or Detached, or nullptr otherwise. | |
| QWidget * | toolbarContainer () |
Returns the container widget if the location is ToolBar or nullptr otherwise. | |
| void | addMenuActionPopulator (std::function< void(QMenu &)> func) |
| void | updateSelectDataAction () |
| void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
Public Member Functions inherited from SignalReceiver | |
| SignalReceiver ()=default | |
| Default constructor. | |
| SignalReceiver (const SignalReceiver &other) | |
| Copy constructor, does not copy any existing signal connections from other. | |
| SignalReceiver & | operator= (SignalReceiver rhs) |
| Assignment operator, disconnects all existing connections, does not copy any existing signal connections from rhs. | |
| virtual | ~SignalReceiver () |
| Virtual destructor disconnects from all connected signals. | |
Public Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Static Public Member Functions | |
| static void | resetSavedControllerLocations () |
| Clears all stored controller locations from the global settings so that they are reset to their default. | |
Additional Inherited Members | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Member Functions inherited from SignalReceiver | |
| void | disconnectAll () |
| Disconnects all existing connections. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
explicit |
Instantiates a new container widget wrapping controller and placing it inside mwb.
Both references must remain valid for the lifetime of this instance.
|
overridevirtual |
Sets how the controller should be decorated and where it should be placed in the parent MainWindowBase.
Returns false if requested location could not be set (e.g. because not in Controller::supportedLocations()).
Implements ControllerDecorator.
|
inlineoverridevirtual |
Returns the current location of the controller, i.e. where it is placed in the parent MainWindowBase.
Implements ControllerDecorator.
|
overridevirtual |
Sets whether the controller should be visible or hidden from the GUI.
Implements ControllerDecorator.
|
overridevirtual |
Returns whether the controller widget is currently visible.
Implements ControllerDecorator.
|
overridevirtual |
Sets whether the container widget should show a button to close the underlying Controller.
Implements ControllerDecorator.
|
overridevirtual |
Returns whether the container widget should show a button to close the underlying Controller.
Implements ControllerDecorator.
|
overridevirtual |
Configure this object instance by de-serializing the given Properties.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.
|
overridevirtual |
Serialize the current object configuration into the given Properties object.
The default implementation will do so automatically for all registered Parameter and SubProperty instances.
Reimplemented from Configurable.