SceneEditorConfigDialog.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package MemoryX::gui-plugins::SceneEditor
19  * @date 2015
20  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
21  * GNU General Public License
22  */
23 
24 #pragma once
25 
26 /* Qt headers */
27 #include <QDialog>
28 #include <QPointer>
29 
30 /* ArmarX headers */
35 
36 namespace Ui
37 {
38  class SceneEditorConfigDialog;
39 }
40 
41 namespace gui::dialog
42 {
43  /**
44  * This class provides a dialog derived from Qt::QDialog and armarx::ManagedIceObject.
45  * In this dialog the user has to set the necessary settings to start the plugin.
46  *
47  * @see armarx::ManagedIceObject
48  *
49  */
51  public QDialog,
52  virtual public armarx::ManagedIceObject
53  {
54  Q_OBJECT
55 
56  public:
57  /**
58  * Constructor.
59  * Creates an instance of SceneEditorConfigDialog.
60  *
61  * @param parent parent widget
62  *
63  */
64  explicit SceneEditorConfigDialog(QWidget* parent = 0);
65 
66  /**
67  * Destructor.
68  * Destroys the initial config dialog.
69  *
70  */
71  ~SceneEditorConfigDialog() override;
72 
73  /**
74  * Reimplemented armarx::ManagedIceObject:getDefaultName().
75  *
76  * @see armarx::ManagedIceObject:getDefaultName()
77  *
78  */
79  std::string getDefaultName() const override;
80 
81  /**
82  * Reimplemented armarx::ManagedIceObject:onInitComponent().
83  *
84  * @see armarx::ManagedIceObject:onInitComponent()
85  *
86  */
87  void onInitComponent() override;
88 
89  /**
90  * Reimplemented armarx::ManagedIceObject:onConnectComponent().
91  *
92  * @see armarx::ManagedIceObject:onConnectComponent()
93  *
94  */
95  void onConnectComponent() override;
96 
97  /**
98  * Reimplemented armarx::ManagedIceObject:onExitComponent().
99  *
100  * @see armarx::ManagedIceObject:onExitComponent()
101  *
102  */
103  void onExitComponent() override;
104 
105  /**
106  * Sets unic name for this widget.
107  *
108  */
109  void setIceObjectName();
110 
111  /**
112  * Returns selected WorkingMemory name
113  *
114  * @return WorkingMemory name
115  *
116  */
117  std::string getWorkingMemoryName();
118 
119  /**
120  * Returns selected WorkingMemory updates topic
121  *
122  * @return WorkingMemory updates topic
123  *
124  */
125  std::string getWorkingMemoryUpdatesTopic();
126 
127  /**
128  * Returns selected PriorKnowledge name.
129  *
130  * @return PriorMemory name
131  *
132  */
133  std::string getPriorMemoryName();
134 
135  /**
136  * Returns the full path to the selected settings file.
137  *
138  * @return file path to settings file
139  *
140  */
141  QString getSettingsFilePath();
142 
143  /**
144  * Translates all translatable strings in this dialog.
145  */
146  void retranslate();
147 
148  private slots:
149  void verifyConfiguration();
150  void fileBrowserToolButtonReleased();
151 
152  bool isTopicAvailable(std::string topicName);
153 
154  private:
155  Ui::SceneEditorConfigDialog* ui;
156 
157  QPointer<armarx::IceProxyFinderBase> workingMemoryProxyFinder;
158  QPointer<armarx::IceTopicFinder> workingMemoryUpdatesTopicFinder;
159  QPointer<armarx::IceProxyFinderBase> priorKnowledgeProxyFinder;
160  };
161 }
gui::dialog::SceneEditorConfigDialog::retranslate
void retranslate()
Translates all translatable strings in this dialog.
Definition: SceneEditorConfigDialog.cpp:153
gui::dialog::SceneEditorConfigDialog::getDefaultName
std::string getDefaultName() const override
Reimplemented armarx::ManagedIceObject:getDefaultName().
Definition: SceneEditorConfigDialog.cpp:83
gui::dialog::SceneEditorConfigDialog::getSettingsFilePath
QString getSettingsFilePath()
Returns the full path to the selected settings file.
Definition: SceneEditorConfigDialog.cpp:158
gui::dialog::SceneEditorConfigDialog::onConnectComponent
void onConnectComponent() override
Reimplemented armarx::ManagedIceObject:onConnectComponent().
Definition: SceneEditorConfigDialog.cpp:95
gui::dialog
Definition: GroupExplorerDialog.h:41
RunningTask.h
gui::dialog::SceneEditorConfigDialog::onInitComponent
void onInitComponent() override
Reimplemented armarx::ManagedIceObject:onInitComponent().
Definition: SceneEditorConfigDialog.cpp:88
gui::dialog::SceneEditorConfigDialog::~SceneEditorConfigDialog
~SceneEditorConfigDialog() override
Destructor.
Definition: SceneEditorConfigDialog.cpp:78
gui::dialog::SceneEditorConfigDialog::SceneEditorConfigDialog
SceneEditorConfigDialog(QWidget *parent=0)
Constructor.
Definition: SceneEditorConfigDialog.cpp:45
gui::dialog::SceneEditorConfigDialog
This class provides a dialog derived from Qt::QDialog and armarx::ManagedIceObject.
Definition: SceneEditorConfigDialog.h:50
Ui
ArmarX Headers.
Definition: ArmarXMainWindow.h:54
ManagedIceObject.h
gui::dialog::SceneEditorConfigDialog::getPriorMemoryName
std::string getPriorMemoryName()
Returns selected PriorKnowledge name.
Definition: SceneEditorConfigDialog.cpp:120
IceProxyFinder.h
IceManager.h
armarx::ManagedIceObject
The ManagedIceObject is the base class for all ArmarX objects.
Definition: ManagedIceObject.h:163
gui::dialog::SceneEditorConfigDialog::setIceObjectName
void setIceObjectName()
Sets unic name for this widget.
Definition: SceneEditorConfigDialog.cpp:105
gui::dialog::SceneEditorConfigDialog::getWorkingMemoryUpdatesTopic
std::string getWorkingMemoryUpdatesTopic()
Returns selected WorkingMemory updates topic.
Definition: SceneEditorConfigDialog.cpp:115
gui::dialog::SceneEditorConfigDialog::onExitComponent
void onExitComponent() override
Reimplemented armarx::ManagedIceObject:onExitComponent().
Definition: SceneEditorConfigDialog.cpp:100
gui::dialog::SceneEditorConfigDialog::getWorkingMemoryName
std::string getWorkingMemoryName()
Returns selected WorkingMemory name.
Definition: SceneEditorConfigDialog.cpp:110