QList<quint64> SegmentationProxy::subobject_ids_of_object(const quint64 objId) { QList<quint64> subobjectIds; const auto & obj = objectFromId(objId); for (const auto & elem : obj.subobjects) { subobjectIds.append(elem.get().id); } return subobjectIds; }
void Screen::loadTrackedPins(QDomDocument &doc) { QDomElement root = doc.firstChild().toElement(); QDomElement connections = root.firstChildElement("trackedpins"); for(QDomNode node = connections.firstChild(); !node.isNull(); node = node.nextSibling()) { QDomElement c = node.toElement(); ScreenObject *object = objectFromId(c.attribute("id").toInt()); int pin = c.attribute("pin").toInt(); m_trackedPins[object].append(pin); onPinTracked(object, pin); } }
void SegmentationProxy::change_comment(const quint64 objId, const QString & comment) { Segmentation::singleton().changeComment(objectFromId(objId), comment); }
void SegmentationProxy::add_subobject(const quint64 objId, const quint64 subobjectId) { Segmentation::singleton().newSubObject(objectFromId(objId), subobjectId); }
QList<int> SegmentationProxy::object_location(const quint64 objId) { return objectFromId(objId).location.list(); }
void SegmentationProxy::jump_to_object(const quint64 objId) { Segmentation::singleton().jumpToObject(objectFromId(objId)); }
void SegmentationProxy::unselect_object(const quint64 objId) { Segmentation::singleton().unselectObject(objectFromId(objId)); }
void SegmentationProxy::remove_object(const quint64 objId) { Segmentation::singleton().removeObject(objectFromId(objId)); }
void SegmentationProxy::change_color(const quint64 objId, const QColor & color) { Segmentation::singleton().changeColor(objectFromId(objId), std::make_tuple(color.red(), color.green(), color.blue())); }