Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

KDChart::PieAttributes Class Reference

#include <KDChartPieAttributes.h>

List of all members.

Public Member Functions

bool explode () const
qreal explodeFactor () const
bool operator!= (const PieAttributes &other) const
PieAttributesoperator= (const PieAttributes &)
bool operator== (const PieAttributes &) const
 PieAttributes (const PieAttributes &)
 PieAttributes ()
void setExplode (bool explode)
 Enable or disable exploding the respective pie piece(s).

void setExplodeFactor (qreal factor)
 Set the explode factor.

 ~PieAttributes ()


Constructor & Destructor Documentation

PieAttributes::PieAttributes  ) 
 

Definition at line 45 of file KDChartPieAttributes.cpp.

00046     : _d( new Private() )
00047 {
00048 }

PieAttributes::PieAttributes const PieAttributes  ) 
 

Definition at line 50 of file KDChartPieAttributes.cpp.

References d.

00051     : _d( new Private( *r.d ) )
00052 {
00053 }

PieAttributes::~PieAttributes  ) 
 

Definition at line 65 of file KDChartPieAttributes.cpp.

00066 {
00067     delete _d; _d = 0;
00068 }


Member Function Documentation

bool PieAttributes::explode  )  const
 

Returns:
whether the respective pie piece(s) will be exploded.

Definition at line 90 of file KDChartPieAttributes.cpp.

References d.

Referenced by KDChart::PieDiagram::calculateDataBoundaries().

00091 {
00092     return (d->explodeFactor != 0.0);
00093 }

qreal PieAttributes::explodeFactor  )  const
 

Returns:
the explode factor set by setExplode or by setExplodeFactor.

Definition at line 100 of file KDChartPieAttributes.cpp.

References d.

Referenced by KDChart::PieDiagram::calculateDataBoundaries(), operator<<(), operator==(), and KDChart::PieDiagram::paint().

00101 {
00102     return d->explodeFactor;
00103 }

bool KDChart::PieAttributes::operator!= const PieAttributes other  )  const
 

Definition at line 72 of file KDChartPieAttributes.h.

00072 { return !operator==(other); }

PieAttributes & PieAttributes::operator= const PieAttributes  ) 
 

Definition at line 55 of file KDChartPieAttributes.cpp.

References d.

00056 {
00057     if( this == &r )
00058         return *this;
00059 
00060     *d = *r.d;
00061 
00062     return *this;
00063 }

bool PieAttributes::operator== const PieAttributes  )  const
 

Definition at line 71 of file KDChartPieAttributes.cpp.

References explodeFactor().

00072 {
00073     if( explodeFactor() == r.explodeFactor() )
00074         return true;
00075     else
00076         return false;
00077 }

void PieAttributes::setExplode bool  explode  ) 
 

Enable or disable exploding the respective pie piece(s).

The default explode factor is 10 percent; use setExplodeFactor to specify a different factor.

Note:
This is a convenience function: Calling setExplode( true ) does the same as calling setExplodeFactor( 0.1 ), and calling setExplode( false ) does the same as calling setExplodeFactor( 0.0 ).
See also:
setExplodeFactor

Definition at line 85 of file KDChartPieAttributes.cpp.

References d.

00086 {
00087     d->explodeFactor = (enabled ? 0.1 : 0.0);
00088 }

void PieAttributes::setExplodeFactor qreal  factor  ) 
 

Set the explode factor.

The explode factor is a qreal between 0 and 1, and is interpreted as a percentage of the total available radius of the pie.

See also:
setExplode

Definition at line 95 of file KDChartPieAttributes.cpp.

References d.

00096 {
00097     d->explodeFactor = factor;
00098 }


The documentation for this class was generated from the following files:
Generated on Thu May 10 11:06:33 2007 for KD Chart 2 by doxygen 1.3.6