#include <Libs/Widgets/ctkLayoutViewFactory.h>
|
QScopedPointer< ctkLayoutViewFactoryPrivate > | d_ptr |
|
ctkLayoutViewFactory is an abstract class that creates and setups widgets for a specific view XML element from ctkLayoutManager. See ctkTemplateLayoutViewFactory for a factory that can instantiate any Qt widget. This class is meant to be derived with at least the method createViewFromXML() being overwritten.
- See also
- ctkLayoutManager, ctkTemplateLayoutViewFactory, createViewFromXML()
Definition at line 42 of file ctkLayoutViewFactory.h.
◆ ctkLayoutViewFactory()
ctkLayoutViewFactory::ctkLayoutViewFactory |
( |
QObject * |
parent = 0 | ) |
|
◆ ~ctkLayoutViewFactory()
virtual ctkLayoutViewFactory::~ctkLayoutViewFactory |
( |
| ) |
|
|
virtual |
◆ beginSetupLayout()
virtual void ctkLayoutViewFactory::beginSetupLayout |
( |
| ) |
|
|
virtual |
◆ createViewFromXML()
virtual QWidget* ctkLayoutViewFactory::createViewFromXML |
( |
QDomElement |
layoutElement | ) |
|
|
protectedvirtual |
◆ createViewsFromXML()
virtual QList<QWidget*> ctkLayoutViewFactory::createViewsFromXML |
( |
QDomElement |
layoutElement | ) |
|
|
protectedvirtual |
◆ endSetupLayout()
virtual void ctkLayoutViewFactory::endSetupLayout |
( |
| ) |
|
|
virtual |
◆ isElementSupported()
virtual bool ctkLayoutViewFactory::isElementSupported |
( |
QDomElement |
layoutElement | ) |
const |
|
virtual |
◆ layoutElement()
QDomElement ctkLayoutViewFactory::layoutElement |
( |
QWidget * |
view | ) |
const |
|
protected |
◆ registeredViews() [1/2]
QList<QWidget*> ctkLayoutViewFactory::registeredViews |
( |
| ) |
const |
Return all the widgets that have been registered. Used internally for testing.
- See also
- registeredViews()
◆ registeredViews() [2/2]
QList<QWidget*> ctkLayoutViewFactory::registeredViews |
( |
const QDomElement & |
layoutElement | ) |
const |
|
protected |
◆ registerView()
virtual void ctkLayoutViewFactory::registerView |
( |
QDomElement |
layoutElement, |
|
|
QWidget * |
view |
|
) |
| |
|
protectedvirtual |
◆ setupView()
virtual void ctkLayoutViewFactory::setupView |
( |
QDomElement |
layoutElement, |
|
|
QWidget * |
view |
|
) |
| |
|
virtual |
Method is called each time a view is made visible into a layout. This method can be reimplemented. Sets the widget visibility to true and register the view by default.
- See also
- viewsFromXML()
◆ setUseCachedViews()
void ctkLayoutViewFactory::setUseCachedViews |
( |
bool |
cache | ) |
|
◆ supportedElementNames()
virtual QStringList ctkLayoutViewFactory::supportedElementNames |
( |
| ) |
const |
|
virtual |
Returns the list of element names supported by the factory (e.g. "view", "myview"...). Returns ["view"] by default. Can be reimplemented to support other element names.
- Warning
- It is not possible to support the "layout" and "item" XML elements.
- See also
- isSupportedElement()
◆ unregisterView() [1/2]
virtual void ctkLayoutViewFactory::unregisterView |
( |
QDomElement |
layoutElement, |
|
|
QWidget * |
view |
|
) |
| |
|
protectedvirtual |
◆ unregisterView() [2/2]
virtual void ctkLayoutViewFactory::unregisterView |
( |
QWidget * |
view | ) |
|
|
protectedvirtual |
◆ useCachedViews()
bool ctkLayoutViewFactory::useCachedViews |
( |
| ) |
const |
◆ viewFromXML()
virtual QWidget* ctkLayoutViewFactory::viewFromXML |
( |
QDomElement |
layoutElement | ) |
|
|
virtual |
◆ viewsFromXML()
virtual QList<QWidget*> ctkLayoutViewFactory::viewsFromXML |
( |
QDomElement |
layoutElement | ) |
|
|
virtual |
Virtual method that returns a list of widgets from a "view" layout element. If the parent "item" element has a "multiple=true" XML attribute, the "view" layout element can describe many widgets instead of just one widget. The returned widgets will automatically be layout into their parent layout (e.g. boxlayout). Returns previously registered or cached views if any, otherwise create new views using createViewsFromXML().
- See also
- viewFromXML(), registeredViews(),
◆ d_ptr
QScopedPointer<ctkLayoutViewFactoryPrivate> ctkLayoutViewFactory::d_ptr |
|
protected |
◆ useCachedViews
bool ctkLayoutViewFactory::useCachedViews |
|
readwrite |
The documentation for this class was generated from the following file: