Delivery point editor done
This commit is contained in:
parent
a6c080d36b
commit
3e196f3574
22 changed files with 379 additions and 74 deletions
|
|
@ -20,10 +20,28 @@ QString dpoint_entity::title() const {
|
|||
return this->_title;
|
||||
}
|
||||
|
||||
void dpoint_entity::set_title(const QString &new_title) {
|
||||
this->_title = new_title;
|
||||
}
|
||||
|
||||
const QVector<storage_entity> dpoint_entity::storages() {
|
||||
return this->_storages;
|
||||
}
|
||||
|
||||
void dpoint_entity::set_storages(QVector<storage_entity> storages) {
|
||||
this->_storages = storages;
|
||||
}
|
||||
|
||||
void dpoint_entity::remove_storage(entity_id sid) {
|
||||
std::remove_if(this->_storages.begin(), this->_storages.end(), [sid](storage_entity ent) {
|
||||
return ent.id() == sid;
|
||||
});
|
||||
}
|
||||
|
||||
void dpoint_entity::add_storage(storage_entity ent) {
|
||||
this->_storages.push_back(ent);
|
||||
}
|
||||
|
||||
void dpoint_entity::serialize(QDataStream &output) {
|
||||
output << this->_id << this->_title << this->_storages.size();
|
||||
for (auto &item : this->_storages) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue