SemanticGraphEdgeItem.h
Go to the documentation of this file.
1#pragma once
2
3#include <cmath>
4
5#include <QGraphicsItem>
6#include <QObject>
7
8namespace 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;
35
36
37 signals:
39 };
40
41
42} // namespace armarx
#define option(type, fn)
#define M_PI
Definition MathTools.h:17
QPainterPath shape() const override
void onLeftClick(SemanticGraphEdgeItem *selected)
void mousePressEvent(QGraphicsSceneMouseEvent *event) override
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
This file offers overloads of toIce() and fromIce() functions for STL container types.