CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Member Functions | List of all members
ctkTemplateLayoutViewFactory< T > Class Template Reference

#include <Libs/Widgets/ctkLayoutViewFactory.h>

Inheritance diagram for ctkTemplateLayoutViewFactory< T >:
Inheritance graph
[legend]
Collaboration diagram for ctkTemplateLayoutViewFactory< T >:
Collaboration graph
[legend]

Public Member Functions

virtual QWidget * createViewFromXML (QDomElement layoutElement)
 
 ctkTemplateLayoutViewFactory (QObject *parent=0)
 
- Public Member Functions inherited from ctkLayoutViewFactory
virtual void beginSetupLayout ()
 
 ctkLayoutViewFactory (QObject *parent=0)
 Constructor. More...
 
virtual void endSetupLayout ()
 
virtual bool isElementSupported (QDomElement layoutElement) const
 
QList< QWidget * > registeredViews () const
 
virtual void setupView (QDomElement layoutElement, QWidget *view)
 
void setUseCachedViews (bool cache)
 
virtual QStringList supportedElementNames () const
 
bool useCachedViews () const
 
virtual QWidget * viewFromXML (QDomElement layoutElement)
 
virtual QList< QWidget * > viewsFromXML (QDomElement layoutElement)
 
virtual ~ctkLayoutViewFactory ()
 Destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ctkLayoutViewFactory
virtual QList< QWidget * > createViewsFromXML (QDomElement layoutElement)
 
QDomElement layoutElement (QWidget *view) const
 
QList< QWidget * > registeredViews (const QDomElement &layoutElement) const
 
virtual void registerView (QDomElement layoutElement, QWidget *view)
 
virtual void unregisterView (QDomElement layoutElement, QWidget *view)
 
virtual void unregisterView (QWidget *view)
 
- Protected Attributes inherited from ctkLayoutViewFactory
QScopedPointer< ctkLayoutViewFactoryPrivate > d_ptr
 
- Properties inherited from ctkLayoutViewFactory
bool useCachedViews
 

Detailed Description

template<class T>
class ctkTemplateLayoutViewFactory< T >

Instantiate a template QWidget anytime a view element is listed inside a layout element.

QString tabLayout(
"<layout type=\"tab\">"
" <item><view name=\"tab1\"/></item>"
" <item><view name=\"tab2\"/></item>"
" <item><view name=\"tab3\"/></item>"
"</layout>");
QWidget tab;
tab.setWindowTitle("Tab Layout");
ctkLayoutFactory tabLayoutManager;
tabLayoutManager.registerViewFactory(buttonFactory);
tabToSimpleLayoutManager.setLayout(tabLayoutDoc);
tabToSimpleLayoutManager.setViewport(&tab);
tabToSimple.show();
void registerViewFactory(ctkLayoutViewFactory *factory)
See also
ctkLayoutViewFactory

Definition at line 174 of file ctkLayoutViewFactory.h.

Constructor & Destructor Documentation

◆ ctkTemplateLayoutViewFactory()

template<class T >
ctkTemplateLayoutViewFactory< T >::ctkTemplateLayoutViewFactory ( QObject *  parent = 0)
inline

Definition at line 177 of file ctkLayoutViewFactory.h.

Member Function Documentation

◆ createViewFromXML()

template<class T >
virtual QWidget* ctkTemplateLayoutViewFactory< T >::createViewFromXML ( QDomElement  layoutElement)
inlinevirtual

Create a new view from a layoutElement. Returns 0 by default

See also
viewFromXML

Reimplemented from ctkLayoutViewFactory.

Definition at line 182 of file ctkLayoutViewFactory.h.


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