ScenarioModel Class Reference

Model defining how a Scenario gets displayed in the TreeView. More...

#include <ArmarXGui/gui-plugins/ScenarioManager/gui/scenariomodel.h>

+ Inheritance diagram for ScenarioModel:

Signals

void applicationsDrop (QList< QPair< QString, ScenarioManager::Data_Structure::Application * > > applications, int row, const QModelIndex &parent)
 

Public Member Functions

void clear () override
 Clears and resets this model.
 
QVariant data (const QModelIndex &index, int role) const override
 Returns the data of the item at the given index based on the given role.
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 Returns the item flags of the item at the given index.
 
ScenarioItem * getRootItem ()
 
QStringList mimeTypes () const override
 
 ScenarioModel ()
 Sets up the model.
 
Qt::DropActions supportedDropActions () const override
 Returns the drop-Actions supported by this model.
 
void update ()
 Updates this model, emitting dataChanged() for every row whose displayed data changed.
 
- Public Member Functions inherited from TreeModel
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
bool insertColumn (int position, QVariant data, const QModelIndex &parent=QModelIndex())
 
bool insertRow (int position, TreeItem *item, const QModelIndex &parent=QModelIndex())
 
QModelIndex parent (const QModelIndex &index) const override
 
bool removeColumn (int position, const QModelIndex &parent=QModelIndex())
 
bool removeRow (int position, const QModelIndex &parent=QModelIndex())
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
 TreeModel (QObject *parent=0)
 
 ~TreeModel () override
 

Static Public Member Functions

static ScenarioItem * FindScenario (const QAbstractItemModel *model, const QString &scenarioName)
 
static int FindScenarioIndex (const QAbstractItemModel *model, const QString &scenarioName)
 

Additional Inherited Members

- Protected Member Functions inherited from TreeModel
TreeItem * getItem (const QModelIndex &index) const
 
- Protected Attributes inherited from TreeModel
TreeItem * rootItem
 

Detailed Description

Model defining how a Scenario gets displayed in the TreeView.

Constructor & Destructor Documentation

◆ ScenarioModel()

Sets up the model.

Member Function Documentation

◆ applicationsDrop

void applicationsDrop ( QList< QPair< QString, ScenarioManager::Data_Structure::Application * > > applications,
int row,
const QModelIndex & parent )
signal

◆ clear()

void clear ( )
overridevirtual

Clears and resets this model.

Implements TreeModel.

◆ data()

QVariant data ( const QModelIndex & index,
int role ) const
override

Returns the data of the item at the given index based on the given role.

Parameters
indexindex of the item
rolerole of the item

◆ dropMimeData()

bool dropMimeData ( const QMimeData * data,
Qt::DropAction action,
int row,
int column,
const QModelIndex & parent )
override
Parameters
data
action
row
column
parent

◆ FindScenario()

ScenarioItem * FindScenario ( const QAbstractItemModel * model,
const QString & scenarioName )
static

◆ FindScenarioIndex()

int FindScenarioIndex ( const QAbstractItemModel * model,
const QString & scenarioName )
static

◆ flags()

Qt::ItemFlags flags ( const QModelIndex & index) const
override

Returns the item flags of the item at the given index.

Parameters
indexitem-index
Returns
item flags

◆ getRootItem()

ScenarioItem * getRootItem ( )

◆ mimeTypes()

QStringList mimeTypes ( ) const
override

◆ supportedDropActions()

Qt::DropActions supportedDropActions ( ) const
override

Returns the drop-Actions supported by this model.

Returns
supported drop-actions

◆ update()

void update ( )

Updates this model, emitting dataChanged() for every row whose displayed data changed.


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