ImFusion SDK 4.3
DefaultControllerDecorator Class Reference

#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:

Detailed Description

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.

See also
MainWindowBase, Controller

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.
 
ExpandableGroupBoxboxContainer ()
 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.
 
SignalReceiveroperator= (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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (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< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Constructor & Destructor Documentation

◆ DefaultControllerDecorator()

DefaultControllerDecorator ( Controller & controller,
MainWindowBase & mwb )
explicit

Instantiates a new container widget wrapping controller and placing it inside mwb.

Both references must remain valid for the lifetime of this instance.

Member Function Documentation

◆ setLocation()

bool setLocation ( Controller::Location location)
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.

◆ location()

Controller::Location location ( ) const
inlineoverridevirtual

Returns the current location of the controller, i.e. where it is placed in the parent MainWindowBase.

Implements ControllerDecorator.

◆ setVisible()

void setVisible ( bool value)
overridevirtual

Sets whether the controller should be visible or hidden from the GUI.

Implements ControllerDecorator.

◆ isVisible()

bool isVisible ( ) const
overridevirtual

Returns whether the controller widget is currently visible.

Implements ControllerDecorator.

◆ setUserClosable()

void setUserClosable ( bool closable)
overridevirtual

Sets whether the container widget should show a button to close the underlying Controller.

Implements ControllerDecorator.

◆ isUserClosable()

bool isUserClosable ( ) const
overridevirtual

Returns whether the container widget should show a button to close the underlying Controller.

Implements ControllerDecorator.

◆ configure()

void configure ( const Properties * p)
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.

See also
configuration() for the inverse functionality

Reimplemented from Configurable.

◆ configuration()

void configuration ( Properties * p) const
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.

See also
configure() for the inverse functionality

Reimplemented from Configurable.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close