BlendSplitter
3.0.0
A Blender-like Qt Widget management library
|
An item intended to be put into WidgetRegistry. More...
#include <RegistryItem.hpp>
Public Member Functions | |
RegistryItem (QString name="Default", QWidget *(*widget)()=[]() ->QWidget *{return new QLabel{"Default Widget"};}, void(*populateBar)(SwitchingBar *, QWidget *)=[](SwitchingBar *, QWidget *) ->void {}) | |
A constructor setting all the internal values. More... | |
Public Attributes | |
QString | name |
QWidget *(* | widget )() |
A function constructing the widget. More... | |
void(* | populateBar )(SwitchingBar *, QWidget *) |
A function populating the SwitchingBar. More... | |
An item intended to be put into WidgetRegistry.
Each RegistryItem corresponds to one widget that can be displayed in a BlendSplitter. It describes how this widget should be constructed, what is its name and what items should be in the SwitchingBar when this widget is selected.
Definition at line 17 of file RegistryItem.hpp.
RegistryItem::RegistryItem | ( | QString | name = "Default" , |
QWidget *(*)() | widget = []() ->QWidget *{return new QLabel{"Default Widget"};} , |
||
void(*)(SwitchingBar *, QWidget *) | populateBar = [](SwitchingBar *, QWidget *) ->void {} |
||
) |
A constructor setting all the internal values.
This constructor takes 3 parameters corresponding to the 3 members of the RegistryItem class. See their desription for more details.
name | The name of the widget, used in the SwitchingBar combo box |
widget | A pointer to a function constructing the widget |
populateBar | A pointer to a function populating the SwitchingBar |
QString RegistryItem::name |
The name of the widget, used in the SwitchingBar combo box.
Definition at line 20 of file RegistryItem.hpp.
void(* RegistryItem::populateBar) (SwitchingBar *, QWidget *) |
A function populating the SwitchingBar.
A pointer to a function populating the SwitchingBar. This function is called each time this widget is selected in any SwitchingWidget. Usually this function makes use of the interface provided by SwitchingBar to populate it.
A | pointer to the SwitchingBar to be populated |
A | pointer to the newly-created widget in the SwitchingWidget |
Definition at line 33 of file RegistryItem.hpp.
QWidget*(* RegistryItem::widget) () |
A function constructing the widget.
A pointer to a function returning QWidget*. This function is called to construct the widget each time it is selected in any SwitchingWidget. Usually in this function the widget is dynamically created using new
operator and the pointer is returned.
Definition at line 26 of file RegistryItem.hpp.