KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartLeveyJenningsGridAttributes.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 <QBrush>
14#include <QMap>
15#include <QPen>
16
17#include <KDABLibFakes>
18
19#define d d_func()
20
21using namespace KDChart;
22
23class LeveyJenningsGridAttributes::Private
24{
25 friend class LeveyJenningsGridAttributes;
26
27public:
28 Private();
29
30private:
34};
35
36LeveyJenningsGridAttributes::Private::Private()
37{
38 pens[Calculated].setCapStyle(Qt::FlatCap);
39 pens[Calculated].setColor(Qt::blue);
40 pens[Expected].setCapStyle(Qt::FlatCap);
41 pens[Expected].setColor(Qt::black);
42
43 visible[Calculated] = true;
44 visible[Expected] = true;
45
46 rangeBrushes[LeveyJenningsGridAttributes::CriticalRange] = QBrush(QColor(255, 255, 192));
47 rangeBrushes[LeveyJenningsGridAttributes::OutOfRange] = QBrush(QColor(255, 128, 128));
48}
49
51 : _d(new Private())
52{
53 // this block left empty intentionally
54}
55
60
62{
63 if (this == &r)
64 return *this;
65
66 *d = *r.d;
67
68 return *this;
69}
70
72{
73 delete _d;
74 _d = nullptr;
75}
76
81
83{
84 d->rangeBrushes[range] = brush;
85}
86
88{
89 return d->rangeBrushes[range];
90}
91
93{
94 d->visible[type] = visible;
95}
96
98{
99 return d->visible[type];
100}
101
103{
104 d->pens[type] = pen;
105 d->pens[type].setCapStyle(Qt::FlatCap);
106}
107
109{
110 return d->pens[type];
111}
A set of attributes controlling the appearance of grids.
LeveyJenningsGridAttributes & operator=(const LeveyJenningsGridAttributes &)
bool operator==(const LeveyJenningsGridAttributes &) const
void setRangeBrush(Range range, const QBrush &brush)
void setCapStyle(Qt::PenCapStyle style)

© 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