BlendSplitter  3.0.0
A Blender-like Qt Widget management library
SwitchingWidget Class Reference

A widget whose actual content can be selected from a combo box. More...

#include <SwitchingWidget.hpp>

Inheritance diagram for SwitchingWidget:
Collaboration diagram for SwitchingWidget:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

§ SwitchingWidget()

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

Parameters
itemA RegistryItem to display in the widget. If nullptr, then WidgetRegistry::getDefault() is used.
parentA parent widget

Member Function Documentation

§ setCurrentWidget()

void SwitchingWidget::setCurrentWidget ( RegistryItem item = nullptr)

Set the current Widget displayed.

Sets the current widget to be the item

Parameters
itemA RegistryItem to display in the widget. If nullptr, then WidgetRegistry::getDefault() is used.

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