Public Member Functions | Static Public Member Functions

KDChart::DataValueAttributes Class Reference

Diagram attributes dealing with data value labels. More...

#include <KDChartDataValueAttributes>

List of all members.

Public Member Functions

BackgroundAttributes backgroundAttributes () const
QString dataLabel () const
 Returns the string displayed instead of the data value label.
 DataValueAttributes (const DataValueAttributes &)
 DataValueAttributes ()
int decimalDigits () const
FrameAttributes frameAttributes () const
bool isVisible () const
MarkerAttributes markerAttributes () const
const RelativePosition negativePosition () const
 Return the relative positioning of the data value labels.
bool operator!= (const DataValueAttributes &other) const
DataValueAttributesoperator= (const DataValueAttributes &)
bool operator== (const DataValueAttributes &) const
const RelativePosition position (bool positive) const
const RelativePosition positivePosition () const
 Return the relative positioning of the data value labels.
QString prefix () const
 Returns the string used as a prefix to the data value text.
void setBackgroundAttributes (const BackgroundAttributes &a)
 Set the background attributes to use for the data value labels area.
void setDataLabel (const QString label)
 display a string label instead of the original data value label Supports HTML code.
void setDecimalDigits (int digits)
 Set how many decimal digits to display when rendering the data value labels.
void setFrameAttributes (const FrameAttributes &a)
 Set the frame attributes to use for the data value labels area.
void setMarkerAttributes (const MarkerAttributes &a)
 Set the marker attributes to use for the data values.
void setNegativePosition (const RelativePosition &relPosition)
 Defines the relative positioning of the data value labels for negative values.
void setPositivePosition (const RelativePosition &relPosition)
 Defines the relative position of the data value labels for positive values.
void setPrefix (const QString prefix)
 Prepend a prefix string to the data value label.
void setShowOverlappingDataLabels (bool showOverlappingDataLabels)
 Set whether data value texts overlapping other data value texts of the same diagram should be drawn.
void setShowRepetitiveDataLabels (bool showRepetitiveDataLabels)
 Set whether data value labels not different from their predecessors should be drawn.
void setSuffix (const QString suffix)
 Append a suffix string to the data value label.
void setTextAttributes (const TextAttributes &a)
 Set the text attributes to use for the data value labels.
void setUsePercentage (bool enable)
 Specify whether to use percentages instead of actual data point values when no specific label is set.
void setVisible (bool visible)
 Set whether data value labels should be displayed.
bool showOverlappingDataLabels () const
bool showRepetitiveDataLabels () const
QString suffix () const
 Returns the string used as a suffix to the data value text.
TextAttributes textAttributes () const
bool usePercentage () const
 ~DataValueAttributes ()

Static Public Member Functions

static const DataValueAttributesdefaultAttributes ()
static const QVariant & defaultAttributesAsVariant ()

Detailed Description

Diagram attributes dealing with data value labels.

The DataValueAttributes group all properties that can be set wrt data value labels and if and how they are displayed. This includes things like the text attributes (font, color), what markers are used, howmany decimal digits are displayed, etc.

Definition at line 55 of file KDChartDataValueAttributes.h.


Constructor & Destructor Documentation

DataValueAttributes::DataValueAttributes (  ) 

Definition at line 111 of file KDChartDataValueAttributes.cpp.

DataValueAttributes::DataValueAttributes ( const DataValueAttributes r  ) 

Definition at line 116 of file KDChartDataValueAttributes.cpp.

DataValueAttributes::~DataValueAttributes (  ) 

Definition at line 131 of file KDChartDataValueAttributes.cpp.


Member Function Documentation

BackgroundAttributes DataValueAttributes::backgroundAttributes (  )  const
Returns:
The background attributes used for painting the data value labels area.
See also:
BackgroundAttributes

Definition at line 225 of file KDChartDataValueAttributes.cpp.

References d.

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

QString DataValueAttributes::dataLabel (  )  const

Returns the string displayed instead of the data value label.

See also:
setDataLabel

Definition at line 285 of file KDChartDataValueAttributes.cpp.

References d.

Referenced by operator==().

int DataValueAttributes::decimalDigits (  )  const
Returns:
The number of decimal digits displayed.

Definition at line 255 of file KDChartDataValueAttributes.cpp.

References d.

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

const DataValueAttributes & DataValueAttributes::defaultAttributes (  )  [static]

Definition at line 176 of file KDChartDataValueAttributes.cpp.

Referenced by defaultAttributesAsVariant().

const QVariant & DataValueAttributes::defaultAttributesAsVariant (  )  [static]
FrameAttributes DataValueAttributes::frameAttributes (  )  const
Returns:
The frame attributes used for painting the data value labels area.
See also:
FrameAttributes

Definition at line 215 of file KDChartDataValueAttributes.cpp.

References d.

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

bool DataValueAttributes::isVisible (  )  const
Returns:
Whether data value labels should be displayed.

Definition at line 195 of file KDChartDataValueAttributes.cpp.

References d.

Referenced by operator<<(), operator==(), and KDChart::AbstractDiagram::paintMarker().

MarkerAttributes DataValueAttributes::markerAttributes (  )  const
Returns:
The marker attributes used for decorating the data values.
See also:
MarkerAttributes

Definition at line 235 of file KDChartDataValueAttributes.cpp.

References d.

Referenced by KDChart::AbstractDiagram::datasetMarkers(), operator==(), and KDChart::AbstractDiagram::paintMarker().

const RelativePosition DataValueAttributes::negativePosition (  )  const

Return the relative positioning of the data value labels.

See also:
setNegativePosition

Definition at line 335 of file KDChartDataValueAttributes.cpp.

