Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Member Functions | Private Attributes
omni::ui::mixin::ParameterWidget< WIDGET > Class Template Reference

Setup and remove a parameter widget for a certain plugin interface. More...

#include <ParameterWidget.h>

Public Types

typedef WIDGET widget_type
 

Public Member Functions

template<typename PARENT_WIDGET >
void removeParameterWidget (PARENT_WIDGET *_widget)
 Remove parameter widget from given widget. More...
 
template<typename PARENT_WIDGET , typename INTERFACE >
bool setupParameterWidget (PARENT_WIDGET *_widget, INTERFACE *_interface)
 Setup widget for interface and place it onto widget. More...
 
widget_typeparameterWidget ()
 Return pointer to parameterWidget. More...
 

Private Member Functions

virtual void parameterWidgetSetupOptions (widget_type *_paramWidget) const
 Additional options. Is called during setup process. More...
 

Private Attributes

widget_typeparameterWidget_ = nullptr
 

Detailed Description

template<typename WIDGET = QWidget>
class omni::ui::mixin::ParameterWidget< WIDGET >

Setup and remove a parameter widget for a certain plugin interface.

Template Parameters
Baseclass of parameter widget Interface can be a mapping, canvas or input interface

Member Typedef Documentation

template<typename WIDGET = QWidget>
typedef WIDGET omni::ui::mixin::ParameterWidget< WIDGET >::widget_type

Member Function Documentation

template<typename WIDGET = QWidget>
widget_type* omni::ui::mixin::ParameterWidget< WIDGET >::parameterWidget ( )
inline

Return pointer to parameterWidget.

73  {
74  return parameterWidget_;
75  }
widget_type * parameterWidget_
Definition: ParameterWidget.h:82
template<typename WIDGET = QWidget>
virtual void omni::ui::mixin::ParameterWidget< WIDGET >::parameterWidgetSetupOptions ( widget_type _paramWidget) const
inlineprivatevirtual

Additional options. Is called during setup process.

Reimplemented in omni::ui::Input.

80  {}
template<typename WIDGET = QWidget>
template<typename PARENT_WIDGET >
void omni::ui::mixin::ParameterWidget< WIDGET >::removeParameterWidget ( PARENT_WIDGET *  _widget)
inline

Remove parameter widget from given widget.

40  {
41  if (parameterWidget_) {
42  _widget->layout()->removeWidget(parameterWidget_);
43  parameterWidget_->hide();
44  parameterWidget_->deleteLater();
45  parameterWidget_ = nullptr;
46  }
47  }
widget_type * parameterWidget_
Definition: ParameterWidget.h:82
template<typename WIDGET = QWidget>
template<typename PARENT_WIDGET , typename INTERFACE >
bool omni::ui::mixin::ParameterWidget< WIDGET >::setupParameterWidget ( PARENT_WIDGET *  _widget,
INTERFACE *  _interface 
)
inline

Setup widget for interface and place it onto widget.

Make a new parameter widget

51  {
52  if (!_widget) return false;
53  if (!_widget->layout()) return false;
54 
55  removeParameterWidget(_widget);
56 
57  if (!_interface) return false;
58 
59  /// Make a new parameter widget
60  parameterWidget_ = _interface->widget();
61 
62  if (parameterWidget_) {
64 
65  _widget->layout()->addWidget(parameterWidget_);
66  parameterWidget_->show();
67  return true;
68  }
69  return false;
70  }
virtual void parameterWidgetSetupOptions(widget_type *_paramWidget) const
Additional options. Is called during setup process.
Definition: ParameterWidget.h:79
widget_type * parameterWidget_
Definition: ParameterWidget.h:82
void removeParameterWidget(PARENT_WIDGET *_widget)
Remove parameter widget from given widget.
Definition: ParameterWidget.h:40

Field Documentation

template<typename WIDGET = QWidget>
widget_type* omni::ui::mixin::ParameterWidget< WIDGET >::parameterWidget_ = nullptr
private

The documentation for this class was generated from the following file: