KDChart::LineAttributes Class Reference

#include <KDChartLineAttributes.h>

List of all members.


Detailed Description

Set of attributes for changing the appearance of line charts.

Definition at line 37 of file KDChartLineAttributes.h.


Public Types

enum  MissingValuesPolicy {
  MissingValuesAreBridged,
  MissingValuesHideSegments,
  MissingValuesShownAsZero,
  MissingValuesPolicyIgnored
}
 MissingValuesPolicy specifies how a missing value will be shown in a line diagram. More...

Public Member Functions

int areaBoundingDataset () const
bool displayArea () const
 LineAttributes (const LineAttributes &)
 LineAttributes ()
MissingValuesPolicy missingValuesPolicy () const
bool operator!= (const LineAttributes &other) const
LineAttributesoperator= (const LineAttributes &)
bool operator== (const LineAttributes &) const
void setAreaBoundingDataset (int dataset)
 Sets the lower or upper (depending on the displayed value being positive or negative, resp.
void setDisplayArea (bool display)
void setMissingValuesPolicy (MissingValuesPolicy policy)
void setTransparency (uint alpha)
uint transparency () const
 ~LineAttributes ()

Member Enumeration Documentation

enum KDChart::LineAttributes::MissingValuesPolicy

MissingValuesPolicy specifies how a missing value will be shown in a line diagram.

Missing value is assumed if the data cell contains a QVariant that can not be interpreted as a double, or if the data cell is hidden while its dataset is not hidden.

Enumerator:
MissingValuesAreBridged 
MissingValuesHideSegments 
MissingValuesShownAsZero 
MissingValuesPolicyIgnored 

Definition at line 58 of file KDChartLineAttributes.h.


Constructor & Destructor Documentation

LineAttributes::LineAttributes (  ) 

Definition at line 59 of file KDChartLineAttributes.cpp.

00060     : _d( new Private() )
00061 {
00062 }

LineAttributes::LineAttributes ( const LineAttributes r  ) 

Definition at line 64 of file KDChartLineAttributes.cpp.

00065     : _d( new Private( *r.d ) )
00066 {
00067 }

LineAttributes::~LineAttributes (  ) 

Definition at line 79 of file KDChartLineAttributes.cpp.

00080 {
00081     delete _d; _d = 0;
00082 }


Member Function Documentation

int LineAttributes::areaBoundingDataset (  )  const

Definition at line 130 of file KDChartLineAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

00131 {
00132     return d->areaBoundingDataset;
00133 }

bool LineAttributes::displayArea (  )  const

Definition at line 108 of file KDChartLineAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

00109 {
00110    return d->displayArea;
00111 }

LineAttributes::MissingValuesPolicy LineAttributes::missingValuesPolicy (  )  const

Definition at line 98 of file KDChartLineAttributes.cpp.

References d.

Referenced by KDChart::LineDiagram::getCellValues(), and operator==().

00099 {
00100     return d->missingValuesPolicy;
00101 }

bool KDChart::LineAttributes::operator!= ( const LineAttributes other  )  const

Definition at line 91 of file KDChartLineAttributes.h.

References KDGantt::operator==().

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

LineAttributes & LineAttributes::operator= ( const LineAttributes r  ) 

Definition at line 69 of file KDChartLineAttributes.cpp.

References d.

00070 {
00071     if( this == &r )
00072         return *this;
00073 
00074     *d = *r.d;
00075 
00076     return *this;
00077 }

bool LineAttributes::operator== ( const LineAttributes r  )  const

Definition at line 84 of file KDChartLineAttributes.cpp.

References areaBoundingDataset(), displayArea(), missingValuesPolicy(), and transparency().

00085 {
00086     return
00087         missingValuesPolicy() == r.missingValuesPolicy() &&
00088         displayArea() == r.displayArea() &&
00089         transparency() == r.transparency() &&
00090         areaBoundingDataset() == r.areaBoundingDataset();
00091 }

void LineAttributes::setAreaBoundingDataset ( int  dataset  ) 

Sets the lower or upper (depending on the displayed value being positive or negative, resp.

) bounding line (i.e., the dataset with the line data). The area is then drawn between this line and the line of the specified dataset. Pass -1 to draw the area between this line and the zero line.

Definition at line 125 of file KDChartLineAttributes.cpp.

References d.

00126 {
00127    d->areaBoundingDataset = dataset;
00128 }

void LineAttributes::setDisplayArea ( bool  display  ) 

Definition at line 103 of file KDChartLineAttributes.cpp.

References d.

00104 {
00105     d->displayArea = display;
00106 }

void LineAttributes::setMissingValuesPolicy ( MissingValuesPolicy  policy  ) 

Definition at line 93 of file KDChartLineAttributes.cpp.

References d.

00094 {
00095     d->missingValuesPolicy = policy;
00096 }

void LineAttributes::setTransparency ( uint  alpha  ) 

Definition at line 113 of file KDChartLineAttributes.cpp.

References d.

00114 {
00115      if ( alpha > 255 )
00116         alpha = 255;
00117     d->transparency = alpha;
00118 }

uint LineAttributes::transparency (  )  const

Definition at line 120 of file KDChartLineAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

00121 {
00122      return d->transparency;
00123 }


The documentation for this class was generated from the following files:
Generated on Thu Mar 4 23:26:06 2010 for KD Chart 2 by  doxygen 1.5.4