Go to the documentation of this file.
32 #include "../gui/treemodel.h"
53 QVariant
data(
const QModelIndex&
index,
int role)
const override;
66 Qt::ItemFlags
flags(
const QModelIndex&
index)
const override;
77 Qt::DropAction action,
80 const QModelIndex&
parent)
override;
95 void clear()
override;
100 static int FindScenarioIndex(
const QAbstractItemModel* model,
const QString& scenarioName);
107 QList<QPair<QString, ScenarioManager::Data_Structure::Application*>> applications,
109 const QModelIndex&
parent);
TreeItem representing data contained in a Scenario or an Application.
static int FindScenarioIndex(const QAbstractItemModel *model, const QString &scenarioName)
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
Qt::DropActions supportedDropActions() const override
Returns the drop-Actions supported by this model.
Model defining how a Scenario gets displayed in the TreeView.
ScenarioModel()
Sets up the 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.
void clear() override
Clears and resets this model.
QModelIndex parent(const QModelIndex &index) const override
ScenarioItem * getRootItem()
void update()
Updates this model.
QStringList mimeTypes() const override
std::shared_ptr< ScenarioModel > ScenarioModelPtr
static ScenarioItem * FindScenario(const QAbstractItemModel *model, const QString &scenarioName)
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags of the item at the given index.
void applicationsDrop(QList< QPair< QString, ScenarioManager::Data_Structure::Application * >> applications, int row, const QModelIndex &parent)