Workspace 6.21.5
Public Member Functions | List of all members
WidgetCreators Class Reference

Class for creating widgets connected to input/output data. More...

#include <Workspace/Widgets/widgetcreators.h>

Public Member Functions

 WidgetCreators (const WidgetCreators &c)
 
 ~WidgetCreators ()
 
QWidget * createWidget (int index, QWidget *parent=nullptr, bool readOnly=false)
 
bool empty () const
 
const Creator & getCreator (int index) const
 
QString getName (int index) const
 
WidgetCreatorsoperator= (const WidgetCreators &c)
 
void setPreferred (const QString &name, const QString &adaptType=QString())
 
unsigned size () const
 

Detailed Description

This class acts somewhat like a container except that it doesn't provide any means to use its objects directly. Instead, it allows clients to specify which object to use to create a widget, then the class will invoke the specified object internally to carry out the task. Alternatively, it allows the Creator object at a particular index to be retrieved so that it can be passed to something else, but clients may not use the Creator object directly (the class definition of Creator is not part of the public API). The only queryable information WidgetCreators provides is the number of items in the container and the name of the object at any given index.

Constructor & Destructor Documentation

◆ WidgetCreators()

◆ ~WidgetCreators()

Member Function Documentation

◆ createWidget()

QWidget * createWidget ( int  index,
QWidget *  parent = nullptr,
bool  readOnly = false 
)

◆ empty()

bool empty ( ) const

◆ getCreator()

const Creator & getCreator ( int  index) const

◆ getName()

QString getName ( int  index) const

◆ operator=()

WidgetCreators & operator= ( const WidgetCreators c)

◆ setPreferred()

void setPreferred ( const QString &  name,
const QString &  adaptType = QString() 
)

◆ size()

unsigned size ( ) const