|
BlendSplitter
3.0.0
A Blender-like Qt Widget management library
|
A widget whose actual content can be selected from a combo box. More...
#include <SwitchingWidget.hpp>
Public Member Functions | |
| SwitchingWidget (RegistryItem *item=nullptr, QWidget *parent=nullptr) | |
| A default constructor similar to that of QWidget. More... | |
| void | setCurrentWidget (RegistryItem *item=nullptr) |
| Set the current Widget displayed. More... | |
A widget whose actual content can be selected from a combo box.
This widget displays a Widget with a SwitchingBar on the bottom. The widget displayed is one from WidgetRegistry and it can be selected using a combo box in the SwitchingBar.
Note that constructing an object of this class when WidgetRegistry is empty will cause a default RegistryItem to be added to it. The height of the SwitchingBar can be modified by changing BlendSplitter::switchingBarHeight.
Definition at line 20 of file SwitchingWidget.hpp.
| SwitchingWidget::SwitchingWidget | ( | RegistryItem * | item = nullptr, |
| QWidget * | parent = nullptr |
||
| ) |
A default constructor similar to that of QWidget.
Creates a SwitchingWidget containg the default widget specified in WidgetRegistry
| item | A RegistryItem to display in the widget. If nullptr, then WidgetRegistry::getDefault() is used. |
| parent | A parent widget |
| void SwitchingWidget::setCurrentWidget | ( | RegistryItem * | item = nullptr | ) |
Set the current Widget displayed.
Sets the current widget to be the item
| item | A RegistryItem to display in the widget. If nullptr, then WidgetRegistry::getDefault() is used. |