23 #ifndef KDCHARTDATASETPROXYMODEL_H 24 #define KDCHARTDATASETPROXYMODEL_H 27 #include <QSortFilterProxyModel> 29 #include "kdchart_export.h" 33 class IndexOutOfBoundsException;
65 QModelIndex buddy(
const QModelIndex& index )
const override;
67 Qt::ItemFlags flags(
const QModelIndex& index )
const override;
69 QModelIndex index(
int row,
int column,
70 const QModelIndex &parent = QModelIndex() )
const override;
71 QModelIndex parent(
const QModelIndex &child )
const override;
74 QModelIndex mapFromSource (
const QModelIndex & sourceIndex )
const override;
77 QModelIndex mapToSource (
const QModelIndex& proxyIndex )
const override;
80 QVariant data(
const QModelIndex &index,
int role)
const override;
83 bool setData(
const QModelIndex& index,
const QVariant& value,
int role )
override;
86 QVariant headerData (
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
89 void setSourceModel(QAbstractItemModel *sourceModel)
override;
93 void setSourceRootIndex(
const QModelIndex& rootIdx);
101 void resetDatasetDescriptions();
107 void setDatasetColumnDescriptionVector (
const DatasetDescriptionVector& columnConfig );
113 void setDatasetRowDescriptionVector (
const DatasetDescriptionVector& rowConfig );
116 void setDatasetDescriptionVectors (
117 const DatasetDescriptionVector& rowConfig,
118 const DatasetDescriptionVector& columnConfig );
125 bool filterAcceptsColumn (
int sourceColumn,
126 const QModelIndex & )
const override;
130 bool filterAcceptsRow (
int source_row,
const QModelIndex & source_parent )
const override;
135 int mapProxyColumnToSource (
const int& proxyColumn )
const;
138 int mapSourceColumnToProxy (
const int& sourceColumn )
const;
141 int mapProxyRowToSource (
const int& proxyRow )
const;
144 int mapSourceRowToProxy (
const int& sourceRow )
const;
169 void initializeDatasetDecriptors (
170 const DatasetDescriptionVector& inConfiguration,
172 DatasetDescriptionVector& outSourceToProxyMap,
173 DatasetDescriptionVector& outProxyToSourceMap );
175 DatasetDescriptionVector mColSrcToProxyMap;
176 DatasetDescriptionVector mColProxyToSrcMap;
177 DatasetDescriptionVector mRowSrcToProxyMap;
178 DatasetDescriptionVector mRowProxyToSrcMap;
181 int mProxyColumnCount;
182 QModelIndex mRootIndex;
DatasetProxyModel takes a KDChart dataset configuration and translates it into a filtering proxy mode...
QVector< int > DatasetDescriptionVector
Class only listed here to document inheritance of some KDChart classes.
Class only listed here to document inheritance of some KDChart classes.