Skip to content
Snippets Groups Projects
Commit 7faa3df7 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Rename class to LayerInfoTree

parent f29068c4
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@
#include <Inventor/nodes/SoSeparator.h>
#include "LayerInfoTreeWidget.h"
#include "LayerInfoTree.h"
namespace armarx
......@@ -177,7 +177,7 @@ namespace armarx
armarx::viz::StorageInterfacePrx storage;
armarx::viz::CoinVisualizer visualizer;
armarx::LayerInfoTreeWidget layerInfoTree;
armarx::LayerInfoTree layerInfoTree;
viz::data::RecordingSeq allRecordings;
......
......@@ -12,7 +12,7 @@ set(SOURCES
ArVizWidgetController.cpp
LayerInfoTreeModel.cpp
LayerInfoTreeWidget.cpp
LayerInfoTree.cpp
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@GuiPlugin.cpp @COMPONENT_PATH@/@COMPONENT_NAME@WidgetController.cpp
)
......@@ -22,7 +22,7 @@ set(HEADERS
ArVizWidgetController.h
LayerInfoTreeModel.h
LayerInfoTreeWidget.h
LayerInfoTree.h
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@GuiPlugin.h @COMPONENT_PATH@/@COMPONENT_NAME@WidgetController.h
)
......
#include "LayerInfoTreeWidget.h"
#include "LayerInfoTree.h"
#include <ArmarXCore/core/logging/Logging.h>
#include <ArmarXCore/core/exceptions/local/ExpressionException.h>
......@@ -18,16 +18,16 @@
namespace armarx
{
LayerInfoTreeWidget::LayerInfoTreeWidget()
LayerInfoTree::LayerInfoTree()
{
}
void LayerInfoTreeWidget::setWidget(QTreeWidget* widget)
void LayerInfoTree::setWidget(QTreeWidget* widget)
{
this->widget = widget;
}
void LayerInfoTreeWidget::registerVisualizerCallbacks(viz::CoinVisualizer& visualizer)
void LayerInfoTree::registerVisualizerCallbacks(viz::CoinVisualizer& visualizer)
{
visualizer.layerUpdatedCallbacks.emplace_back(
[this](const viz::CoinLayerID & layerID, const viz::CoinLayer & layer)
......@@ -40,14 +40,14 @@ namespace armarx
});
}
void LayerInfoTreeWidget::setSelectedLayer(viz::CoinLayerID id, viz::CoinLayer* layer)
void LayerInfoTree::setSelectedLayer(viz::CoinLayerID id, viz::CoinLayer* layer)
{
this->layerID = id;
this->layer = layer;
refresh();
}
void LayerInfoTreeWidget::refresh()
void LayerInfoTree::refresh()
{
widget->clear();
if (!layer)
......@@ -63,7 +63,7 @@ namespace armarx
}
void LayerInfoTreeWidget::update()
void LayerInfoTree::update()
{
for (auto& [name, element] : layer->elements)
{
......@@ -75,7 +75,7 @@ namespace armarx
}
void LayerInfoTreeWidget::updateLayerElement(
void LayerInfoTree::updateLayerElement(
const std::string& name, const viz::CoinLayerElement& element, bool recursive)
{
nlohmann::json json;
......@@ -109,7 +109,7 @@ namespace armarx
}
}
void LayerInfoTreeWidget::updateJsonChildren(QTreeWidgetItem* item, const nlohmann::json& json, bool recursive)
void LayerInfoTree::updateJsonChildren(QTreeWidgetItem* item, const nlohmann::json& json, bool recursive)
{
auto updateChild = [&](QTreeWidgetItem * child, const std::string & key, const nlohmann::json & value)
{
......@@ -195,7 +195,7 @@ namespace armarx
}
}
QVariant LayerInfoTreeWidget::getValuePreview(const nlohmann::json& json) const
QVariant LayerInfoTree::getValuePreview(const nlohmann::json& json) const
{
std::stringstream ss;
......@@ -234,7 +234,7 @@ namespace armarx
}
}
QWidget* LayerInfoTreeWidget::getValueWidget(const nlohmann::json& json) const
QWidget* LayerInfoTree::getValueWidget(const nlohmann::json& json) const
{
switch (json.type())
{
......@@ -273,7 +273,7 @@ namespace armarx
}
}
void LayerInfoTreeWidget::updateValueWidget(const nlohmann::json& json, QWidget* widget) const
void LayerInfoTree::updateValueWidget(const nlohmann::json& json, QWidget* widget) const
{
switch (json.type())
{
......@@ -314,7 +314,7 @@ namespace armarx
}
}
void armarx::LayerInfoTreeWidget::setItemValue(QTreeWidgetItem* item, const nlohmann::json& json, int column)
void armarx::LayerInfoTree::setItemValue(QTreeWidgetItem* item, const nlohmann::json& json, int column)
{
if (QWidget* w = widget->itemWidget(item, column))
{
......@@ -330,7 +330,7 @@ namespace armarx
}
}
QTreeWidgetItem* LayerInfoTreeWidget::findTopLevelItem(const std::string& text, int column)
QTreeWidgetItem* LayerInfoTree::findTopLevelItem(const std::string& text, int column)
{
QList<QTreeWidgetItem*> foundItems = widget->findItems(text.c_str(), Qt::MatchFlag::MatchExactly, column);
for (auto* item : foundItems)
......@@ -343,7 +343,7 @@ namespace armarx
return nullptr;
}
bool LayerInfoTreeWidget::isMetaKey(const std::string& key)
bool LayerInfoTree::isMetaKey(const std::string& key)
{
return key.substr(0, 2) == "__" && key.substr(key.size() - 2) == "__";
}
......
......@@ -9,14 +9,14 @@
namespace armarx
{
class LayerInfoTreeWidget : public QObject
class LayerInfoTree : public QObject
{
Q_OBJECT
public:
LayerInfoTreeWidget();
virtual ~LayerInfoTreeWidget() = default;
LayerInfoTree();
virtual ~LayerInfoTree() = default;
void setWidget(QTreeWidget* treeWidget);
void registerVisualizerCallbacks(viz::CoinVisualizer& visualizer);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment