Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 15 files). Show all
Unified · Split
| @@ -25,7 +25,7 @@ · 24 unmodified lines | ||
| 25 | 25 | #include "QVariantGLM.h" |
| 26 | 26 | #include "SimulationOwner.h" |
| 27 | 27 | #include "ZoneEntityItem.h" |
| 28 | − | |
| 28 | +#include "WebEntityItem.h" | |
| 29 | 29 | |
| 30 | 30 | EntityScriptingInterface::EntityScriptingInterface(bool bidOnSimulationOwnership) : |
| 31 | 31 | _entityTree(NULL), |
| @@ -1453,3 +1453,13 @@ void EntityScriptingInterface::setCostMultiplier(float value) { · 1421 unmodified lines | ||
| 1453 | 1453 | costMultiplier = value; |
| 1454 | 1454 | } |
| 1455 | 1455 | |
| 1456 | +QObject* EntityScriptingInterface::getWebViewRoot(const QUuid& entityID) { | |
| 1457 | + if (auto entity = checkForTreeEntityAndTypeMatch(entityID, EntityTypes::Web)) { | |
| 1458 | + auto webEntity = std::dynamic_pointer_cast<WebEntityItem>(entity); | |
| 1459 | + QObject* root = webEntity->getRootItem(); | |
| 1460 | + qDebug() << "HERE getWebViewRoot root =" << ((void*) root); | |
| 1461 | + return root; | |
| 1462 | + } else { | |
| 1463 | + return nullptr; | |
| 1464 | + } | |
| 1465 | +} | |