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 <vector>
26 #include <string>
27 
28 #include <ArmarXGui/gui-plugins/ScenarioManager/gui/ui_ScenarioManagerWidget.h>
29 
32 
34 #include "gui/scenariolistview.h"
36 
38 
44 #include <memory>
45 
49 
51 
52 #include <QToolBar>
53 
54 namespace armarx
55 {
56  /**
57  * @class ScenarioManagerWidgetController
58  * @ingroup ArmarXGuiPlugins
59  * @brief ScenarioManagerWidgetController brief one line description
60  *
61  * Detailed description
62  */
65  public ArmarXComponentWidgetControllerTemplate<ScenarioManagerWidgetController>
66  {
67  Q_OBJECT
68 
69  public:
70  /**
71  * Controller Constructor
72  */
74 
75  /**
76  * Controller destructor
77  */
79 
80  /**
81  * @see ArmarXWidgetController::loadSettings()
82  */
83  void loadSettings(QSettings* settings) override;
84 
85  /**
86  * @see ArmarXWidgetController::saveSettings()
87  */
88  void saveSettings(QSettings* settings) override;
89 
90  /**
91  * Returns the Widget name displayed in the ArmarXGui to create an
92  * instance of this class.
93  */
94  static QString GetWidgetName()
95  {
96  return "Meta.ScenarioManager";
97  }
98 
99  /**
100  * @see armarx::Component::onInitComponent()
101  */
102  void onInitComponent() override;
103 
104  /**
105  * @see armarx::Component::onConnectComponent()
106  */
107  void onConnectComponent() override;
108 
109  void onExitComponent() override;
110 
111  public slots:
112  /* QT slot declarations */
113  void reparsePackages();
114  void reparsePackage(std::string name);
115  void updateModels();
116  void editMode(bool edit);
117 
118  signals:
119  /* QT signal declarations */
120 
121  private slots:
122  //used to force Qt main thread to init this plugin
123  void init();
124  private:
125  /**
126  * Widget Form
127  */
128  Ui::ScenarioManagerWidget widget;
129 
130 
131  ScenarioManager::Exec::StopStrategyFactory stopStrategyFactory;
134 
135 
138 
144  QAction* editModeAction;
145  QSettings settings;
146  QPointer<QToolBar> customToolbar;
147 
148  void autoDiscoverArmarXPackages();
149 
150  const std::string settingsFile;
151  // ArmarXWidgetController interface
152  public:
153  QPointer<QWidget> getCustomTitlebarWidget(QWidget* parent) override;
154  // ArmarXWidgetController interface
155  public:
156  static QIcon GetWidgetIcon()
157  {
158  return QIcon(":icons/ArmarX_Play_Store.svg");
159  }
160 
161  private:
162  bool isPackageAutoDiscoveryEnabled();
163 
164  };
165 }
ScenarioManager::Controller::SettingsController
This controller manages the signals and model of the SettingsView. Any signals involving the settings...
Definition: SettingsController.h:51
SettingsController.h
ScenarioManager::Controller::ScenarioListController
Manages the signals and model of the ScenarioListView. All signals emitted by the ScenarioListView ne...
Definition: ScenarioListController.h:57
scenariolistview.h
StopperFactory.h
ScenarioManager::Exec::StarterFactoryPtr
std::shared_ptr< ScenarioManager::Exec::StarterFactory > StarterFactoryPtr
Definition: StarterFactory.h:56
ScenarioManager::Exec::ExecutorPtr
std::shared_ptr< Executor > ExecutorPtr
Definition: Executor.h:164
ScenarioManager::Data_Structure::PackageVectorPtr
std::shared_ptr< std::vector< ScenarioManager::Data_Structure::PackagePtr > > PackageVectorPtr
Definition: Package.h:122
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:94
openscenariocontroller.h
ArmarXGuiPlugin.h
ScenarioManager::Exec::StopperFactoryPtr
std::shared_ptr< ScenarioManager::Exec::StopperFactory > StopperFactoryPtr
Definition: StopperFactory.h:62
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:49
ApplicationDatabaseController.h
armarx::ScenarioManagerWidgetController::GetWidgetIcon
static QIcon GetWidgetIcon()
Definition: ScenarioManagerWidgetController.h:156
armarx::ScenarioManagerWidgetController
ScenarioManagerWidgetController brief one line description.
Definition: ScenarioManagerWidgetController.h:63
ScenarioManager::Controller::DetailedApplicationController
This Controller manages the signals and model of the DetailedApplicationView. This controller gets no...
Definition: DetailedApplicationController.h:52
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:48
ScenarioListController.h
DetailedApplicationController.h
StarterFactory.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
ImportExportComponent.h