Entities update
This commit is contained in:
parent
4a3951938a
commit
05776f19f3
6 changed files with 18 additions and 7 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#include "dpoint_entity.h"
|
||||
|
||||
dpoint_entity::dpoint_entity(const QString &title) : _title(title) {
|
||||
this->_id = 0;
|
||||
dpoint_entity::dpoint_entity(entity_id dispatcher_id, const QString &title) : _dispatcher_id(dispatcher_id), _title(title) {
|
||||
this->_id = dispatcher_id;
|
||||
auto hash = QCryptographicHash::hash(title.toLocal8Bit(), QCryptographicHash::Md5);
|
||||
for (auto bit : hash) {
|
||||
this->_id += bit;
|
||||
|
|
@ -12,6 +12,10 @@ entity_id dpoint_entity::id() const {
|
|||
return this->_id;
|
||||
}
|
||||
|
||||
entity_id dpoint_entity::dispatcher() const {
|
||||
return this->_dispatcher_id;
|
||||
}
|
||||
|
||||
QString dpoint_entity::title() const {
|
||||
return this->_title;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue