KChart

KChartThreeDPieAttributes.cpp
1 /*
2  * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3  *
4  * This file is part of the KD Chart library.
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18  */
19 
20 #include "KChartThreeDPieAttributes.h"
21 #include "KChartThreeDPieAttributes_p.h"
22 
23 #include "KChartMath_p.h"
24 
25 #include <QDebug>
26 
27 #define d d_func()
28 
29 using namespace KChart;
30 
31 ThreeDPieAttributes::Private::Private()
32  : useShadowColors( true )
33 {
34 }
35 
36 
37 ThreeDPieAttributes::ThreeDPieAttributes()
38  : AbstractThreeDAttributes( new Private() )
39 {
40  init();
41 }
42 
43 ThreeDPieAttributes::ThreeDPieAttributes( const ThreeDPieAttributes& r )
44  : AbstractThreeDAttributes( new Private( *r.d) )
45 {
46 }
47 
48 ThreeDPieAttributes& ThreeDPieAttributes::operator= ( const ThreeDPieAttributes& r )
49 {
50  if ( this == &r )
51  return *this;
52 
53  *d = *r.d;
54 
55  return *this;
56 }
57 
58 ThreeDPieAttributes::~ThreeDPieAttributes()
59 {
60 }
61 
62 void ThreeDPieAttributes::init()
63 {
64  setDepth( -10 );
65 }
66 
67 
68 bool ThreeDPieAttributes::operator==( const ThreeDPieAttributes& r ) const
69 {
70  return ( useShadowColors() == r.useShadowColors() &&
71  AbstractThreeDAttributes::operator==(r));
72 }
73 
74 void ThreeDPieAttributes::setUseShadowColors( bool shadowColors )
75 {
76  d->useShadowColors = shadowColors;
77 }
78 
79 bool ThreeDPieAttributes::useShadowColors() const
80 {
81  return d->useShadowColors;
82 }
83 
84 #if !defined(QT_NO_DEBUG_STREAM)
86 {
87  dbg << "KChart::ThreeDPieAttributes(";
88  dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );
89  dbg << "useShadowColors="<< a.useShadowColors() << ")";
90  return dbg;
91 }
92 #endif /* QT_NO_DEBUG_STREAM */
93 
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-2020 The KDE developers.
Generated on Sat Sep 19 2020 22:36:26 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.