MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/xstudio / create_qml_item

Method create_qml_item

src/module/src/module.cpp:2502–2511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2500}
2501
2502utility::Uuid Module::create_qml_item(const std::string &qml_code) {
2503
2504 auto name = fmt::format("QML_ITEM{}", attributes_.size());
2505 auto attr = new BooleanAttribute(name, name, false);
2506 attr->set_role_data(Attribute::QmlCode, qml_code);
2507 add_attribute(static_cast<Attribute *>(attr));
2508 expose_attribute_in_model_data(attr, "dynamic qml items", true);
2509 attr->set_value(true);
2510 return attr->uuid();
2511}

Callers 2

cbMethod · 0.45
menu_callbackMethod · 0.45

Calls 5

formatFunction · 0.85
sizeMethod · 0.45
set_role_dataMethod · 0.45
set_valueMethod · 0.45
uuidMethod · 0.45

Tested by

no test coverage detected