Go to the documentation of this file.
28 #include "../gui/treemodel.h"
51 QVariant
data(
const QModelIndex&
index,
int role)
const override;
64 Qt::ItemFlags
flags(
const QModelIndex&
index)
const override;
75 int row,
int column,
const QModelIndex&
parent)
override;
90 void clear()
override;
95 static int FindScenarioIndex(
const QAbstractItemModel* model,
const QString& scenarioName);
101 void applicationsDrop(QList<QPair<QString, ScenarioManager::Data_Structure::Application*>> applications,
102 int row,
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)