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

Method fetchFromModel

src/KDChart/KDChartModelDataCache_p.h:183–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181 }
182
183 T fetchFromModel(int row, int column, int role) const
184 {
185 Q_ASSERT(m_model != nullptr);
186
187 const QModelIndex index = m_model->index(row, column, m_rootIndex);
188 const QVariant data = index.data(role);
189 const T value = data.isNull() ? ModelDataCachePrivate::nan<T>()
190 : (data.value<T>());
191
192 m_data[row][column] = value;
193 m_cacheValid[row][column] = true;
194
195 return value;
196 }
197
198 void columnsInserted(const QModelIndex &parent, int start, int end) override
199 {

Callers

nothing calls this directly

Calls 2

indexMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected