MCPcopy Create free account
hub / github.com/KDAB/KDChart / filterAcceptsColumn

Method filterAcceptsColumn

src/KDChart/KDChartDatasetProxyModel.cpp:128–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

126}
127
128bool DatasetProxyModel::filterAcceptsColumn(int sourceColumn,
129 const QModelIndex &) const
130{
131 if (mColSrcToProxyMap.isEmpty()) { // no column mapping set up yet, all columns are passed down:
132 return true;
133 } else {
134 Q_ASSERT(sourceModel());
135 Q_ASSERT(mColSrcToProxyMap.size() == sourceModel()->columnCount(mRootIndex));
136 if (mColSrcToProxyMap[sourceColumn] == -1) { // this column is explicitly not accepted:
137 return false;
138 } else {
139 Q_ASSERT(mColSrcToProxyMap[sourceColumn] >= 0
140 && mColSrcToProxyMap[sourceColumn] < mColSrcToProxyMap.size());
141 return true;
142 }
143 }
144}
145
146int DatasetProxyModel::mapProxyRowToSource(const int &proxyRow) const
147{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
isEmptyMethod · 0.45
columnCountMethod · 0.45

Tested by

no test coverage detected