KD Chart 2  [rev.2.5]
KDChartThreeDPieAttributes.cpp
Go to the documentation of this file.
00001 /****************************************************************************
00002 ** Copyright (C) 2001-2012 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     init();
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     setDepth( -10 );
00068 }
00069 
00070 
00071 bool ThreeDPieAttributes::operator==( const ThreeDPieAttributes& r ) const
00072 {
00073     return ( useShadowColors() == r.useShadowColors() &&
00074              AbstractThreeDAttributes::operator==(r));
00075 }
00076 
00077 void ThreeDPieAttributes::setUseShadowColors( bool shadowColors )
00078 {
00079     d->useShadowColors = shadowColors;
00080 }
00081 
00082 bool ThreeDPieAttributes::useShadowColors() const
00083 {
00084     return d->useShadowColors;
00085 }
00086 
00087 #if !defined(QT_NO_DEBUG_STREAM)
00088 QDebug operator<<(QDebug dbg, const KDChart::ThreeDPieAttributes& a)
00089 {
00090     dbg << "KDChart::ThreeDPieAttributes(";
00091     dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );
00092     dbg << "useShadowColors="<< a.useShadowColors() << ")";
00093     return dbg;
00094 }
00095 #endif /* QT_NO_DEBUG_STREAM */
00096 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/