mirror of https://github.com/nymea/nymea.git
added a ctor to autogenerate an id
parent
5554ee785a
commit
dde0bcc868
|
|
@ -1,6 +1,16 @@
|
|||
#include "devicedescriptor.h"
|
||||
|
||||
DeviceDescriptor::DeviceDescriptor()
|
||||
DeviceDescriptor::DeviceDescriptor():
|
||||
m_id(DeviceDescriptorId::createDeviceDescriptorId())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
DeviceDescriptor::DeviceDescriptor(const DeviceClassId &deviceClassId, const QString &title, const QString &description):
|
||||
m_id(DeviceDescriptorId::createDeviceDescriptorId()),
|
||||
m_deviceClassId(deviceClassId),
|
||||
m_title(title),
|
||||
m_description(description)
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ class DeviceDescriptor
|
|||
{
|
||||
public:
|
||||
DeviceDescriptor();
|
||||
DeviceDescriptor(const DeviceClassId &deviceClassId, const QString &title = QString(), const QString &description = QString());
|
||||
DeviceDescriptor(const DeviceDescriptorId &id, const DeviceClassId &deviceClassId, const QString &title = QString(), const QString &description = QString());
|
||||
|
||||
bool isValid() const;
|
||||
|
|
|
|||
Loading…
Reference in New Issue