KChart

KChartThreeDPieAttributes.cpp
1 /*
2  * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * SPDX-License-Identifier: GPL-2.0-or-later
7  */
8 
9 #include "KChartThreeDPieAttributes.h"
10 #include "KChartThreeDPieAttributes_p.h"
11 
12 #include "KChartMath_p.h"
13 
14 #include <QDebug>
15 
16 #define d d_func()
17 
18 using namespace KChart;
19 
20 ThreeDPieAttributes::Private::Private()
21  : useShadowColors( true )
22 {
23 }
24 
25 
26 ThreeDPieAttributes::ThreeDPieAttributes()
27  : AbstractThreeDAttributes( new Private() )
28 {
29  init();
30 }
31 
32 ThreeDPieAttributes::ThreeDPieAttributes( const ThreeDPieAttributes& r )
33  : AbstractThreeDAttributes( new Private( *r.d) )
34 {
35 }
36 
37 ThreeDPieAttributes& ThreeDPieAttributes::operator= ( const ThreeDPieAttributes& r )
38 {
39  if ( this == &r )
40  return *this;
41 
42  *d = *r.d;
43 
44  return *this;
45 }
46 
47 ThreeDPieAttributes::~ThreeDPieAttributes()
48 {
49 }
50 
51 void ThreeDPieAttributes::init()
52 {
53  setDepth( -10 );
54 }
55 
56 
57 bool ThreeDPieAttributes::operator==( const ThreeDPieAttributes& r ) const
58 {
59  return ( useShadowColors() == r.useShadowColors() &&
60  AbstractThreeDAttributes::operator==(r));
61 }
62 
63 void ThreeDPieAttributes::setUseShadowColors( bool shadowColors )
64 {
65  d->useShadowColors = shadowColors;
66 }
67 
68 bool ThreeDPieAttributes::useShadowColors() const
69 {
70  return d->useShadowColors;
71 }
72 
73 #if !defined(QT_NO_DEBUG_STREAM)
75 {
76  dbg << "KChart::ThreeDPieAttributes(";
77  dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );
78  dbg << "useShadowColors="<< a.useShadowColors() << ")";
79  return dbg;
80 }
81 #endif /* QT_NO_DEBUG_STREAM */
82 
QCA_EXPORT void init()
QDataStream & operator<<(QDataStream &out, const KDateTime::Spec &spec)
A set of 3D pie attributes.
Global namespace.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 22:37:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.