· · · ·
Public Functions | Public Members | Static Public Functions
QCPBarsData Class Reference

Holds the data of one single data point (one bar) for QCPBars. More...

## Public Functions
| QCPBarsData ()
| QCPBarsData (double key, double value)
double | sortKey () const
double | mainKey () const
double | mainValue () const
QCPRange | valueRange () const

## Public Members
double | key
double | value

## Static Public Functions
static QCPBarsData | fromSortKey (double sortKey)
static bool | sortKeyIsMainKey ()

## Detailed Description

Holds the data of one single data point (one bar) for QCPBars.

The stored data is:

- key: coordinate on the key axis of this bar (this is the mainKey and the sortKey)
- value: height coordinate on the value axis of this bar (this is the mainValue)

The container for storing multiple data points is QCPBarsDataContainer. It is a typedef for QCPDataContainer with QCPBarsData as the DataType template parameter. See the documentation there for an explanation regarding the data type's generic methods.

See also
  QCPBarsDataContainer

## Constructor & Destructor Documentation

## § QCPBarsData() [1/2]

QCPBarsData::QCPBarsData | ( |  | ) |

Constructs a bar data point with key and value set to zero.

## § QCPBarsData() [2/2]

QCPBarsData::QCPBarsData | ( | double | key,
|  | double | value
| ) |  |

Constructs a bar data point with the specified key and value.

## Member Function Documentation

## § sortKey()

double QCPBarsData::sortKey | ( |  | ) | const
| inline

Returns the key member of this data point.

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

## § fromSortKey()

static QCPBarsData QCPBarsData::fromSortKey | ( | double | sortKey | ) |
| inline static

Returns a data point with the specified sortKey. All other members are set to zero.

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

## § sortKeyIsMainKey()

static static bool QCPBarsData::sortKeyIsMainKey | ( |  | ) |
| inline static

Since the member key is both the data point key coordinate and the data ordering parameter, this method returns true.

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

## § mainKey()

double QCPBarsData::mainKey | ( |  | ) | const
| inline

Returns the key member of this data point.

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

## § mainValue()

double QCPBarsData::mainValue | ( |  | ) | const
| inline

Returns the value member of this data point.

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

## § valueRange()

QCPRange QCPBarsData::valueRange | ( |  | ) | const
| inline

Returns a QCPRange with both lower and upper boundary set to value of this data point.

For a general explanation of what this method is good for in the context of the data container, see the documentation of QCPDataContainer.

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

- src/plottables/plottable-bars.h
- src/plottables/plottable-bars.cpp