Manages the signals and model of the ScenarioListView.
More...
#include <ArmarXGui/gui-plugins/ScenarioManager/controller/ScenarioListController.h>
|
| void | addApplicationsToScenario (QList< QPair< QString, ScenarioManager::Data_Structure::Application * > > applications, int row, const QModelIndex &parent) |
| | Adds applications to a scenario.
|
| |
| void | createdScenario (std::string name, std::string package) |
| | Creates a new scenario in the package.
|
| |
| void | createScenario () |
| | Shows a view that allows the user to create a new Scenario.
|
| |
| void | refreshNow () |
| | Rebuilds the tree straight away instead of waiting for the next status poll, so that the button of a just requested operation greys out on this event loop turn.
|
| |
| void | removeItem (QModelIndex item) |
| | Removes an item from the model.
|
| |
| void | restart (int row, int column, QModelIndex parent) |
| | Restarts the object in the specified location.
|
| |
| void | saveScenario (ScenarioManager::Data_Structure::ApplicationInstancePtr application) |
| |
| void | setIceAdmin (IceGrid::AdminPrx iceAdmin) |
| | Set an IceAdmin for the controller.
|
| |
| void | showApplication (const QModelIndex &index) |
| | Calculates the object at the given index and signals to show it.
|
| |
| 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 | stopUpdateTask () |
| |
| void | updateModel () |
| | Updates the model by reloading all scenarios and applications.
|
| |
| void | updateStati () |
| | Updates the statuses of all Applications and Scenarios.
|
| |
| void | updateStati (ApplicationInstanceStatusMap stati) |
| |
Manages the signals and model of the ScenarioListView.
All signals emitted by the ScenarioListView need to be connected to their corresponding slots in this controller. This controller periodically refreshes the status of the Applications and Scenarios displayed in the ScenarioListView.
◆ ScenarioListController()
Constructor which sets the data structure, the executor and optionally the parent object.
- Parameters
-
| packages | list of packages. Need to contain the Scenarios and Applications displayed in the ScenarioListView. |
| executor | executor used to start, stop and update status of the Applications and Scenarios. |
| parent | standard QT option to specify a parent |
◆ ~ScenarioListController()
◆ addApplicationsToScenario
Adds applications to a scenario.
- Parameters
-
| applications | list of applications to be added |
| row | |
| parent | model-index of the scenario |
◆ applicationInstanceClicked
◆ createdScenario
| void createdScenario |
( |
std::string | name, |
|
|
std::string | package ) |
|
slot |
Creates a new scenario in the package.
- Parameters
-
| name | name of the new scenario |
| package | name of the package |
◆ createScenario
Shows a view that allows the user to create a new Scenario.
This scenario will then be added to the data structure and models.
◆ fetchStati()
fetches application stati over their designated strategy.
This is potentially slow and should not be done in the GUI thread.
◆ getTreeModel()
Returns the model used by the ScenarioListView and managed by this controller.
- Returns
- managed model
◆ modelUpdated
◆ refreshNow
Rebuilds the tree straight away instead of waiting for the next status poll, so that the button of a just requested operation greys out on this event loop turn.
◆ removeItem
| void removeItem |
( |
QModelIndex | item | ) |
|
|
slot |
Removes an item from the model.
Can either be an ApplicationInstance or an Scenario
- Parameters
-
| index | of the model to be removed |
◆ restart
| void restart |
( |
int | row, |
|
|
int | column, |
|
|
QModelIndex | parent ) |
|
slot |
Restarts the object in the specified location.
- Parameters
-
| row | row the object is in |
| column | column the object is in |
| parent | parent of the object. Needed to differentiate between scenarios and applications. |
- See also
- start_stop(int row, int column, QModelIndex parent);
◆ saveScenario
◆ scenarioClicked
Gets emitted after a Scenario has been clicked.
- Parameters
-
◆ setIceAdmin
| void setIceAdmin |
( |
IceGrid::AdminPrx | iceAdmin | ) |
|
|
slot |
Set an IceAdmin for the controller.
Needet to start an application via ice
- Parameters
-
◆ showApplication
| void showApplication |
( |
const QModelIndex & | index | ) |
|
|
slot |
Calculates the object at the given index and signals to show it.
- Parameters
-
◆ start
| void start |
( |
int | row, |
|
|
int | column, |
|
|
QModelIndex | parent ) |
|
slot |
Starts or stops the object in the specified location.
- Parameters
-
| row | row the object is in |
| column | column the object is in |
| parent | parent of the object. Needed to differentiate between scenarios and applications. |
◆ StartScenario()
◆ statusFetched
◆ statusUpdated
Gets emitted after changes have been made to the States of the Applications.
The DetailedApplicationView should update.
◆ stop
| void stop |
( |
int | row, |
|
|
int | column, |
|
|
QModelIndex | parent ) |
|
slot |
◆ stopUpdateTask
◆ updated
Gets emitted after changes have been made to the data structure.
Other controllers should update their models.
◆ updateModel
Updates the model by reloading all scenarios and applications.
◆ updateStati [1/2]
Updates the statuses of all Applications and Scenarios.
◆ updateStati [2/2]
The documentation for this class was generated from the following files: