KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartLineAttributes.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#include <QDebug>
13
14#include <KDABLibFakes>
15
16#define d d_func()
17
18using namespace KDChart;
19
20class LineAttributes::Private
21{
22 friend class LineAttributes;
23
24public:
25 Private();
26
27private:
28 // Areas
29 MissingValuesPolicy missingValuesPolicy = MissingValuesAreBridged;
30 bool displayArea = false;
31 uint transparency = 255;
32 int areaBoundingDataset = -1;
33};
34
35LineAttributes::Private::Private()
36{
37}
38
40 : _d(new Private())
41{
42}
43
45 : _d(new Private(*r.d))
46{
47}
48
50{
51 if (this == &r)
52 return *this;
53
54 *d = *r.d;
55
56 return *this;
57}
58
60{
61 delete _d;
62 _d = nullptr;
63}
64
69
71{
72 d->missingValuesPolicy = policy;
73}
74
76{
77 return d->missingValuesPolicy;
78}
79
81{
82 d->displayArea = display;
83}
84
86{
87 return d->displayArea;
88}
89
91{
92 if (alpha > 255)
93 alpha = 255;
94 d->transparency = alpha;
95}
96
98{
99 return d->transparency;
100}
101
103{
104 d->areaBoundingDataset = dataset;
105}
106
108{
109 return d->areaBoundingDataset;
110}
111
112#if !defined(QT_NO_DEBUG_STREAM)
114{
115 dbg << "KDChart::LineAttributes("
116 // MissingValuesPolicy missingValuesPolicy;
117 << "bool=" << a.displayArea()
118 << "transparency=" << a.transparency()
119 << "areaBoundingDataset=" << a.areaBoundingDataset()
120 << ")";
121 return dbg;
122}
123#endif /* QT_NO_DEBUG_STREAM */
Set of attributes for changing the appearance of line charts.
MissingValuesPolicy
MissingValuesPolicy specifies how a missing value will be shown in a line diagram.
bool operator==(const LineAttributes &) const
MissingValuesPolicy missingValuesPolicy() const
LineAttributes & operator=(const LineAttributes &)
void setAreaBoundingDataset(int dataset)
void setMissingValuesPolicy(MissingValuesPolicy policy)
QDebug operator<<(QDebug stream, const DataDimension &r)

© 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