References d.

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

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

Definition at line 62 of file KDChartDataValueAttributes.h.

References KDGantt::operator==().

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

Definition at line 121 of file KDChartDataValueAttributes.cpp.

References d.

bool DataValueAttributes::operator== ( const DataValueAttributes r  )  const
const RelativePosition KDChart::DataValueAttributes::position ( bool  positive  )  const

Definition at line 284 of file KDChartDataValueAttributes.h.

const RelativePosition DataValueAttributes::positivePosition (  )  const

Return the relative positioning of the data value labels.

See also:
setPositivePosition

Definition at line 345 of file KDChartDataValueAttributes.cpp.

References d.

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

QString DataValueAttributes::prefix (  )  const

Returns the string used as a prefix to the data value text.

See also:
setPrefix

Definition at line 265 of file KDChartDataValueAttributes.cpp.

References d.

Referenced by operator==().

void DataValueAttributes::setBackgroundAttributes ( const BackgroundAttributes a  ) 

Set the background attributes to use for the data value labels area.

Parameters:
a The background attributes to set.
See also:
BackgroundAttributes

Definition at line 220 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setDataLabel ( const QString  label  ) 

display a string label instead of the original data value label Supports HTML code.

See also:
dataLabel

Definition at line 280 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setDecimalDigits ( int  digits  ) 

Set how many decimal digits to display when rendering the data value labels.

If there are no decimal digits it will not be displayed.

Parameters:
digits The number of decimal digits to use.

Definition at line 250 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setFrameAttributes ( const FrameAttributes a  ) 

Set the frame attributes to use for the data value labels area.

Parameters:
a The frame attributes to set.
See also:
FrameAttributes

Definition at line 210 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setMarkerAttributes ( const MarkerAttributes a  ) 

Set the marker attributes to use for the data values.

This includes the marker type.

Parameters:
a The marker attributes to set.
See also:
MarkerAttributes

Definition at line 230 of file KDChartDataValueAttributes.cpp.

References d.

Referenced by KDChart::TernaryLineDiagram::TernaryLineDiagram().

void DataValueAttributes::setNegativePosition ( const RelativePosition relPosition  ) 

Defines the relative positioning of the data value labels for negative values.

The position is specified in relation to the respective data value point, or in releation to the respective data representation area, that's one area segment in a LineDiagram showing areas, or one bar in a BarDiagram, one pie slice ...

See also:
negativePosition

Definition at line 330 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setPositivePosition ( const RelativePosition relPosition  ) 

Defines the relative position of the data value labels for positive values.

The position is specified in relation to the respective data value point, or in releation to the respective data representation area, that's one area segment in a LineDiagram showing areas, or one bar in a BarDiagram, one pie slice ...

See also:
positivePosition

Definition at line 340 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setPrefix ( const QString  prefix  ) 

Prepend a prefix string to the data value label.

See also:
prefix

Definition at line 260 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setShowOverlappingDataLabels ( bool  showOverlappingDataLabels  ) 

Set whether data value texts overlapping other data value texts of the same diagram should be drawn.

Parameters:
showOverlappingDataLabels Whether data texts overlapping other data value texts of the same diagram are drawn.

Definition at line 305 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setShowRepetitiveDataLabels ( bool  showRepetitiveDataLabels  ) 

Set whether data value labels not different from their predecessors should be drawn.

Parameters:
showRepetitiveDataLabels Whether data value not different from their predecessors are drawn.

Definition at line 295 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setSuffix ( const QString  suffix  ) 

Append a suffix string to the data value label.

See also:
suffix

Definition at line 270 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setTextAttributes ( const TextAttributes a  ) 

Set the text attributes to use for the data value labels.

Parameters:
a The text attributes to set.
See also:
TextAttributes

Definition at line 200 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setUsePercentage ( bool  enable  ) 

Specify whether to use percentages instead of actual data point values when no specific label is set.

In a bar or cartesian diagram, this means that the value will be shown in % in relation to the sum of all values in the same category, in a polar diagram in relation to the sum of all values in a data set.

When this is turned on, the value will not automatically have the '' postfix.

Parameters:
enable Whether to enable percentage values

Definition at line 240 of file KDChartDataValueAttributes.cpp.

References d.

void DataValueAttributes::setVisible ( bool  visible  ) 

Set whether data value labels should be displayed.

Parameters:
visible Whether data value labels should be displayed.

Definition at line 190 of file KDChartDataValueAttributes.cpp.

References d.

Referenced by KDChart::TernaryLineDiagram::TernaryLineDiagram().

bool DataValueAttributes::showOverlappingDataLabels (  )  const
Returns:
Whether data value texts overlapping other data value texts of the same diagram are drawn.

Definition at line 300 of file KDChartDataValueAttributes.cpp.

References d.

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

bool DataValueAttributes::showRepetitiveDataLabels (  )  const
Returns:
Whether data values not different from their predecessors are drawn.

Definition at line 290 of file KDChartDataValueAttributes.cpp.

References d.

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

QString DataValueAttributes::suffix (  )  const

Returns the string used as a suffix to the data value text.

See also:
setSuffix

Definition at line 275 of file KDChartDataValueAttributes.cpp.

References d.

Referenced by operator==().

TextAttributes DataValueAttributes::textAttributes (  )  const
Returns:
The text attributes used for painting data value labels.

Definition at line 205 of file KDChartDataValueAttributes.cpp.

References d.

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

bool DataValueAttributes::usePercentage (  )  const
Returns:
Whether to use percentage values
See also:
setUsePercentage

Definition at line 245 of file KDChartDataValueAttributes.cpp.

References d.

Referenced by operator==().


The documentation for this class was generated from the following files: