LoadObjectsIntoMemoryWidgetController.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 ARCHES::gui-plugins::LoadObjectsIntoMemoryWidgetController
17  * @author Raphael Grimm ( raphael dot grimm at kit dot edu )
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 #pragma once
23 
24 #include <MemoryX/gui-plugins/LoadObjectsIntoMemory/ui_LoadObjectsIntoMemoryWidget.h>
25 
27 
31 
32 #include <MemoryX/interface/components/PriorKnowledgeInterface.h>
35 
36 namespace armarx
37 {
38  /**
39  \page MemoryX-GuiPlugins-LoadObjectsIntoMemory LoadObjectsIntoMemory
40  \brief The LoadObjectsIntoMemory allows visualizing ...
41 
42  \image html LoadObjectsIntoMemory.png
43  The user can
44 
45  API Documentation \ref LoadObjectsIntoMemoryWidgetController
46 
47  \see LoadObjectsIntoMemoryGuiPlugin
48  */
49 
50  /**
51  * \class LoadObjectsIntoMemoryWidgetController
52  * \brief LoadObjectsIntoMemoryWidgetController brief one line description
53  *
54  * Detailed description
55  */
58  public armarx::ArmarXComponentWidgetControllerTemplate < LoadObjectsIntoMemoryWidgetController >
59  {
60  Q_OBJECT
61 
62  public:
63  /**
64  * Controller Constructor
65  */
67 
68  /**
69  * Controller destructor
70  */
72 
73  /**
74  * @see ArmarXWidgetController::loadSettings()
75  */
76  void loadSettings(QSettings*) override {}
77 
78  /**
79  * @see ArmarXWidgetController::saveSettings()
80  */
81  void saveSettings(QSettings*) override {}
82 
83  /**
84  * Returns the Widget name displayed in the ArmarXGui to create an
85  * instance of this class.
86  */
87  static QString GetWidgetName()
88  {
89  return "MemoryX.LoadObjectsIntoMemory";
90  }
91 
92  /**
93  * \see armarx::Component::onInitComponent()
94  */
95  void onInitComponent() override {}
96 
97  /**
98  * \see armarx::Component::onConnectComponent()
99  */
100  void onConnectComponent() override;
101 
102 
103  virtual QPointer<QDialog> getConfigDialog(QWidget* parent) override;
104  public slots:
105  void addObjects();
106  void updateDBs();
107 
108  signals:
109  /* QT signal declarations */
110 
111  private:
112  std::string getFilesDBName()
113  {
114  const std::string ns = classesSegmentPrx->getWriteCollectionNS();
115  const size_t found = ns.find_first_of('.');
116  return (found != std::string::npos) ? ns.substr(0, found) : "";
117  }
118  /**
119  * Widget Form
120  */
121  Ui::LoadObjectsIntoMemoryWidget widget;
122 
123  QPointer<SimpleConfigDialog> dialog;
124 
125  memoryx::CommonStorageInterfacePrx databasePrx;
126  memoryx::PriorKnowledgeInterfacePrx priorPrx;
127  memoryx::PersistentObjectClassSegmentBasePrx classesSegmentPrx;
128  memoryx::GridFileManagerPtr fileManager;
129 
130  };
131 }
132 
133 
armarx::LoadObjectsIntoMemoryWidgetController::~LoadObjectsIntoMemoryWidgetController
virtual ~LoadObjectsIntoMemoryWidgetController()
Controller destructor.
Definition: LoadObjectsIntoMemoryWidgetController.h:71
armarx::LoadObjectsIntoMemoryWidgetController::loadSettings
void loadSettings(QSettings *) override
Definition: LoadObjectsIntoMemoryWidgetController.h:76
GridFileManager.h
ObjectClass.h
armarx::ArmarXComponentWidgetControllerTemplate
Definition: ArmarXComponentWidgetController.h:69
SimpleConfigDialog.h
ArmarXGuiPlugin.h
ArmarXComponentWidgetController.h
ARMARXCOMPONENT_IMPORT_EXPORT
#define ARMARXCOMPONENT_IMPORT_EXPORT
Definition: ImportExportComponent.h:38
armarx::LoadObjectsIntoMemoryWidgetController::GetWidgetName
static QString GetWidgetName()
Returns the Widget name displayed in the ArmarXGui to create an instance of this class.
Definition: LoadObjectsIntoMemoryWidgetController.h:87
armarx::LoadObjectsIntoMemoryWidgetController
LoadObjectsIntoMemoryWidgetController brief one line description.
Definition: LoadObjectsIntoMemoryWidgetController.h:56
memoryx::GridFileManagerPtr
std::shared_ptr< GridFileManager > GridFileManagerPtr
Definition: AbstractEntityWrapper.h:32
armarx::LoadObjectsIntoMemoryWidgetController::onInitComponent
void onInitComponent() override
Definition: LoadObjectsIntoMemoryWidgetController.h:95
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::LoadObjectsIntoMemoryWidgetController::saveSettings
void saveSettings(QSettings *) override
Definition: LoadObjectsIntoMemoryWidgetController.h:81
ImportExportComponent.h