#include <Base/QTGUI/qSlicerSingletonViewFactory.h>
|
Q_INVOKABLE QWidget * | createViewFromXML (QDomElement layoutElement) override |
| Reimplemented to instantiate desired singleton widget from the element. More...
|
|
|
QScopedPointer< qSlicerSingletonViewFactoryPrivate > | d_ptr |
|
This class provides an interface for C++ and Python classes to register a singleton view replacement widget. New view widgets can be registered by registering a new qSlicerSingletonViewFactory, and then setting the widget and tag using setWidget(QWidget*) and setTagName(QString). The factory will be responsible for deleting the widget. This factory contains a single pointer to an instance of the widget, so only one view can be created within a given layout.
Definition at line 38 of file qSlicerSingletonViewFactory.h.
◆ Superclass
◆ qSlicerSingletonViewFactory()
qSlicerSingletonViewFactory::qSlicerSingletonViewFactory |
( |
QObject * |
parent = nullptr | ) |
|
◆ ~qSlicerSingletonViewFactory()
qSlicerSingletonViewFactory::~qSlicerSingletonViewFactory |
( |
| ) |
|
|
override |
◆ createViewFromXML()
Q_INVOKABLE QWidget* qSlicerSingletonViewFactory::createViewFromXML |
( |
QDomElement |
layoutElement | ) |
|
|
overrideprotected |
Reimplemented to instantiate desired singleton widget from the element.
◆ onWidgetDestroyed
virtual void qSlicerSingletonViewFactory::onWidgetDestroyed |
( |
| ) |
|
|
virtualslot |
◆ setTagName()
virtual Q_INVOKABLE void qSlicerSingletonViewFactory::setTagName |
( |
QString |
tagName | ) |
|
|
virtual |
Set the XML tag that identifies the view where the widget should be placed.
◆ setWidget()
virtual Q_INVOKABLE void qSlicerSingletonViewFactory::setWidget |
( |
QWidget * |
widget | ) |
|
|
virtual |
Set the singleton widget instance that will be used to create the view The factory will become responsible for deleting the widget
◆ supportedElementNames()
QStringList qSlicerSingletonViewFactory::supportedElementNames |
( |
| ) |
const |
|
override |
Reimplemented to support custom element names.
◆ tagName()
Q_INVOKABLE QString qSlicerSingletonViewFactory::tagName |
( |
| ) |
|
Get the XML tag that identifies the view where the widget should be placed.
◆ widget()
virtual Q_INVOKABLE QWidget* qSlicerSingletonViewFactory::widget |
( |
| ) |
|
|
virtual |
Get the singleton widget instance that will be used to create the view.
◆ d_ptr
QScopedPointer<qSlicerSingletonViewFactoryPrivate> qSlicerSingletonViewFactory::d_ptr |
|
protected |
The documentation for this class was generated from the following file: