ApplicationDatabaseController Class Reference

This Controller manages the signals and model of the ApplicationDatabaseView. Item click signals in the ApplicationDatabaseView need to be connected to the on_itemClicked() slot. When an item gets clicked, this controller finds out whether an Application or a Package was clicked and specifically which Application or Package it was. It then sends a signal with a pointer to the clicked object. More...

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

+ Inheritance diagram for ApplicationDatabaseController:

Public Slots

void on_itemClicked (const QModelIndex &index)
 Finds out whether an Application or a Scenario has been clicked and sends a signal with the corresponding object. More...
 
void updatePackages ()
 Updates the packages displayed in the ApplicationDatabaseView by reloading all packages and applications into the model. More...
 

Signals

void applicationClicked (Data_Structure::ApplicationPtr app)
 Gets emitted after an Application has been clicked in the ApplicationDatabaseView. More...
 
void modelUpdated (FilterableTreeModelSortFilterProxyModelPtr model)
 
void packageClicked (Data_Structure::PackagePtr package)
 Gets emitted after a Package gets clicked in the ApplicationDatabaseView. More...
 

Public Member Functions

 ApplicationDatabaseController (Data_Structure::PackageVectorPtr packages, Exec::ExecutorPtr executor, QObject *parent=0)
 Constructor that takes the data structure this controller operates on and optionally the parent object. More...
 
FilterableTreeModelSortFilterProxyModelPtr getModel ()
 Returns the model used by the ApplicationDatabaseView and managed by this controller. More...
 
 ~ApplicationDatabaseController () override
 

Detailed Description

This Controller manages the signals and model of the ApplicationDatabaseView. Item click signals in the ApplicationDatabaseView need to be connected to the on_itemClicked() slot. When an item gets clicked, this controller finds out whether an Application or a Package was clicked and specifically which Application or Package it was. It then sends a signal with a pointer to the clicked object.

Definition at line 49 of file ApplicationDatabaseController.h.

Constructor & Destructor Documentation

◆ ApplicationDatabaseController()

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

Constructor that takes the data structure this controller operates on and optionally the parent object.

Parameters
packageslist of packages. Need to contain the Packages and Applications displayed in the ApplicationDatabaseView.
executorexecutor used to start, stop and update status of the Applications and Scenarios.
parentstandard QT option to specify a parent

Definition at line 40 of file ApplicationDatabaseController.cpp.

◆ ~ApplicationDatabaseController()

Definition at line 55 of file ApplicationDatabaseController.cpp.

Member Function Documentation

◆ applicationClicked

void applicationClicked ( Data_Structure::ApplicationPtr  app)
signal

Gets emitted after an Application has been clicked in the ApplicationDatabaseView.

Parameters
appclicked Application

◆ getModel()

Returns the model used by the ApplicationDatabaseView and managed by this controller.

Returns
managed model

Definition at line 60 of file ApplicationDatabaseController.cpp.

◆ modelUpdated

void modelUpdated ( FilterableTreeModelSortFilterProxyModelPtr  model)
signal
+ Here is the caller graph for this function:

◆ on_itemClicked

void on_itemClicked ( const QModelIndex &  index)
slot

Finds out whether an Application or a Scenario has been clicked and sends a signal with the corresponding object.

Parameters
indexmodel-index of the clicked object

Definition at line 98 of file ApplicationDatabaseController.cpp.

+ Here is the call graph for this function:

◆ packageClicked

void packageClicked ( Data_Structure::PackagePtr  package)
signal

Gets emitted after a Package gets clicked in the ApplicationDatabaseView.

Parameters
packageclicked Package
+ Here is the caller graph for this function:

◆ updatePackages

void updatePackages ( )
slot

Updates the packages displayed in the ApplicationDatabaseView by reloading all packages and applications into the model.

Definition at line 65 of file ApplicationDatabaseController.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: