KDChart::PrivateAttributesModel Class Reference

Internally used class just adding a special constructor used by AbstractDiagram. More...

#include <KDChartAbstractDiagram.h>

Inheritance diagram for KDChart::PrivateAttributesModel:
Inheritance graph
[legend]
Collaboration diagram for KDChart::PrivateAttributesModel:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

Internally used class just adding a special constructor used by AbstractDiagram.

Definition at line 723 of file KDChartAbstractDiagram.h.


Member Enumeration Documentation

Enumerator:
PaletteTypeDefault 
PaletteTypeRainbow 
PaletteTypeSubdued 

Definition at line 44 of file KDChartAttributesModel.h.


Constructor & Destructor Documentation

KDChart::PrivateAttributesModel::PrivateAttributesModel ( QAbstractItemModel *  model,
QObject parent = 0 
) [explicit]

Definition at line 726 of file KDChartAbstractDiagram.h.


Member Function Documentation

void KDChart::AttributesModel::attributesChanged ( const QModelIndex &  ,
const QModelIndex &   
) [signal, inherited]
int AttributesModel::columnCount ( const QModelIndex &  index  )  const [inherited]
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]
QVariant AttributesModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const [inherited]
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]
const QMap< int, QMap< int, QMap< int, QVariant > > > AttributesModel::dataMap (  )  const [protected, inherited]
QVariant AttributesModel::defaultHeaderData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const [virtual, inherited]
QVariant AttributesModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const [inherited]
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]
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]
QModelIndex KDChart::AbstractProxyModel::mapFromSource ( const QModelIndex &  sourceIndex  )  const [inherited]
QModelIndex KDChart::AbstractProxyModel::mapToSource ( const QModelIndex &  proxyIndex  )  const [inherited]
QVariant KDChart::AttributesModel::modelData ( int  role  )  const [inherited]
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]
QModelIndex KDChart::AbstractProxyModel::parent ( const QModelIndex &  index  )  const [inherited]
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]
bool AttributesModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::DisplayRole 
) [inherited]
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]
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]
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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-chart/