KD Chart 2
[rev.2.7]
|
Diagram attributes dealing with data value labels. More...
#include <KDChartDataValueAttributes>
Public Member Functions | |
BackgroundAttributes | backgroundAttributes () const |
QString | dataLabel () const |
Returns the string displayed instead of the data value label. More... | |
DataValueAttributes () | |
DataValueAttributes (const DataValueAttributes &) | |
int | decimalDigits () const |
FrameAttributes | frameAttributes () const |
bool | isVisible () const |
MarkerAttributes | markerAttributes () const |
bool | mirrorNegativeValueTextRotation () const |
If true, rotation of negative value labels is negated, so that negative values are rotated in opposite direction of textAttributes().rotation(), and in this sense appear "mirrored" to positive value labels, though the text itself is not mirrored, only its rotation. More... | |
const RelativePosition | negativePosition () const |
Return the relative positioning of the data value labels. More... | |
bool | operator!= (const DataValueAttributes &other) const |
DataValueAttributes & | operator= (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. More... | |
QString | prefix () const |
Returns the string used as a prefix to the data value text. More... | |
void | setBackgroundAttributes (const BackgroundAttributes &a) |
Set the background attributes to use for the data value labels area. More... | |
void | setDataLabel (const QString label) |
display a string label instead of the original data value label Supports HTML code. More... | |
void | setDecimalDigits (int digits) |
Set how many decimal digits to display when rendering the data value labels. More... | |
void | setFrameAttributes (const FrameAttributes &a) |
Set the frame attributes to use for the data value labels area. More... | |
void | setMarkerAttributes (const MarkerAttributes &a) |
Set the marker attributes to use for the data values. More... | |
void | setMirrorNegativeValueTextRotation (bool enable) |
void | setNegativePosition (const RelativePosition &relPosition) |
Defines the relative positioning of the data value labels for negative values. More... | |
void | setPositivePosition (const RelativePosition &relPosition) |
Defines the relative position of the data value labels for positive values. More... | |
void | setPrefix (const QString prefix) |
Prepend a prefix string to the data value label. More... | |
void | setShowOverlappingDataLabels (bool showOverlappingDataLabels) |
Set whether data value texts overlapping other data value texts of the same diagram should be drawn. More... | |
void | setShowRepetitiveDataLabels (bool showRepetitiveDataLabels) |
Set whether data value labels not different from their predecessors should be drawn. More... | |
void | setSuffix (const QString suffix) |
Append a suffix string to the data value label. More... | |
void | setTextAttributes (const TextAttributes &a) |
Set the text attributes to use for the data value labels. More... | |
void | setUsePercentage (bool enable) |
Specify whether to use percentages instead of actual data point values when no specific label is set. More... | |
void | setVisible (bool visible) |
Set whether data value labels should be displayed. More... | |
bool | showOverlappingDataLabels () const |
bool | showRepetitiveDataLabels () const |
QString | suffix () const |
Returns the string used as a suffix to the data value text. More... | |
TextAttributes | textAttributes () const |
bool | usePercentage () const |
~DataValueAttributes () | |
Static Public Member Functions | |
static const DataValueAttributes & | defaultAttributes () |
static const QVariant & | defaultAttributesAsVariant () |
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, how many decimal digits are displayed, etc.
Definition at line 55 of file KDChartDataValueAttributes.h.
DataValueAttributes::DataValueAttributes | ( | ) |
Definition at line 97 of file KDChartDataValueAttributes.cpp.
DataValueAttributes::DataValueAttributes | ( | const DataValueAttributes & | r | ) |
Definition at line 102 of file KDChartDataValueAttributes.cpp.
DataValueAttributes::~DataValueAttributes | ( | ) |
Definition at line 117 of file KDChartDataValueAttributes.cpp.
BackgroundAttributes DataValueAttributes::backgroundAttributes | ( | ) | const |
Definition at line 194 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.
Definition at line 264 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator==().
int DataValueAttributes::decimalDigits | ( | ) | const |
Definition at line 234 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator<<(), and operator==().
|
static |
Definition at line 145 of file KDChartDataValueAttributes.cpp.
Referenced by defaultAttributesAsVariant().
|
static |
Definition at line 152 of file KDChartDataValueAttributes.cpp.
References defaultAttributes().
Referenced by KDChart::AttributesModel::AttributesModel().
FrameAttributes DataValueAttributes::frameAttributes | ( | ) | const |
Definition at line 184 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator<<(), and operator==().
bool DataValueAttributes::isVisible | ( | ) | const |
Definition at line 164 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by contains(), operator<<(), operator==(), and KDChart::AbstractDiagram::paintMarker().
MarkerAttributes DataValueAttributes::markerAttributes | ( | ) | const |
Definition at line 204 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by KDChart::AbstractDiagram::datasetMarkers(), operator==(), and KDChart::AbstractDiagram::paintMarker().
bool DataValueAttributes::mirrorNegativeValueTextRotation | ( | ) | const |
If true, rotation of negative value labels is negated, so that negative values are rotated in opposite direction of textAttributes().rotation(), and in this sense appear "mirrored" to positive value labels, though the text itself is not mirrored, only its rotation.
Definition at line 214 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator==().
const RelativePosition DataValueAttributes::negativePosition | ( | ) | const |
Return the relative positioning of the data value labels.
Definition at line 314 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 107 of file KDChartDataValueAttributes.cpp.
References d.
bool DataValueAttributes::operator== | ( | const DataValueAttributes & | r | ) | const |
Definition at line 123 of file KDChartDataValueAttributes.cpp.
References backgroundAttributes(), dataLabel(), decimalDigits(), frameAttributes(), isVisible(), markerAttributes(), mirrorNegativeValueTextRotation(), negativePosition(), positivePosition(), prefix(), showOverlappingDataLabels(), showRepetitiveDataLabels(), suffix(), textAttributes(), and usePercentage().
const RelativePosition KDChart::DataValueAttributes::position | ( | bool | positive | ) | const |
Definition at line 303 of file KDChartDataValueAttributes.h.
References KDCHART_DECLARE_PRIVATE_BASE_VALUE, KDCHART_DECLARE_SWAP_SPECIALISATION, KDChart::operator<<(), and Q_DECLARE_TYPEINFO().
const RelativePosition DataValueAttributes::positivePosition | ( | ) | const |
Return the relative positioning of the data value labels.
Definition at line 324 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.
Definition at line 244 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.
a | The background attributes to set. |
Definition at line 189 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.
Definition at line 259 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.
digits | The number of decimal digits to use. |
Definition at line 229 of file KDChartDataValueAttributes.cpp.
References d.
void DataValueAttributes::setFrameAttributes | ( | const FrameAttributes & | a | ) |
Set the frame attributes to use for the data value labels area.
a | The frame attributes to set. |
Definition at line 179 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.
a | The marker attributes to set. |
Definition at line 199 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by KDChart::TernaryLineDiagram::TernaryLineDiagram().
void DataValueAttributes::setMirrorNegativeValueTextRotation | ( | bool | enable | ) |
Definition at line 209 of file KDChartDataValueAttributes.cpp.
References d.
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 relation 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 detailed description of KDChart::Position for an illustration of the different possible reference positions.
Definition at line 309 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 relation 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 detailed description of KDChart::Position for an illustration of the different possible reference positions.
Definition at line 319 of file KDChartDataValueAttributes.cpp.
References d.
void DataValueAttributes::setPrefix | ( | const QString | prefix | ) |
Prepend a prefix string to the data value label.
Definition at line 239 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.
showOverlappingDataLabels | Whether data texts overlapping other data value texts of the same diagram are drawn. |
Definition at line 284 of file KDChartDataValueAttributes.cpp.
References d, and showOverlappingDataLabels().
Referenced by KDChart::AbstractDiagram::setAllowOverlappingDataValueTexts().
void DataValueAttributes::setShowRepetitiveDataLabels | ( | bool | showRepetitiveDataLabels | ) |
Set whether data value labels not different from their predecessors should be drawn.
showRepetitiveDataLabels | Whether data value not different from their predecessors are drawn. |
Definition at line 274 of file KDChartDataValueAttributes.cpp.
References d, and showRepetitiveDataLabels().
void DataValueAttributes::setSuffix | ( | const QString | suffix | ) |
Append a suffix string to the data value label.
Definition at line 249 of file KDChartDataValueAttributes.cpp.
References d.
void DataValueAttributes::setTextAttributes | ( | const TextAttributes & | a | ) |
Set the text attributes to use for the data value labels.
a | The text attributes to set. |
Definition at line 169 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.
enable | Whether to enable percentage values |
Definition at line 219 of file KDChartDataValueAttributes.cpp.
References d.
void DataValueAttributes::setVisible | ( | bool | visible | ) |
Set whether data value labels should be displayed.
visible | Whether data value labels should be displayed. |
Definition at line 159 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by KDChart::TernaryLineDiagram::TernaryLineDiagram().
bool DataValueAttributes::showOverlappingDataLabels | ( | ) | const |
Definition at line 279 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator<<(), operator==(), and setShowOverlappingDataLabels().
bool DataValueAttributes::showRepetitiveDataLabels | ( | ) | const |
Definition at line 269 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator<<(), operator==(), and setShowRepetitiveDataLabels().
QString DataValueAttributes::suffix | ( | ) | const |
Returns the string used as a suffix to the data value text.
Definition at line 254 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator==().
TextAttributes DataValueAttributes::textAttributes | ( | ) | const |
Definition at line 174 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator<<(), operator==(), and KDChart::RingDiagram::resize().
bool DataValueAttributes::usePercentage | ( | ) | const |
Definition at line 224 of file KDChartDataValueAttributes.cpp.
References d.
Referenced by operator==().