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
49
50namespace 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
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
#define ARMARXCOMPONENT_IMPORT_EXPORT
This Controller manages the signals and model of the ApplicationDatabaseView.
This Controller manages the signals and model of the DetailedApplicationView.
Manages the signals and model of the OpenScenarioView.
Manages the signals and model of the ScenarioListView.
This controller manages the signals and model of the SettingsView.
Creates different instances of StopStrategy.
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
std::shared_ptr< std::vector< ScenarioManager::Data_Structure::PackagePtr > > PackageVectorPtr
Definition Package.h:123
std::shared_ptr< Executor > ExecutorPtr
Definition Executor.h:175
std::shared_ptr< ScenarioManager::Exec::StopperFactory > StopperFactoryPtr
std::shared_ptr< ScenarioManager::Exec::StarterFactory > StarterFactoryPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.