Skip to content
Snippets Groups Projects
Commit de620594 authored by Peter Albrecht's avatar Peter Albrecht
Browse files

Remove icon finder utility

parent b7bde1de
No related branches found
No related tags found
1 merge request!406Refactor skill memory GUI
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
#include <QWidget> #include <QWidget>
#include <ArmarXCore/core/exceptions/local/ExpressionException.h> #include <ArmarXCore/core/exceptions/local/ExpressionException.h>
#include <ArmarXCore/core/system/ArmarXDataPath.h>
void void
armarx::gui::clearLayout(QLayout* layout) armarx::gui::clearLayout(QLayout* layout)
...@@ -110,22 +109,3 @@ armarx::gui::clearSplitter(QSplitter* splitter) ...@@ -110,22 +109,3 @@ armarx::gui::clearSplitter(QSplitter* splitter)
splitter->widget(i)->deleteLater(); splitter->widget(i)->deleteLater();
} }
} }
QIcon
armarx::gui::getIcon(std::string name)
{
// is the path already found?
if (armarXGuiPath.empty())
{
std::scoped_lock l(m_armarXGuiPath);
armarXGuiPath =
"$ARMARX_WORKSPACE/armarx/ArmarXGui/source/ArmarXGui/libraries/ArmarXGuiBase/icons/";
ArmarXDataPath::ReplaceEnvVars(armarXGuiPath);
}
// now we can use the path!
// we don't check the QIcon for validity, since an invalid icon can be safely used in the gui
QPixmap pix(QString::fromStdString(armarXGuiPath + name));
return QIcon(pix);
}
...@@ -13,17 +13,6 @@ ...@@ -13,17 +13,6 @@
namespace armarx::gui namespace armarx::gui
{ {
// we only need to fetch the path once => fetch once, use many times
static std::string armarXGuiPath = "";
static std::mutex m_armarXGuiPath;
/**
* @brief Get an icon in ArmarXGuiBase.
* @param name The name of the icon.
* @return The icon. Empty icon if not found.
*/
QIcon getIcon(std::string name);
/** /**
* @brief Clear a layout. * @brief Clear a layout.
* *
......
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