KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartValueTrackerAttributes.cpp
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Chart library.
4**
5** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
12
13#include <KDABLibFakes>
14#include <QBrush>
15#include <QPen>
16#include <QSizeF>
17
18#define d d_func()
19
20using namespace KDChart;
21
22class ValueTrackerAttributes::Private
23{
24 friend class ValueTrackerAttributes;
25
26public:
27 Private();
28
29private:
30 QPen linePen;
31 QPen markerPen;
32 QBrush markerBrush;
33 QBrush arrowBrush;
34 QSizeF markerSize;
35 bool enabled = false;
36 QBrush areaBrush;
37 Qt::Orientations orientations;
38};
39
40ValueTrackerAttributes::Private::Private()
41 : linePen(QPen(QColor(80, 80, 80, 200)))
42 , markerSize(QSizeF(6.0, 6.0))
43 , areaBrush(QBrush())
45{
48}
49
51 : _d(new Private())
52{
53}
54
59
61{
62 if (this == &r)
63 return *this;
64
65 *d = *r.d;
66
67 return *this;
68}
69
71{
72 delete _d;
73 _d = nullptr;
74}
75
77{
78 return (linePen() == r.linePen() && markerPen() == r.markerPen() && markerBrush() == r.markerBrush() && arrowBrush() == r.arrowBrush() && areaBrush() == r.areaBrush() && markerSize() == r.markerSize() && isEnabled() == r.isEnabled());
79}
80
82{
83 d->linePen = pen;
84 d->markerPen = pen;
85 d->markerBrush = QBrush();
86 d->arrowBrush = pen.color();
87}
88
90{
91 return d->linePen;
92}
93
95{
96 d->linePen = pen;
97}
98
100{
101 return d->linePen;
102}
103
105{
106 d->markerPen = pen;
107}
108
110{
111 return d->markerPen;
112}
113
115{
116 d->markerBrush = brush;
117}
118
120{
121 return d->markerBrush;
122}
123
125{
126 d->arrowBrush = brush;
127}
128
130{
131 return d->arrowBrush;
132}
133
135{
136 d->areaBrush = brush;
137}
138
140{
141 return d->areaBrush;
142}
143
145{
146 d->markerSize = size;
147}
148
150{
151 return d->markerSize;
152}
153
155{
156 return d->orientations;
157}
158
160{
161 d->orientations = orientations;
162}
163
165{
166 d->enabled = enabled;
167}
168
170{
171 return d->enabled;
172}
173
174#if !defined(QT_NO_DEBUG_STREAM)
176{
177 dbg << "KDChart::ValueTrackerAttributes("
178 << "linePen=" << va.linePen()
179 << "markerPen=" << va.markerPen()
180 << "markerBrush=" << va.markerBrush()
181 << "arrowBrush=" << va.arrowBrush()
182 << "markerSize=" << va.markerSize()
183 << "enabled=" << va.isEnabled()
184 << ")";
185 return dbg;
186}
187#endif /* QT_NO_DEBUG_STREAM */
Cell-specific attributes regarding value tracking.
void setOrientations(Qt::Orientations orientations)
bool operator==(const ValueTrackerAttributes &) const
ValueTrackerAttributes & operator=(const ValueTrackerAttributes &)
QDebug operator<<(QDebug stream, const DataDimension &r)
QColor color() const const
typedef Orientations

© 2001 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/
Generated on Wed May 1 2024 00:01:10 for KD Chart API Documentation by doxygen 1.9.8