Internally used class just adding a special constructor used by AbstractDiagram. More...
#include <KDChartAbstractDiagram.h>
Public Types | |
enum | PaletteType { PaletteTypeDefault = 0, PaletteTypeRainbow = 1, PaletteTypeSubdued = 2 } |
Signals | |
void | attributesChanged (const QModelIndex &, const QModelIndex &) |
Public Member Functions | |
int | columnCount (const QModelIndex &) const |
[reimplemented] | |
bool | compare (const AttributesModel *other) const |
Returns true if both, all of the attributes set, and the palette set is equal in both of the AttributeModels. | |
bool | compareAttributes (int role, const QVariant &a, const QVariant &b) const |
QVariant | data (const QModelIndex &, int role=Qt::DisplayRole) const |
[reimplemented] | |
QVariant | data (int column, int role) const |
Returns the data that were specified at per column level, or the globally set data, or the default data, or QVariant(). | |
QVariant | data (int role) const |
Returns the data that were specified at global level, or the default data, or QVariant(). | |
virtual QVariant | defaultHeaderData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
Returns default values for the header data. | |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
[reimplemented] | |
QModelIndex | index (int row, int col, const QModelIndex &index) const |
void | initFrom (const AttributesModel *other) |
Copies the internal data (maps and palette) of another AttributesModel* into this one. | |
bool | isKnownAttributesRole (int role) const |
Returns whether the given role corresponds to one of the known internally used ones. | |
QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const |
QModelIndex | mapToSource (const QModelIndex &proxyIndex) const |
QVariant | modelData (int role) const |
PaletteType | paletteType () const |
QModelIndex | parent (const QModelIndex &index) const |
PrivateAttributesModel (QAbstractItemModel *model, QObject *parent=0) | |
bool | resetData (const QModelIndex &index, int role=Qt::DisplayRole) |
Remove any explicit attributes settings that might have been specified before. | |
bool | resetHeaderData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) |
Remove any explicit attributes settings that might have been specified before. | |
int | rowCount (const QModelIndex &) const |
[reimplemented] | |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::DisplayRole) |
[reimplemented] | |
void | setDefaultForRole (int role, const QVariant &value) |
Define the default value for a certain role. | |
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::DisplayRole) |
[reimplemented] | |
bool | setModelData (const QVariant value, int role) |
void | setPaletteType (PaletteType type) |
Sets the palettetype used by this attributesmodel. | |
void | setSourceModel (QAbstractItemModel *sourceModel) |
[reimplemented] | |
Protected Member Functions | |
const QMap< int, QMap< int, QMap< int, QVariant > > > | dataMap () const |
needed for serialization | |
const QMap< int, QMap< int, QVariant > > | horizontalHeaderDataMap () const |
needed for serialization | |
const QMap< int, QVariant > | modelDataMap () const |
needed for serialization | |
void | setDataMap (const QMap< int, QMap< int, QMap< int, QVariant > > > map) |
needed for serialization | |
void | setHorizontalHeaderDataMap (const QMap< int, QMap< int, QVariant > > map) |
needed for serialization | |
void | setModelDataMap (const QMap< int, QVariant > map) |
needed for serialization | |
void | setVerticalHeaderDataMap (const QMap< int, QMap< int, QVariant > > map) |
needed for serialization | |
const QMap< int, QMap< int, QVariant > > | verticalHeaderDataMap () const |
needed for serialization |
Internally used class just adding a special constructor used by AbstractDiagram.
Definition at line 723 of file KDChartAbstractDiagram.h.
enum KDChart::AttributesModel::PaletteType [inherited] |
Definition at line 44 of file KDChartAttributesModel.h.
KDChart::PrivateAttributesModel::PrivateAttributesModel | ( | QAbstractItemModel * | model, | |
QObject * | parent = 0 | |||
) | [explicit] |
Definition at line 726 of file KDChartAbstractDiagram.h.
void KDChart::AttributesModel::attributesChanged | ( | const QModelIndex & | , | |
const QModelIndex & | ||||
) | [signal, inherited] |
int AttributesModel::columnCount | ( | const QModelIndex & | index | ) | const [inherited] |
[reimplemented]
Definition at line 547 of file KDChartAttributesModel.cpp.
References KDChart::AbstractProxyModel::mapToSource().
Referenced by KDChart::AbstractDiagram::datasetBrushes(), KDChart::AbstractDiagram::datasetLabels(), KDChart::AbstractDiagram::datasetMarkers(), KDChart::AbstractDiagram::datasetPens(), and KDChart::AttributesModel::setModelData().
bool AttributesModel::compare | ( | const AttributesModel * | other | ) | const [inherited] |
Returns true if both, all of the attributes set, and the palette set is equal in both of the AttributeModels.
Definition at line 78 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::compareAttributes(), and KDChart::AttributesModel::paletteType().
Referenced by KDChart::AbstractDiagram::compare().
bool AttributesModel::compareAttributes | ( | int | role, | |
const QVariant & | a, | |||
const QVariant & | b | |||
) | const [inherited] |
Definition at line 226 of file KDChartAttributesModel.cpp.
References KDChart::BarAttributesRole, KDChart::DataHiddenRole, KDChart::DatasetBrushRole, KDChart::DatasetPenRole, KDChart::DataValueLabelAttributesRole, KDChart::AttributesModel::isKnownAttributesRole(), KDChart::LineAttributesRole, KDChart::PieAttributesRole, KDChart::StockBarAttributesRole, KDChart::ThreeDAttributesRole, KDChart::ThreeDBarAttributesRole, KDChart::ThreeDLineAttributesRole, KDChart::ThreeDPieAttributesRole, and KDChart::ValueTrackerAttributesRole.
Referenced by KDChart::AttributesModel::compare().
QVariant AttributesModel::data | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | const [inherited] |
[reimplemented]
Definition at line 393 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::data(), KDChart::AttributesModel::dataMap(), and KDChart::AbstractProxyModel::mapToSource().
QVariant AttributesModel::data | ( | int | column, | |
int | role | |||
) | const [inherited] |
Returns the data that were specified at per column level, or the globally set data, or the default data, or QVariant().
Definition at line 377 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::data(), KDChart::AttributesModel::headerData(), and KDChart::AttributesModel::isKnownAttributesRole().
QVariant AttributesModel::data | ( | int | role | ) | const [inherited] |
Returns the data that were specified at global level, or the default data, or QVariant().
Definition at line 359 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::isKnownAttributesRole(), and KDChart::AttributesModel::modelData().
Referenced by KDChart::AbstractDiagram::brush(), KDChart::AttributesModel::data(), KDChart::AbstractDiagram::dataValueAttributes(), KDChart::AttributesModel::headerData(), KDChart::AbstractDiagram::isHidden(), and KDChart::AbstractDiagram::pen().
const QMap< int, QMap< int, QMap< int, QVariant > > > AttributesModel::dataMap | ( | ) | const [protected, inherited] |
needed for serialization
Definition at line 669 of file KDChartAttributesModel.cpp.
Referenced by KDChart::AttributesModel::data(), KDChart::AttributesModel::headerData(), KDChart::AttributesModel::setData(), and KDChart::AttributesModel::setHeaderData().
QVariant AttributesModel::defaultHeaderData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const [virtual, inherited] |
Returns default values for the header data.
Definition at line 323 of file KDChartAttributesModel.cpp.
References KDChart::DatasetBrushRole, KDChart::DatasetPenRole, KDChart::Palette::defaultPalette(), KDChart::Palette::getBrush(), KDChart::AttributesModel::headerData(), KDChart::AttributesModel::modelData(), KDChart::AttributesModel::paletteType(), KDChart::AttributesModel::PaletteTypeDefault, KDChart::AttributesModel::PaletteTypeRainbow, KDChart::AttributesModel::PaletteTypeSubdued, KDChart::Palette::rainbowPalette(), and KDChart::Palette::subduedPalette().
Referenced by KDChart::AttributesModel::headerData().
QVariant AttributesModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const [inherited] |
[reimplemented]
Definition at line 288 of file KDChartAttributesModel.cpp.
References KDChart::ColumnDataRole, KDChart::AttributesModel::data(), KDChart::AttributesModel::dataMap(), KDChart::AttributesModel::defaultHeaderData(), and KDChart::AbstractProxyModel::index().
Referenced by KDChart::AttributesModel::data(), KDChart::AbstractDiagram::datasetLabels(), KDChart::AttributesModel::defaultHeaderData(), KDChart::AbstractDiagram::itemRowLabels(), and KDChart::AttributesModel::setHeaderData().
const QMap< int, QMap< int, QVariant > > AttributesModel::horizontalHeaderDataMap | ( | ) | const [protected, inherited] |
needed for serialization
Definition at line 674 of file KDChartAttributesModel.cpp.
QModelIndex KDChart::AbstractProxyModel::index | ( | int | row, | |
int | col, | |||
const QModelIndex & | index | |||
) | const [inherited] |
[reimplemented]
Definition at line 77 of file KDChartAbstractProxyModel.cpp.
References KDChart::AbstractProxyModel::mapFromSource(), and KDChart::AbstractProxyModel::mapToSource().
Referenced by KDChart::AttributesModel::headerData(), KDChart::AttributesModel::setHeaderData(), and KDChart::AttributesModel::setModelData().
void AttributesModel::initFrom | ( | const AttributesModel * | other | ) | [inherited] |
Copies the internal data (maps and palette) of another AttributesModel* into this one.
Definition at line 65 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::paletteType(), and KDChart::AttributesModel::setPaletteType().
Referenced by KDChart::AbstractDiagram::setModel().
bool AttributesModel::isKnownAttributesRole | ( | int | role | ) | const [inherited] |
Returns whether the given role corresponds to one of the known internally used ones.
Definition at line 433 of file KDChartAttributesModel.cpp.
References KDChart::BarAttributesRole, KDChart::DataHiddenRole, KDChart::DatasetBrushRole, KDChart::DatasetPenRole, KDChart::DataValueLabelAttributesRole, KDChart::LineAttributesRole, KDChart::PieAttributesRole, KDChart::StockBarAttributesRole, KDChart::ThreeDAttributesRole, KDChart::ThreeDBarAttributesRole, KDChart::ThreeDLineAttributesRole, KDChart::ThreeDPieAttributesRole, and KDChart::ValueTrackerAttributesRole.
Referenced by KDChart::AttributesModel::compareAttributes(), KDChart::AttributesModel::data(), KDChart::AttributesModel::setData(), and KDChart::AttributesModel::setHeaderData().
QModelIndex KDChart::AbstractProxyModel::mapFromSource | ( | const QModelIndex & | sourceIndex | ) | const [inherited] |
[reimplemented]
Definition at line 45 of file KDChartAbstractProxyModel.cpp.
Referenced by KDChart::AbstractProxyModel::index(), and KDChart::AbstractProxyModel::parent().
QModelIndex KDChart::AbstractProxyModel::mapToSource | ( | const QModelIndex & | proxyIndex | ) | const [inherited] |
[reimplemented]
Definition at line 58 of file KDChartAbstractProxyModel.cpp.
Referenced by KDChart::AttributesModel::columnCount(), KDChart::AttributesModel::data(), KDChart::AbstractProxyModel::index(), KDChart::AbstractProxyModel::parent(), KDChart::AttributesModel::rowCount(), and KDChart::AttributesModel::setData().
QVariant KDChart::AttributesModel::modelData | ( | int | role | ) | const [inherited] |
Definition at line 533 of file KDChartAttributesModel.cpp.
Referenced by KDChart::AttributesModel::data(), KDChart::AbstractDiagram::dataValueAttributes(), KDChart::AttributesModel::defaultHeaderData(), and KDChart::AbstractDiagram::isHidden().
const QMap< int, QVariant > AttributesModel::modelDataMap | ( | ) | const [protected, inherited] |
needed for serialization
Definition at line 684 of file KDChartAttributesModel.cpp.
AttributesModel::PaletteType AttributesModel::paletteType | ( | ) | const [inherited] |
Definition at line 517 of file KDChartAttributesModel.cpp.
Referenced by KDChart::AttributesModel::compare(), KDChart::AttributesModel::defaultHeaderData(), and KDChart::AttributesModel::initFrom().
QModelIndex KDChart::AbstractProxyModel::parent | ( | const QModelIndex & | index | ) | const [inherited] |
[reimplemented]
Definition at line 83 of file KDChartAbstractProxyModel.cpp.
References KDChart::AbstractProxyModel::mapFromSource(), and KDChart::AbstractProxyModel::mapToSource().
bool AttributesModel::resetData | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | [inherited] |
Remove any explicit attributes settings that might have been specified before.
Definition at line 478 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::setData().
bool AttributesModel::resetHeaderData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | [inherited] |
Remove any explicit attributes settings that might have been specified before.
Definition at line 507 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::setHeaderData().
int AttributesModel::rowCount | ( | const QModelIndex & | index | ) | const [inherited] |
[reimplemented]
Definition at line 538 of file KDChartAttributesModel.cpp.
References KDChart::AbstractProxyModel::mapToSource().
Referenced by KDChart::AbstractDiagram::itemRowLabels(), KDChart::AttributesModel::setHeaderData(), and KDChart::AttributesModel::setModelData().
bool AttributesModel::setData | ( | const QModelIndex & | index, | |
const QVariant & | value, | |||
int | role = Qt::DisplayRole | |||
) | [inherited] |
[reimplemented]
Definition at line 464 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::attributesChanged(), KDChart::AttributesModel::dataMap(), KDChart::AttributesModel::isKnownAttributesRole(), and KDChart::AbstractProxyModel::mapToSource().
Referenced by KDChart::AttributesModel::resetData(), KDChart::BarDiagram::setBarAttributes(), KDChart::AbstractDiagram::setBrush(), and KDChart::AbstractDiagram::setPen().
void AttributesModel::setDataMap | ( | const QMap< int, QMap< int, QMap< int, QVariant > > > | map | ) | [protected, inherited] |
needed for serialization
Definition at line 690 of file KDChartAttributesModel.cpp.
void AttributesModel::setDefaultForRole | ( | int | role, | |
const QVariant & | value | |||
) | [inherited] |
Define the default value for a certain role.
Passing a default-constructed QVariant is equivalent to removing the default.
Definition at line 710 of file KDChartAttributesModel.cpp.
Referenced by KDChart::AttributesModel::AttributesModel(), and KDChart::TernaryLineDiagram::TernaryLineDiagram().
bool AttributesModel::setHeaderData | ( | int | section, | |
Qt::Orientation | orientation, | |||
const QVariant & | value, | |||
int | role = Qt::DisplayRole | |||
) | [inherited] |
[reimplemented]
Definition at line 483 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::attributesChanged(), KDChart::AttributesModel::dataMap(), KDChart::AttributesModel::headerData(), KDChart::AbstractProxyModel::index(), KDChart::AttributesModel::isKnownAttributesRole(), and KDChart::AttributesModel::rowCount().
Referenced by KDChart::AttributesModel::resetHeaderData().
void AttributesModel::setHorizontalHeaderDataMap | ( | const QMap< int, QMap< int, QVariant > > | map | ) | [protected, inherited] |
needed for serialization
Definition at line 695 of file KDChartAttributesModel.cpp.
bool KDChart::AttributesModel::setModelData | ( | const QVariant | value, | |
int | role | |||
) | [inherited] |
Definition at line 522 of file KDChartAttributesModel.cpp.
References KDChart::AttributesModel::attributesChanged(), KDChart::AttributesModel::columnCount(), KDChart::AbstractProxyModel::index(), and KDChart::AttributesModel::rowCount().
Referenced by KDChart::AbstractDiagram::setBrush(), and KDChart::AbstractDiagram::setPen().
void AttributesModel::setModelDataMap | ( | const QMap< int, QVariant > | map | ) | [protected, inherited] |
needed for serialization
Definition at line 705 of file KDChartAttributesModel.cpp.
void AttributesModel::setPaletteType | ( | AttributesModel::PaletteType | type | ) | [inherited] |
Sets the palettetype used by this attributesmodel.
Definition at line 512 of file KDChartAttributesModel.cpp.
Referenced by KDChart::AttributesModel::initFrom().
void AttributesModel::setSourceModel | ( | QAbstractItemModel * | sourceModel | ) | [inherited] |
[reimplemented]
Definition at line 556 of file KDChartAttributesModel.cpp.
Referenced by KDChart::AttributesModel::AttributesModel().
void AttributesModel::setVerticalHeaderDataMap | ( | const QMap< int, QMap< int, QVariant > > | map | ) | [protected, inherited] |
needed for serialization
Definition at line 700 of file KDChartAttributesModel.cpp.
const QMap< int, QMap< int, QVariant > > AttributesModel::verticalHeaderDataMap | ( | ) | const [protected, inherited] |
needed for serialization
Definition at line 679 of file KDChartAttributesModel.cpp.