94 IceGrid::AdminPrx iceAdmin);
161 void start(
int row,
int column, QModelIndex parent);
169 void stop(
int row,
int column, QModelIndex parent);
179 void restart(
int row,
int column, QModelIndex parent);
188 QList<QPair<QString, ScenarioManager::Data_Structure::Application*>> applications,
190 const QModelIndex& parent);
208 int findScenario(
ScenarioItem* rootItem, std::string name, std::string packageName);
209 QModelIndex findSubScenarioModelIndex(std::string scenarioName, std::string packageName);
210 QModelIndex findApplicationModelIndex(
212 QModelIndex findSubScenarioModelIndexByScenarioIndex(QModelIndex scenarioIndex,
213 std::string packageName);
216 ShowWarningDialog(QString message,
bool showOnce =
false, QString messageId =
"");
223 std::vector<ApplicationInstancePtr> applicationInstances;
224 std::mutex applicationInstanceMutex;
226 static constexpr std::chrono::seconds FoundUpdateInterval{5};
227 std::chrono::steady_clock::time_point lastFoundUpdate;
230 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 refreshNow()
Rebuilds the tree straight away instead of waiting for the next status poll, so that the button of a ...
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