Add Devices::filterByParentDeviceId(const DeviceId &deviceId)
This commit is contained in:
parent
0fb42681af
commit
df4c87de9b
@ -449,3 +449,14 @@ Devices Devices::filterByDeviceClassId(const DeviceClassId &deviceClassId)
|
|||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Devices Devices::filterByParentDeviceId(const DeviceId &deviceId)
|
||||||
|
{
|
||||||
|
Devices ret;
|
||||||
|
foreach (Device *device, *this) {
|
||||||
|
if (device->parentId() == deviceId) {
|
||||||
|
ret << device;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|||||||
@ -169,6 +169,7 @@ public:
|
|||||||
Device* findByParams(const ParamList ¶ms) const;
|
Device* findByParams(const ParamList ¶ms) const;
|
||||||
Devices filterByParam(const ParamTypeId ¶mTypeId, const QVariant &value = QVariant());
|
Devices filterByParam(const ParamTypeId ¶mTypeId, const QVariant &value = QVariant());
|
||||||
Devices filterByDeviceClassId(const DeviceClassId &deviceClassId);
|
Devices filterByDeviceClassId(const DeviceClassId &deviceClassId);
|
||||||
|
Devices filterByParentDeviceId(const DeviceId &deviceId);
|
||||||
};
|
};
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(Device::DeviceError)
|
Q_DECLARE_METATYPE(Device::DeviceError)
|
||||||
|
|||||||
Reference in New Issue
Block a user