blob: c66c7ab958fe128e50bf7b7ea2a136848dd46525 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "shapeitem.h"
//! [0]
QPainterPath ShapeItem::path() const
{
return myPath;
}
//! [0]
//! [1]
QPoint ShapeItem::position() const
{
return myPosition;
}
//! [1]
//! [2]
QColor ShapeItem::color() const
{
return myColor;
}
//! [2]
//! [3]
QString ShapeItem::toolTip() const
{
return myToolTip;
}
//! [3]
//! [4]
void ShapeItem::setPath(const QPainterPath &path)
{
myPath = path;
}
//! [4]
//! [5]
void ShapeItem::setToolTip(const QString &toolTip)
{
myToolTip = toolTip;
}
//! [5]
//! [6]
void ShapeItem::setPosition(const QPoint &position)
{
myPosition = position;
}
//! [6]
//! [7]
void ShapeItem::setColor(const QColor &color)
{
myColor = color;
}
//! [7]
|