bool AMDetector::cancelAcquisition() { if(!canCancel()) return false; if(acceptableChangeAcquisitionState(Cancelling)) { if(autoSetCancelling_) setAcquisitionState(Cancelling); return cancelAcquisitionImplementation(); } return false; }
QVariantMap TransferItem::itemDataWithRoleNames() const { QVariantMap map; map[roles.value(CanCancelRole)] = canCancel(); map[roles.value(CanPauseRole)] = canPause(); map[roles.value(CanStartRole)] = canStart(); map[roles.value(ExpandedRole)] = expanded(); map[roles.value(ItemTypeRole)] = itemType(); map[roles.value(ItemTypeStringRole)] = itemTypeString(); map[roles.value(RowRole)] = row(); map[roles.value(RowCountRole)] = rowCount(); return map; }
QMap<int, QVariant> TransferItem::itemData() const { QMap<int, QVariant> map; map[CanCancelRole] = canCancel(); map[CanPauseRole] = canPause(); map[CanStartRole] = canStart(); map[ExpandedRole] = expanded(); map[ItemTypeRole] = itemType(); map[ItemTypeStringRole] = itemTypeString(); map[RowRole] = row(); map[RowCountRole] = rowCount(); return map; }
QVariant TransferItem::data(int role) const { switch (role) { case CanCancelRole: return canCancel(); case CanPauseRole: return canPause(); case CanStartRole: return canStart(); case ExpandedRole: return expanded(); case ItemTypeRole: return itemType(); case ItemTypeStringRole: return itemTypeString(); case RowRole: return row(); case RowCountRole: return rowCount(); default: return QVariant(); } }