#include "component_display.h" #include "schema_display.h" namespace display { Schema::Schema() { this->setScene(&scene); } void Schema::setSchema(domain::Schema* _schema) { scene.clear(); this->schema = _schema; if(schema != nullptr) { for(auto &instance: schema->componentInstances) { scene.addItem(new display::ComponentGroup(instance)); } for(auto &instance: schema->busInstances) { if(instance->bus.getDisplay().has_value()) { scene.addItem(new display::BusGroup(instance)); } } } } } // namespace display