21#ifndef qSlicerSingletonViewFactory_h
22#define qSlicerSingletonViewFactory_h
25#include "ctkLayoutViewFactory.h"
28#include "qSlicerBaseQTGUIExport.h"
31class qSlicerSingletonViewFactoryPrivate;
51 Q_INVOKABLE
virtual void setWidget(QWidget* widget);
53 Q_INVOKABLE
virtual QWidget*
widget();
64 QScopedPointer<qSlicerSingletonViewFactoryPrivate>
d_ptr;
ctkLayoutViewFactory Superclass
QScopedPointer< qSlicerSingletonViewFactoryPrivate > d_ptr
virtual Q_INVOKABLE void setWidget(QWidget *widget)
QStringList supportedElementNames() const override
Reimplemented to support custom element names.
virtual void onWidgetDestroyed()
Q_INVOKABLE QWidget * createViewFromXML(QDomElement layoutElement) override
Reimplemented to instantiate desired singleton widget from the element.
~qSlicerSingletonViewFactory() override
virtual Q_INVOKABLE void setTagName(QString tagName)
Set the XML tag that identifies the view where the widget should be placed.
qSlicerSingletonViewFactory(QObject *parent=nullptr)
Q_INVOKABLE QString tagName()
Get the XML tag that identifies the view where the widget should be placed.
virtual Q_INVOKABLE QWidget * widget()
Get the singleton widget instance that will be used to create the view.