KD Chart 2
[rev.2.7]
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
KDGantt
kdganttconstraintgraphicsitem.h
Go to the documentation of this file.
1
/****************************************************************************
2
** Copyright (C) 2001-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3
**
4
** This file is part of the KD Chart library.
5
**
6
** Licensees holding valid commercial KD Chart licenses may use this file in
7
** accordance with the KD Chart Commercial License Agreement provided with
8
** the Software.
9
**
10
**
11
** This file may be distributed and/or modified under the terms of the
12
** GNU General Public License version 2 and version 3 as published by the
13
** Free Software Foundation and appearing in the file LICENSE.GPL.txt included.
14
**
15
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17
**
18
** Contact info@kdab.com if any conditions of this licensing are not
19
** clear to you.
20
**
21
**********************************************************************/
22
23
#ifndef KDGANTTCONSTRAINTGRAPHICSITEM_H
24
#define KDGANTTCONSTRAINTGRAPHICSITEM_H
25
26
#include <QGraphicsItem>
27
28
#include "
kdganttconstraint.h
"
29
30
namespace
KDGantt
{
31
class
GraphicsScene;
32
33
class
KDGANTT_EXPORT
ConstraintGraphicsItem
:
public
QGraphicsItem
{
34
public
:
35
enum
{ Type = UserType + 43 };
36
37
explicit
ConstraintGraphicsItem
(
const
Constraint
& c,
38
QGraphicsItem
* parent = 0,
GraphicsScene
* scene = 0 );
39
~
ConstraintGraphicsItem
()
override
;
40
41
/*reimp*/
int
type()
const override
;
42
/*reimp (non virtual)*/
GraphicsScene
* scene()
const
;
43
44
/*reimp*/
QString ganttToolTip()
const
;
45
46
/*reimp*/
QRectF boundingRect()
const override
;
47
/*reimp*/
void
paint( QPainter* painter,
const
QStyleOptionGraphicsItem* option,
48
QWidget
* widget = 0 )
override
;
49
50
inline
const
Constraint
&
constraint
()
const
{
return
m_constraint; }
51
Constraint
proxyConstraint()
const
;
52
53
void
setStart(
const
QPointF& start );
54
inline
QPointF
start
()
const
{
return
m_start; }
55
void
setEnd(
const
QPointF& end );
56
inline
QPointF
end
()
const
{
return
m_end; }
57
58
void
updateItem(
const
QPointF& start,
const
QPointF& end );
59
private
:
60
Constraint
m_constraint;
61
QPointF m_start;
62
QPointF m_end;
63
};
64
}
65
66
#endif
/* KDGANTTCONSTRAINTGRAPHICSITEM_H */
67
KDGantt::ConstraintGraphicsItem::start
QPointF start() const
Definition:
kdganttconstraintgraphicsitem.h:54
QGraphicsItem
kdganttconstraint.h
KDGantt::Constraint
A class used to represent a dependency.
Definition:
kdganttconstraint.h:38
KDGantt::ConstraintGraphicsItem
Definition:
kdganttconstraintgraphicsitem.h:33
KDGantt::ConstraintGraphicsItem::constraint
const Constraint & constraint() const
Definition:
kdganttconstraintgraphicsitem.h:50
KDGantt::ConstraintGraphicsItem::end
QPointF end() const
Definition:
kdganttconstraintgraphicsitem.h:56
KDGantt::GraphicsScene
Definition:
kdganttgraphicsscene.h:48
KDGantt
Definition:
kdganttabstractgrid.h:36
QWidget
Class only listed here to document inheritance of some KDChart classes.
Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/