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

Method setDefaultForRole

src/KDChart/KDChartAttributesModel.cpp:646–659  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646void AttributesModel::setDefaultForRole(int role, const QVariant &value)
647{
648 if (value.isValid()) {
649 d->defaultsMap.insert(role, value);
650 } else {
651 // erase the possibly existing value to not let the map grow:
652 QMap<int, QVariant>::iterator it = d->defaultsMap.find(role);
653 if (it != d->defaultsMap.end()) {
654 d->defaultsMap.erase(it);
655 }
656 }
657
658 Q_ASSERT(defaultsForRole(role).value<KDChart::DataValueAttributes>() == value.value<KDChart::DataValueAttributes>());
659}
660
661void AttributesModel::setDatasetDimension(int dimension)
662{

Callers 1

TernaryLineDiagramMethod · 0.80

Calls 2

isValidMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected