00001 /**************************************************************************** 00002 ** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved. 00003 ** 00004 ** This file is part of the KD Chart library. 00005 ** 00006 ** Licensees holding valid commercial KD Chart licenses may use this file in 00007 ** accordance with the KD Chart Commercial License Agreement provided with 00008 ** the Software. 00009 ** 00010 ** 00011 ** This file may be distributed and/or modified under the terms of the 00012 ** GNU General Public License version 2 and version 3 as published by the 00013 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included. 00014 ** 00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00017 ** 00018 ** Contact info@kdab.com if any conditions of this licensing are not 00019 ** clear to you. 00020 ** 00021 **********************************************************************/ 00022 00023 #include "KDChartThreeDPieAttributes.h" 00024 #include "KDChartThreeDPieAttributes_p.h" 00025 00026 #include <QDebug> 00027 00028 #include <KDABLibFakes> 00029 00030 #define d d_func() 00031 00032 using namespace KDChart; 00033 00034 ThreeDPieAttributes::Private::Private() 00035 : useShadowColors( true ) 00036 { 00037 } 00038 00039 00040 ThreeDPieAttributes::ThreeDPieAttributes() 00041 : AbstractThreeDAttributes( new Private() ) 00042 { 00043 00044 } 00045 00046 ThreeDPieAttributes::ThreeDPieAttributes( const ThreeDPieAttributes& r ) 00047 : AbstractThreeDAttributes( new Private( *r.d) ) 00048 { 00049 } 00050 00051 ThreeDPieAttributes& ThreeDPieAttributes::operator= ( const ThreeDPieAttributes& r ) 00052 { 00053 if( this == &r ) 00054 return *this; 00055 00056 *d = *r.d; 00057 00058 return *this; 00059 } 00060 00061 ThreeDPieAttributes::~ThreeDPieAttributes() 00062 { 00063 } 00064 00065 void ThreeDPieAttributes::init() 00066 { 00067 } 00068 00069 00070 bool ThreeDPieAttributes::operator==( const ThreeDPieAttributes& r ) const 00071 { 00072 return ( useShadowColors() == r.useShadowColors() && 00073 AbstractThreeDAttributes::operator==(r)); 00074 } 00075 00076 00077 00078 void ThreeDPieAttributes::setUseShadowColors( bool shadowColors ) 00079 { 00080 d->useShadowColors = shadowColors; 00081 } 00082 00083 bool ThreeDPieAttributes::useShadowColors() const 00084 { 00085 return d->useShadowColors; 00086 } 00087 00088 #if !defined(QT_NO_DEBUG_STREAM) 00089 QDebug operator<<(QDebug dbg, const KDChart::ThreeDPieAttributes& a) 00090 { 00091 dbg << "KDChart::ThreeDPieAttributes("; 00092 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) ); 00093 dbg << "useShadowColors="<< a.useShadowColors() << ")"; 00094 return dbg; 00095 } 00096 #endif /* QT_NO_DEBUG_STREAM */ 00097