DebugLayerControlWidget.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 MemoryX::WorkingMemoryGui
17* @author Dominik Muth
18* @copyright 2015 KIT
19* @license http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21
22*/
23
24#pragma once
25
26/* ArmarX headers */
27
29
31
32/* QT headers */
33#include <QCheckBox>
34#include <QPushButton>
35#include <QSignalMapper>
36#include <QWidget>
37
38/* STD headers */
39#include <unordered_map>
40
41/* Inventor headers */
42#include <Inventor/Qt/SoQt.h>
43#include <Inventor/SoDB.h>
44#include <Inventor/sensors/SoTimerSensor.h>
45
46/* System headers */
47#include <string>
48
49namespace Ui
50{
51 class DebugLayerControlWidget;
52}
53
54class DebugLayerControlWidget : public QWidget
55{
56 Q_OBJECT
57
58public:
59 DebugLayerControlWidget(QWidget* parent = 0);
60 ~DebugLayerControlWidget() override;
62
63public slots:
64 void updateLayers();
65
66 void layerToggleVisibility(QString layerName);
67
68protected:
70 SoTimerSensor* timerSensor;
71 /**
72 * @brief Maps events to toggle a layer's visibility from checkboxes contained in the table to layerToggleVisibility.
73 */
75 /**
76 * @brief Maps events to remove a layer.
77 */
79 /**
80 * @brief Stores whether a layer is currently visible.
81 */
82 std::unordered_map<std::string, bool> layerVisibility;
83
84 static void onTimer(void* data, SoSensor* sensor);
85
86protected slots:
87 void layerRemove(QString layerName);
88
89private:
90 Ui::DebugLayerControlWidget* ui;
91};
uint8_t data[1]
std::unordered_map< std::string, bool > layerVisibility
Stores whether a layer is currently visible.
QSignalMapper layerSignalMapperVisible
Maps events to toggle a layer's visibility from checkboxes contained in the table to layerToggleVisib...
static void onTimer(void *data, SoSensor *sensor)
void layerRemove(QString layerName)
armarx::DebugDrawerComponentPtr entityDrawer
void layerToggleVisibility(QString layerName)
QSignalMapper layerSignalMapperRemove
Maps events to remove a layer.
void setEntityDrawer(armarx::DebugDrawerComponentPtr entityDrawer)
DebugLayerControlWidget(QWidget *parent=0)
ArmarX Headers.
IceInternal::Handle< DebugDrawerComponent > DebugDrawerComponentPtr