93 IceGrid::AdminPrx iceAdmin);
160 void start(
int row,
int column, QModelIndex parent);
161 void stop(
int row,
int column, QModelIndex parent);
171 void restart(
int row,
int column, QModelIndex parent);
180 QList<QPair<QString, ScenarioManager::Data_Structure::Application*>> applications,
182 const QModelIndex& parent);
200 int findScenario(
ScenarioItem* rootItem, std::string name, std::string packageName);
201 QModelIndex findSubScenarioModelIndex(std::string scenarioName, std::string packageName);
202 QModelIndex findApplicationModelIndex(
204 QModelIndex findSubScenarioModelIndexByScenarioIndex(QModelIndex scenarioIndex,
205 std::string packageName);
208 ShowWarningDialog(QString message,
bool showOnce =
false, QString messageId =
"");
215 std::vector<ApplicationInstancePtr> applicationInstances;
216 std::mutex applicationInstanceMutex;
219 IceGrid::AdminPrx iceAdmin;
View that allows user to create a new scenario.
TreeItem representing data contained in a Scenario or an Application.
void saveScenario(ScenarioManager::Data_Structure::ApplicationInstancePtr application)
void restart(int row, int column, QModelIndex parent)
Restarts the object in the specified location.
static bool StartScenario(ScenarioManager::Data_Structure::ScenarioPtr scenario, Exec::ExecutorPtr executor, IceGrid::AdminPrx iceAdmin)
~ScenarioListController() override
Destructor.
void updated()
Gets emitted after changes have been made to the data structure.
void applicationInstanceClicked(Data_Structure::ApplicationInstancePtr appInstance, ScenarioItem *item)
Gets emitted after an ApplicationInstance has been clicked.
void start(int row, int column, QModelIndex parent)
Starts or stops the object in the specified location.
void stop(int row, int column, QModelIndex parent)
void setIceAdmin(IceGrid::AdminPrx iceAdmin)
Set an IceAdmin for the controller.
void modelUpdated(FilterableTreeModelSortFilterProxyModelPtr model)
void updateModel()
Updates the model by reloading all scenarios and applications.
void createScenario()
Shows a view that allows the user to create a new Scenario.
void scenarioClicked(Data_Structure::ScenarioPtr scenario)
Gets emitted after a Scenario has been clicked.
void addApplicationsToScenario(QList< QPair< QString, ScenarioManager::Data_Structure::Application * > > applications, int row, const QModelIndex &parent)
Adds applications to a scenario.
void fetchStati()
fetches application stati over their designated strategy.
void createdScenario(std::string name, std::string package)
Creates a new scenario in the package.
FilterableTreeModelSortFilterProxyModelPtr getTreeModel()
Returns the model used by the ScenarioListView and managed by this controller.
ScenarioListController(Data_Structure::PackageVectorPtr packages, Exec::ExecutorPtr executor, QObject *parent=0)
Constructor which sets the data structure, the executor and optionally the parent object.
void removeItem(QModelIndex item)
Removes an item from the model.
void updateStati()
Updates the statuses of all Applications and Scenarios.
void statusFetched(ApplicationInstanceStatusMap stati)
void statusUpdated()
Gets emitted after changes have been made to the States of the Applications.
void showApplication(const QModelIndex &index)
Calculates the object at the given index and signals to show it.
Model defining how a Scenario gets displayed in the TreeView.
Base Class for all Logging classes.
IceUtil::Handle< PeriodicTask< T > > pointer_type
Shared pointer type for convenience.
std::shared_ptr< FilterableTreeModelSortFilterProxyModel > FilterableTreeModelSortFilterProxyModelPtr
std::map< ApplicationInstancePtr, std::string > ApplicationInstanceStatusMap
std::shared_ptr< Scenario > ScenarioPtr
std::shared_ptr< std::vector< ScenarioManager::Data_Structure::PackagePtr > > PackageVectorPtr
std::shared_ptr< ApplicationInstance > ApplicationInstancePtr
std::shared_ptr< Executor > ExecutorPtr