KD Chart 2  [rev.2.5.1]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Types | Signals | Public Member Functions | List of all members
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]

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] More...
 
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. More...
 
bool compareAttributes (int role, const QVariant &a, const QVariant &b) const
 
QVariant data (int role) const
 Returns the data that were specified at global level, or the default data, or QVariant(). More...
 
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(). More...
 
QVariant data (const QModelIndex &, int role=Qt::DisplayRole) const
 [reimplemented] More...
 
int datasetDimension () const
 
virtual QVariant defaultHeaderData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 Returns default values for the header data. More...
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 [reimplemented] More...
 
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. More...
 
bool isKnownAttributesRole (int role) const
 Returns whether the given role corresponds to one of the known internally used ones. More...
 
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. More...
 
bool resetHeaderData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole)
 Remove any explicit attributes settings that might have been specified before. More...
 
int rowCount (const QModelIndex &) const
 [reimplemented] More...
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::DisplayRole)
 [reimplemented] More...
 
void setDatasetDimension (int dimension)
 Set the dimension of the dataset in the source model. More...
 
void setDefaultForRole (int role, const QVariant &value)
 Define the default value for a certain role. More...
 
bool setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::DisplayRole)
 [reimplemented] More...
 
bool setModelData (const QVariant value, int role)
 
void setPaletteType (PaletteType type)
 Sets the palettetype used by this attributesmodel. More...
 
void setSourceModel (QAbstractItemModel *sourceModel)
 [reimplemented] More...
 

Detailed Description

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

Definition at line 730 of file KDChartAbstractDiagram.h.

Member Enumeration Documentation

Enumerator
PaletteTypeDefault 
PaletteTypeRainbow 
PaletteTypeSubdued 

Definition at line 51 of file KDChartAttributesModel.h.

Constructor & Destructor Documentation

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

Definition at line 733 of file KDChartAbstractDiagram.h.

Member Function Documentation

void KDChart::AttributesModel::attributesChanged ( const QModelIndex &  ,
const QModelIndex &   
)
signalinherited
int AttributesModel::columnCount ( const QModelIndex &  index) const
inherited

[reimplemented]

Definition at line 515 of file KDChartAttributesModel.cpp.

References KDChart::AbstractProxyModel::mapToSource().

Referenced by KDChart::AttributesModel::setHeaderData().

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 123 of file KDChartAttributesModel.cpp.

References KDChart::AttributesModel::compareAttributes(), d, 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 ( int  role) 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 319 of file KDChartAttributesModel.cpp.

References KDChart::AttributesModel::data(), KDChart::AttributesModel::headerData(), and KDChart::AttributesModel::isKnownAttributesRole().

QVariant AttributesModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
inherited
int AttributesModel::datasetDimension ( ) const
inherited

Definition at line 717 of file KDChartAttributesModel.cpp.

References d.

QVariant AttributesModel::defaultHeaderData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
virtualinherited
QVariant AttributesModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
inherited
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 92 of file KDChartAttributesModel.cpp.

References d.

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
AttributesModel::PaletteType AttributesModel::paletteType ( ) const
inherited

Definition at line 482 of file KDChartAttributesModel.cpp.

References d.

Referenced by KDChart::AttributesModel::compare().

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 415 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 456 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::setDatasetDimension ( int  dimension)
inherited

Set the dimension of the dataset in the source model.

See Also
AbstractDiagram::setDatasetDimension

Definition at line 711 of file KDChartAttributesModel.cpp.

References d.

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 696 of file KDChartAttributesModel.cpp.

References d.

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
bool KDChart::AttributesModel::setModelData ( const QVariant  value,
int  role 
)
inherited
void AttributesModel::setPaletteType ( AttributesModel::PaletteType  type)
inherited
void AttributesModel::setSourceModel ( QAbstractItemModel *  sourceModel)
inherited

[reimplemented]

Definition at line 524 of file KDChartAttributesModel.cpp.

Referenced by KDChart::AttributesModel::AttributesModel().


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

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