SemanticGraphEdgeItem.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cmath>
4 
5 #include <QGraphicsItem>
6 #include <QObject>
7 
8 namespace armarx
9 {
10 
11  class SemanticGraphEdgeItem : public QObject, public QGraphicsPathItem
12  {
13  Q_OBJECT
14  public:
15  // QGraphicsItem interface
16  void
17  paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) override;
18 
19  void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
20 
21  QPainterPath shape() const override;
22 
25 
26  float openingAngle = M_PI / 8.0f;
27  float size = 10.0f;
28 
29  bool selected = false;
30 
31  QColor color = Qt::GlobalColor::black;
32 
33  QString label;
34  QPointF labelPosition;
35 
36 
37  signals:
39  };
40 
41 
42 } // namespace armarx
armarx::SemanticGraphEdgeItem::selected
bool selected
Definition: SemanticGraphEdgeItem.h:29
armarx::SemanticGraphEdgeItem::size
float size
Definition: SemanticGraphEdgeItem.h:27
armarx::SemanticGraphEdgeItem
Definition: SemanticGraphEdgeItem.h:11
armarx::SemanticGraphEdgeItem::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition: SemanticGraphEdgeItem.cpp:14
armarx::SemanticGraphEdgeItem::targetDescriptor
int targetDescriptor
Definition: SemanticGraphEdgeItem.h:24
M_PI
#define M_PI
Definition: MathTools.h:17
armarx::SemanticGraphEdgeItem::onLeftClick
void onLeftClick(SemanticGraphEdgeItem *selected)
armarx::SemanticGraphEdgeItem::labelPosition
QPointF labelPosition
Definition: SemanticGraphEdgeItem.h:34
armarx::SemanticGraphEdgeItem::label
QString label
Definition: SemanticGraphEdgeItem.h:33
armarx::SemanticGraphEdgeItem::shape
QPainterPath shape() const override
Definition: SemanticGraphEdgeItem.cpp:95
option
#define option(type, fn)
armarx::SemanticGraphEdgeItem::color
QColor color
Definition: SemanticGraphEdgeItem.h:31
armarx::SemanticGraphEdgeItem::openingAngle
float openingAngle
Definition: SemanticGraphEdgeItem.h:26
armarx::SemanticGraphEdgeItem::sourceDescriptor
int sourceDescriptor
Definition: SemanticGraphEdgeItem.h:23
armarx::SemanticGraphEdgeItem::mousePressEvent
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
Definition: SemanticGraphEdgeItem.cpp:60
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:27