KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartBackgroundAttributes.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 <QPixmap>
13
14#include <KDABLibFakes>
15
16#define d d_func()
17
18using namespace KDChart;
19
20class BackgroundAttributes::Private
21{
23
24public:
25 Private();
26
27private:
28 bool visible = false;
29 QBrush brush;
31 QPixmap pixmap;
32};
33
34BackgroundAttributes::Private::Private()
35{
36}
37
39 : _d(new Private())
40{
41}
42
44 : _d(new Private(*r.d))
45{
46}
47
49{
50 if (this == &r)
51 return *this;
52
53 *d = *r.d;
54
55 return *this;
56}
57
59{
60 return isEqualTo(r);
61}
62
64 const BackgroundAttributes &other, bool ignorePixmap) const
65{
66 /*
67 qDebug() << "BackgroundAttributes::operator==";
68 qDebug() << "isVisible" << (isVisible() == other.isVisible());
69 qDebug() << "brush" << (brush() == other.brush());
70 qDebug() << "pixmapMode"<< (pixmapMode() == other.pixmapMode());
71 qDebug() << "pixmap" << (pixmap().serialNumber() == other.pixmap().serialNumber());
72 */
73 return (
74 isVisible() == other.isVisible() && brush() == other.brush() && pixmapMode() == other.pixmapMode() && (ignorePixmap || pixmap().cacheKey() == other.pixmap().cacheKey()));
75}
76
78{
79 delete _d;
80 _d = nullptr;
81}
82
84{
85 d->visible = visible;
86}
87
89{
90 return d->visible;
91}
92
94{
95 d->brush = brush;
96}
97
99{
100 return d->brush;
101}
102
104{
105 d->pixmapMode = mode;
106}
107
112
114{
115 d->pixmap = backPixmap;
116}
117
119{
120 return d->pixmap;
121}
122
123#if !defined(QT_NO_DEBUG_STREAM)
125{
126 dbg << "KDChart::BackgroundAttributes("
127 << "visible=" << ba.isVisible()
128 << "brush=" << ba.brush()
129 << "pixmapmode=" << ba.pixmapMode()
130 << "pixmap=" << ba.pixmap().cacheKey()
131 << ")";
132 return dbg;
133}
134#endif /* QT_NO_DEBUG_STREAM */
BackgroundAttributes & operator=(const BackgroundAttributes &)
void setPixmap(const QPixmap &backPixmap)
void setPixmapMode(BackgroundPixmapMode mode)
bool operator==(const BackgroundAttributes &) const
bool isEqualTo(const BackgroundAttributes &other, bool ignorePixmap=false) const
QDebug operator<<(QDebug stream, const DataDimension &r)
qint64 cacheKey() const const

© 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