From 9aac9a930171ea9ef69d2aa3acac23447a46bc18 Mon Sep 17 00:00:00 2001 From: Raphael <ufdrv@student.kit.edu> Date: Sun, 18 Jun 2017 09:28:50 +0200 Subject: [PATCH] add icons to the HomogeneousMatrixCalculator gui plugin --- .../HomogeneousMatrixCalculator/CMakeLists.txt | 4 ++++ .../HomogeneousMatrixCalculatorWidgetController.h | 11 +++++++++++ .../gui-plugins/HomogeneousMatrixCalculator/icons.qrc | 5 +++++ .../icons/htmx_calc_icon.svg | 2 ++ 4 files changed, 22 insertions(+) create mode 100644 source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/icons.qrc create mode 100644 source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/icons/htmx_calc_icon.svg diff --git a/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/CMakeLists.txt b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/CMakeLists.txt index 11fcc53e3..2109b79f7 100644 --- a/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/CMakeLists.txt +++ b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/CMakeLists.txt @@ -27,9 +27,13 @@ set(GUI_UIS HomogeneousMatrixCalculatorWidget.ui ) +QT4_ADD_RESOURCES( QT_RC_SRCS icons.qrc ) +list(APPEND SOURCES ${QT_RC_SRCS}) + # Add more libraries you depend on here, e.g. ${QT_LIBRARIES}. set(COMPONENT_LIBS ${QT_LIBRARIES} ${Simox_LIBRARIES}) if(ArmarXGui_FOUND) + install(DIRECTORY icons/ DESTINATION share/${PROJECT_NAME} COMPONENT data) armarx_gui_library(HomogeneousMatrixCalculatorGuiPlugin "${SOURCES}" "${GUI_MOC_HDRS}" "${GUI_UIS}" "" "${COMPONENT_LIBS}") endif() diff --git a/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/HomogeneousMatrixCalculatorWidgetController.h b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/HomogeneousMatrixCalculatorWidgetController.h index 996e6dfb3..c1389400c 100644 --- a/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/HomogeneousMatrixCalculatorWidgetController.h +++ b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/HomogeneousMatrixCalculatorWidgetController.h @@ -99,6 +99,17 @@ namespace armarx virtual void onConnectComponent(); Eigen::Matrix4d getMatrix(); + + virtual QIcon getWidgetIcon() const override + { + return QIcon(":/htmxcalc/icons/htmx_calc_icon.svg"); + } + + virtual QIcon getWidgetCategoryIcon() const + { + return QIcon("://icons/tools.svg"); + } + public slots: /* QT slot declarations */ diff --git a/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/icons.qrc b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/icons.qrc new file mode 100644 index 000000000..89003d0d8 --- /dev/null +++ b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/icons.qrc @@ -0,0 +1,5 @@ +<RCC> + <qresource prefix="/htmxcalc"> + <file>icons/htmx_calc_icon.svg</file> + </qresource> +</RCC> diff --git a/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/icons/htmx_calc_icon.svg b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/icons/htmx_calc_icon.svg new file mode 100644 index 000000000..0e446e03e --- /dev/null +++ b/source/RobotAPI/gui-plugins/HomogeneousMatrixCalculator/icons/htmx_calc_icon.svg @@ -0,0 +1,2 @@ +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" width="455px" height="455px" version="1.1" content="<mxfile userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0" version="6.8.3" editor="www.draw.io" type="device"><diagram id="bda5b431-a82e-ac56-fdfa-b32d1ed302d5" name="Page-1">7ZdNc5swEIZ/DcdkkDCxfWycpL20hyQzPXZUEKCJpGXEOuD++kpB5rOe9EDq6SQ+2OyrXbS8jzAiiHaq+WxYWXyFlMuAhmkTRDcBpWRLtvbHKQevxDFtldyI1Gu98CB+cS+GXt2LlFejRASQKMqxmIDWPMGRxoyBepyWgRzPWrKcz4SHhMm5+l2kWLTqJgx7/QsXeYGTgZ8secoN7LWfLqBR9vJphxU7nsrnVwVLoR5I0W0Q7QwAtkeq2XHpvD261tbdnRjt2jZc498UXPmKZyb3/tLvfWd4OJrBqrL1OBMNt4XXFRp46owhVsmElDuQYGysQXMngUYPllp7WuGOKSHdongUyvKl4Tde2+97UEzblGduUFgKn6TIbXyjRJq6Lq6rkiVC549QWvViHXdNTCb1V2NPw5uTlpDOaLuAOSiO5mBT6h50dORZDCB3IvOLK+9qe4ftgTf5hOF0Zji+V8N9Ad36f4sBAPJ2AFYzAGR5AGRhAHT9hgA6Xw+T+DUgZBEg8QxI+F6BnAfA1QeAyR1BzntHrD+ATJ8R5wWymQGZ8ZjY7x6YBSrpUdh9XukSVZO7HfNlJqFOCmbwkmkNyFCA/uESmTdZ8gxPI3yF2GwnsACBCzom0MUDAvEfAKxWSwDY/ucAjJ/CdbNZiEi0/ndEbNi/lLyMDd78otvf</diagram></mxfile>"><defs/><g transform="translate(0.5,0.5)"><g fill="#000000" font-family="Times New Roman" text-anchor="middle" font-size="200px"><text x="176.5" y="237">R</text></g><g fill="#000000" font-family="Times New Roman" text-anchor="middle" font-size="200px"><text x="375.5" y="237">t</text></g><g fill="#000000" font-family="Times New Roman" text-anchor="middle" font-size="100px"><text x="376.5" y="411">1</text></g><g fill="#000000" font-family="Times New Roman" text-anchor="middle" font-size="100px"><text x="76.5" y="411">0</text></g><g fill="#000000" font-family="Times New Roman" text-anchor="middle" font-size="100px"><text x="176.5" y="411">0</text></g><g fill="#000000" font-family="Times New Roman" text-anchor="middle" font-size="100px"><text x="276.5" y="411">0</text></g><path d="M 57 7 L 7 7 L 7 447 L 57 447" fill="none" stroke="#000000" stroke-width="15" stroke-miterlimit="10" pointer-events="none"/><path d="M 447 7 L 397 7 L 397 447 L 447 447" fill="none" stroke="#000000" stroke-width="15" stroke-miterlimit="10" transform="rotate(180,422,227)" pointer-events="none"/></g></svg> \ No newline at end of file -- GitLab