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