Version: 9.16.0
DependencyTree_Arrow.h
Go to the documentation of this file.
1// Copyright (C) 2014-2026 CEA, EDF, OPEN CASCADE
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20#ifndef DEPENDENCYTREE_ARROW_H
21#define DEPENDENCYTREE_ARROW_H
22
23#include <QGraphicsLineItem>
24
25#include "DependencyTree.h"
26
28
30{
31
32public:
33
35 QGraphicsItem* parent = 0, QGraphicsScene* scene = 0 );
37
38 virtual QRectF boundingRect() const;
39 virtual QPainterPath shape() const;
40
41 void setColor(const QColor& );
42 void setHighlightColor(const QColor& );
43 void setSelectColor(const QColor& );
44
45 DependencyTree_Object* getStartItem() const;
46 DependencyTree_Object* getEndItem() const;
47
48 void setIsBiLink( bool );
49
50protected:
51
52 void paint( QPainter*, const QStyleOptionGraphicsItem*, QWidget* = 0 );
53
54private:
55
56 QPolygonF createArrowHead( QPointF , QPointF, bool = true );
57
60
61 QColor myColor;
64
65 QPolygonF myArrowHead;
67
69
71
72 QLineF myLine;
73
74};
75
76#endif
#define DEPENDENCYTREE_EXPORT
Definition: DependencyTree.h:30
Definition: DependencyTree_Arrow.h:30
QColor mySelectColor
Definition: DependencyTree_Arrow.h:62
QColor myColor
Definition: DependencyTree_Arrow.h:61
DependencyTree_Object * myEndItem
Definition: DependencyTree_Arrow.h:59
QColor myHighlightColor
Definition: DependencyTree_Arrow.h:63
QLineF myLine
Definition: DependencyTree_Arrow.h:72
DependencyTree_Object * myStartItem
Definition: DependencyTree_Arrow.h:58
QPolygonF myReverseArrowHead
Definition: DependencyTree_Arrow.h:66
bool myIsBiLink
Definition: DependencyTree_Arrow.h:68
QPolygonF myArrowHead
Definition: DependencyTree_Arrow.h:65
QRectF mySelfDependencyArrow
Definition: DependencyTree_Arrow.h:70
Definition: DependencyTree_Object.h:34