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

#include <Workspace/Widgets/IOModel/iomodelitem.h>

Public Member Functions

 IOModelItem (const NamePath &namePath, IOModel &model, IOModelItem *parent)
 
 IOModelItem (const QString &label, IOModel &model, IOModelItem *parent)
 
 ~IOModelItem ()
 
IOModelItemgetChild (int row)
 
int getChildCount () const
 
DataExecution::DataObjectgetDataObject () const
 
DataExecution::IOBasegetIOBase () const
 
QString getName () const
 
const NamePathgetNamePath () const
 
IOModelItemgetParent ()
 
const IOModelItemgetParent () const
 
QVariant getRoleData (int role) const
 
int getRow () const
 
bool hasChildren () const
 
void insertChild (IOModelItem &item, int index=-1)
 
void moveChild (int fromIndex, int toIndex)
 
void removeAllChildren ()
 
bool removeChild (IOModelItem &item)
 
void setRoleData (int role, const QVariant &d) const
 

Constructor & Destructor Documentation

◆ IOModelItem() [1/2]

IOModelItem ( const QString &  label,
IOModel model,
IOModelItem parent 
)

◆ IOModelItem() [2/2]

IOModelItem ( const NamePath namePath,
IOModel model,
IOModelItem parent 
)

◆ ~IOModelItem()

Member Function Documentation

◆ getChild()

IOModelItem * getChild ( int  row)

◆ getChildCount()

int getChildCount ( ) const

◆ getDataObject()

DataObject * getDataObject ( ) const
Returns
The data object this item is associated with, or a null pointer if not associated with any particular input/output or the data the item represents is not currently available/present.

◆ getIOBase()

IOBase * getIOBase ( ) const
Returns
The input/output this item is associated with, or a null pointer if not associated with any particular input/output (in which case the item is really just there for grouping children).

◆ getName()

QString getName ( ) const
Returns
The name this item represents. For hierarchical items, the name does not include anything about the parent, just this item only.

◆ getNamePath()

const NamePath & getNamePath ( ) const
Returns
The name path associated with this item.

◆ getParent() [1/2]

IOModelItem * getParent ( )

◆ getParent() [2/2]

const IOModelItem * getParent ( ) const

◆ getRoleData()

QVariant getRoleData ( int  role) const
Parameters
roleThe role for which data is being requested. See the Qt documentation for QAbstractItemModel::data() for more details.
Returns
The data for the specified role, or if no such data exists an invalid QVariant will be returned instead.
See also
setRoleData()

◆ getRow()

int getRow ( ) const

◆ hasChildren()

bool hasChildren ( ) const

◆ insertChild()

void insertChild ( IOModelItem item,
int  index = -1 
)

◆ moveChild()

void moveChild ( int  fromIndex,
int  toIndex 
)

◆ removeAllChildren()

void removeAllChildren ( )

◆ removeChild()

bool removeChild ( IOModelItem item)

◆ setRoleData()

void setRoleData ( int  role,
const QVariant &  d 
) const
Parameters
roleThe role for which data is being set or cleared. See the Qt documentation for QAbstractItemModel::data() for more details.
dThe data to set for the specified role. If this is an invalid QVariant, it will be interpreted as the client wants to clear the data for the specified role.
See also
getRoleData()