ScenarioManagerWidgetController.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package ScenarioManager::gui-plugins::ScenarioManagerWidgetController
17  * @author [Cedric Seehausen] ( [usdnr@student.kit.edu] )
18  * @date 2016
19  * @copyright http://www.gnu.org/licenses/gpl.txt
20  * GNU General Public License
21  */
22 
23 #pragma once
24 
25 #include <memory>
26 #include <string>
27 #include <vector>
28 
29 #include <QToolBar>
30 
36 
37 #include <ArmarXGui/gui-plugins/ScenarioManager/gui/ui_ScenarioManagerWidget.h>
41 
48 #include "gui/scenariolistview.h"
49 
50 namespace armarx
51 {
52  /**
53  * @class ScenarioManagerWidgetController
54  * @ingroup ArmarXGuiPlugins
55  * @brief ScenarioManagerWidgetController brief one line description
56  *
57  * Detailed description
58  */
60  public ArmarXComponentWidgetControllerTemplate<ScenarioManagerWidgetController>
61  {
62  Q_OBJECT
63 
64  public:
65  /**
66  * Controller Constructor
67  */
69 
70  /**
71  * Controller destructor
72  */
74 
75  /**
76  * @see ArmarXWidgetController::loadSettings()
77  */
78  void loadSettings(QSettings* settings) override;
79 
80  /**
81  * @see ArmarXWidgetController::saveSettings()
82  */
83  void saveSettings(QSettings* settings) override;
84 
85  /**
86  * Returns the Widget name displayed in the ArmarXGui to create an
87  * instance of this class.
88  */
89  static QString
91  {
92  return "Meta.ScenarioManager";
93  }
94 
95  /**
96  * @see armarx::Component::onInitComponent()
97  */
98  void onInitComponent() override;
99 
100  /**
101  * @see armarx::Component::onConnectComponent()
102  */
103  void onConnectComponent() override;
104 
105  void onExitComponent() override;
106 
107  public slots:
108  /* QT slot declarations */
109  void reparsePackages();
110  void reparsePackage(std::string name);
111  void updateModels();
112  void editMode(bool edit);
113 
114  signals:
115  /* QT signal declarations */
116 
117  private slots:
118  //used to force Qt main thread to init this plugin
119  void init();
120 
121  private:
122  /**
123  * Widget Form
124  */
125  Ui::ScenarioManagerWidget widget;
126 
127 
128  ScenarioManager::Exec::StopStrategyFactory stopStrategyFactory;
131 
132 
135 
141  QAction* editModeAction;
142  QSettings settings;
143  QPointer<QToolBar> customToolbar;
144 
145  void autoDiscoverArmarXPackages();
146 
147  const std::string settingsFile;
148  // ArmarXWidgetController interface
149  public:
150  QPointer<QWidget> getCustomTitlebarWidget(QWidget* parent) override;
151  // ArmarXWidgetController interface
152  public:
153  static QIcon
155  {
156  return QIcon(":icons/ArmarX_Play_Store.svg");
157  }
158 
159  private:
160  bool isPackageAutoDiscoveryEnabled();
161  };
162 } // namespace armarx
ScenarioManager::Controller::SettingsController
This controller manages the signals and model of the SettingsView. Any signals involving the settings...
Definition: SettingsController.h:54
SettingsController.h
ScenarioManager::Controller::ScenarioListController
Manages the signals and model of the ScenarioListView. All signals emitted by the ScenarioListView ne...
Definition: ScenarioListController.h:59
scenariolistview.h
StopperFactory.h
ScenarioManager::Exec::StarterFactoryPtr
std::shared_ptr< ScenarioManager::Exec::StarterFactory > StarterFactoryPtr
Definition: StarterFactory.h:58
ScenarioManager::Exec::ExecutorPtr
std::shared_ptr< Executor > ExecutorPtr
Definition: Executor.h:175
ScenarioManager::Data_Structure::PackageVectorPtr
std::shared_ptr< std::vector< ScenarioManager::Data_Structure::PackagePtr > > PackageVectorPtr
Definition: Package.h:124
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
armarx::ScenarioManagerWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: ScenarioManagerWidgetController.h:90
openscenariocontroller.h
ArmarXGuiPlugin.h
ScenarioManager::Exec::StopperFactoryPtr
std::shared_ptr< ScenarioManager::Exec::StopperFactory > StopperFactoryPtr
Definition: StopperFactory.h:65
ScenarioManager::Exec::StopStrategyFactory
Creates different instances of StopStrategy. This Factory creates different types of stop-strategies.
Definition: StopStrategyFactory.h:39
Package.h
applicationdatabaseview.h
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
ScenarioManager::Controller::ApplicationDatabaseController
This Controller manages the signals and model of the ApplicationDatabaseView. Item click signals in t...
Definition: ApplicationDatabaseController.h:50
ApplicationDatabaseController.h
armarx::ScenarioManagerWidgetController::GetWidgetIcon
static QIcon GetWidgetIcon()
Definition: ScenarioManagerWidgetController.h:154
armarx::ScenarioManagerWidgetController
ScenarioManagerWidgetController brief one line description.
Definition: ScenarioManagerWidgetController.h:59
ScenarioManager::Controller::DetailedApplicationController
This Controller manages the signals and model of the DetailedApplicationView. This controller gets no...
Definition: DetailedApplicationController.h:54
qttreepropertybrowser.h
StopStrategyFactory.h
ScenarioManager::Controller::OpenScenarioController
Manages the signals and model of the OpenScenarioView. This Controller manages opening and loading in...
Definition: openscenariocontroller.h:51
ScenarioListController.h
DetailedApplicationController.h
StarterFactory.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27
ImportExportComponent.h