EdgeTableWidget.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
* @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
17
* @date 2021
18
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19
* GNU General Public License
20
*/
21
22
#pragma once
23
24
#include <QColor>
25
#include <QList>
26
#include <QTableWidget>
27
28
#include <
armarx/navigation/gui-plugins/LocationGraphEditor/GuiGraph.h
>
29
#include <
armarx/navigation/gui-plugins/LocationGraphEditor/widgets/default_colors.h
>
30
31
32
namespace
armarx::navigation::qt_plugins::location_graph_editor
33
{
34
35
class
EdgeTableWidget
:
public
QTableWidget
36
{
37
Q_OBJECT
38
using
This
=
EdgeTableWidget
;
39
40
41
public
:
42
EdgeTableWidget
();
43
44
45
template
<
class
EdgeT>
46
QTableWidgetItem*
47
addEdge
(
const
EdgeT& edge)
48
{
49
return
addEdge
(edge.source().attrib(), edge.target().attrib());
50
}
51
52
QTableWidgetItem*
addEdge
(
const
core::VertexAttribs
& sourceAttrib,
53
const
core::VertexAttribs
& targetAttrib);
54
55
56
void
updateEdge
(GuiGraph::Edge edge);
57
58
void
removeEdge
(GuiGraph::Edge& edge);
59
60
void
clearEdges
();
61
62
63
QList<QTableWidgetItem*>
selectedEdgeItems
();
64
65
66
signals:
67
68
void
edgeRemovalRequested
(QList<QTableWidgetItem*> edgeItems);
69
70
71
public
slots:
72
73
void
makeContextMenu
(QPoint pos);
74
75
76
public
:
77
QColor
bgColorDefault
=
default_colors::tableBackgroundDefault
;
78
QColor
bgColorSelected
=
default_colors::tableBackgroundSelected
;
79
};
80
81
}
// namespace armarx::navigation::qt_plugins::location_graph_editor
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::addEdge
QTableWidgetItem * addEdge(const EdgeT &edge)
Definition:
EdgeTableWidget.h:47
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::removeEdge
void removeEdge(GuiGraph::Edge &edge)
Definition:
EdgeTableWidget.cpp:103
armarx::navigation::qt_plugins::location_graph_editor::default_colors::tableBackgroundSelected
const QColor tableBackgroundSelected
Definition:
default_colors.cpp:31
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::updateEdge
void updateEdge(GuiGraph::Edge edge)
Definition:
EdgeTableWidget.cpp:80
armarx::navigation::qt_plugins::location_graph_editor::default_colors::tableBackgroundDefault
const QColor tableBackgroundDefault
Definition:
default_colors.cpp:30
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::makeContextMenu
void makeContextMenu(QPoint pos)
Definition:
EdgeTableWidget.cpp:123
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::EdgeTableWidget
EdgeTableWidget()
Definition:
EdgeTableWidget.cpp:34
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::edgeRemovalRequested
void edgeRemovalRequested(QList< QTableWidgetItem * > edgeItems)
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::bgColorDefault
QColor bgColorDefault
Definition:
EdgeTableWidget.h:77
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::clearEdges
void clearEdges()
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::bgColorSelected
QColor bgColorSelected
Definition:
EdgeTableWidget.h:78
armarx::navigation::qt_plugins::location_graph_editor
Definition:
GuiGraph.cpp:29
default_colors.h
armarx::navigation::core::VertexAttribs
Definition:
Graph.h:43
GuiGraph.h
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget
Definition:
EdgeTableWidget.h:35
armarx::navigation::qt_plugins::location_graph_editor::EdgeTableWidget::selectedEdgeItems
QList< QTableWidgetItem * > selectedEdgeItems()
Definition:
EdgeTableWidget.cpp:116
armarx
navigation
gui-plugins
LocationGraphEditor
widgets
EdgeTableWidget.h
Generated on Sat Oct 12 2024 09:14:15 for armarx_documentation by
1.8.17