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. More...
 
QVariant data (const QModelIndex &index, int role) const override
 Returns the data of the item at the given index based on the given role. More...
 
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. More...
 
ScenarioItemgetRootItem ()
 
QStringList mimeTypes () const override
 
 ScenarioModel ()
 Sets up the model. More...
 
Qt::DropActions supportedDropActions () const override
 Returns the drop-Actions supported by this model. More...
 
void update ()
 Updates this model. More...
 
- 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 ScenarioItemFindScenario (const QAbstractItemModel *model, const QString &scenarioName)
 
static int FindScenarioIndex (const QAbstractItemModel *model, const QString &scenarioName)
 

Additional Inherited Members

- Protected Member Functions inherited from TreeModel
TreeItemgetItem (const QModelIndex &index) const
 
- Protected Attributes inherited from TreeModel
TreeItemrootItem
 

Detailed Description

Model defining how a Scenario gets displayed in the TreeView.

Definition at line 37 of file scenariomodel.h.

Constructor & Destructor Documentation

◆ ScenarioModel()

Sets up the model.

Definition at line 41 of file scenariomodel.cpp.

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.

Definition at line 125 of file scenariomodel.cpp.

◆ 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

Definition at line 46 of file scenariomodel.cpp.

+ Here is the call graph for this function:

◆ dropMimeData()

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

Definition at line 158 of file scenariomodel.cpp.

◆ FindScenario()

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

Definition at line 244 of file scenariomodel.cpp.

◆ FindScenarioIndex()

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

Definition at line 260 of file scenariomodel.cpp.

◆ 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

Definition at line 139 of file scenariomodel.cpp.

◆ getRootItem()

ScenarioItem * getRootItem ( )

Definition at line 239 of file scenariomodel.cpp.

+ Here is the caller graph for this function:

◆ mimeTypes()

QStringList mimeTypes ( ) const
override

Definition at line 151 of file scenariomodel.cpp.

◆ supportedDropActions()

Qt::DropActions supportedDropActions ( ) const
override

Returns the drop-Actions supported by this model.

Returns
supported drop-actions

Definition at line 134 of file scenariomodel.cpp.

◆ update()

void update ( )

Updates this model.

Definition at line 208 of file scenariomodel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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