SettingsController Class Reference

This controller manages the signals and model of the SettingsView. Any signals involving the settings need to be connected to the corresponding slots in this controller. This controller also manages settings that get saved between sessions, as well as the Executor configuration. More...

#include <ArmarXGui/gui-plugins/ScenarioManager/controller/SettingsController.h>

+ Inheritance diagram for SettingsController:

Public Slots

void addPackage (std::string name)
 Adds a new package to the settings. More...
 
void clearPidCache ()
 
void clearXmlCache ()
 
void closeUnavailablePackages ()
 
void removePackage (int row, int column, QModelIndex parent)
 Removes a package from the settings. More...
 
void setExecutorStopStrategy (std::string killMethod, int delay, std::string stopMethod)
 Configures the Executor. More...
 
void showPackageAdderView ()
 Shows a view that allows the user to add new packages. More...
 
void showSettings ()
 Shows the settings dialog. More...
 
void updateModel ()
 Updates the packages displayed in the settingsview by reloading all packages into the model. More...
 

Signals

void packageAdded (std::string name)
 Emitted when a package gets added in the settings. More...
 
void packageRemoved ()
 Emitted when a package gets removed. More...
 
void setExecutorState (int killMethodIndex, int delay, int stopStrategyIndex)
 

Public Member Functions

void init ()
 
 SettingsController (Data_Structure::PackageVectorPtr packages, Exec::ExecutorPtr executor, QObject *parent=0)
 Constructor that sets the data structure this controller operates on, the executor which gets configured by this controller and optionally the parent object. More...
 
 ~SettingsController () override
 Destructor. More...
 

Detailed Description

This controller manages the signals and model of the SettingsView. Any signals involving the settings need to be connected to the corresponding slots in this controller. This controller also manages settings that get saved between sessions, as well as the Executor configuration.

Definition at line 51 of file SettingsController.h.

Constructor & Destructor Documentation

◆ SettingsController()

SettingsController ( Data_Structure::PackageVectorPtr  packages,
Exec::ExecutorPtr  executor,
QObject *  parent = 0 
)

Constructor that sets the data structure this controller operates on, the executor which gets configured by this controller and optionally the parent object.

Parameters
packageslist of packages. Need to contain the Packages displayed in the SettingsView.
executorexecutor which gets configured by the settings
parentstandard QT option to specify a parent

Definition at line 49 of file SettingsController.cpp.

+ Here is the call graph for this function:

◆ ~SettingsController()

~SettingsController ( )
override

Destructor.

Definition at line 90 of file SettingsController.cpp.

Member Function Documentation

◆ addPackage

void addPackage ( std::string  name)
slot

Adds a new package to the settings.

Definition at line 141 of file SettingsController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearPidCache

void clearPidCache ( )
slot

Definition at line 265 of file SettingsController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearXmlCache

void clearXmlCache ( )
slot

Definition at line 270 of file SettingsController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ closeUnavailablePackages

void closeUnavailablePackages ( )
slot

Definition at line 276 of file SettingsController.cpp.

+ Here is the call graph for this function:

◆ init()

void init ( )

Definition at line 95 of file SettingsController.cpp.

+ Here is the call graph for this function:

◆ packageAdded

void packageAdded ( std::string  name)
signal

Emitted when a package gets added in the settings.

Allows other controllers to update their models with the new package.

Parameters
namename of the new package
+ Here is the caller graph for this function:

◆ packageRemoved

void packageRemoved ( )
signal

Emitted when a package gets removed.

Other packages need to update their models.

+ Here is the caller graph for this function:

◆ removePackage

void removePackage ( int  row,
int  column,
QModelIndex  parent 
)
slot

Removes a package from the settings.

Parameters
rowrow of the package
columncolumn of the package
parentindex of the package to be removed

Definition at line 166 of file SettingsController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setExecutorState

void setExecutorState ( int  killMethodIndex,
int  delay,
int  stopStrategyIndex 
)
signal
+ Here is the caller graph for this function:

◆ setExecutorStopStrategy

void setExecutorStopStrategy ( std::string  killMethod,
int  delay,
std::string  stopMethod 
)
slot

Configures the Executor.

Parameters
killMethod"StopAndKill" or "Stop"
delaylength of the delay in the StopAndKill stop-method
stopMethod"By Name" or "By Pid"

Definition at line 203 of file SettingsController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPackageAdderView

void showPackageAdderView ( )
slot

Shows a view that allows the user to add new packages.

Definition at line 136 of file SettingsController.cpp.

+ Here is the caller graph for this function:

◆ showSettings

void showSettings ( )
slot

Shows the settings dialog.

Definition at line 114 of file SettingsController.cpp.

+ Here is the call graph for this function:

◆ updateModel

void updateModel ( )
slot

Updates the packages displayed in the settingsview by reloading all packages into the model.

Definition at line 248 of file SettingsController.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: