Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 5 files). Show all
Unified · Split
| @@ -47,6 +47,20 @@ void TabletScriptingInterface::setQmlTabletRoot(QString tabletId, QQuickItem* qm · 46 unmodified lines | ||
| 47 | 47 | } |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | +QQuickWindow* TabletScriptingInterface::getTabletWindow() { | |
| 51 | + TabletProxy* tablet = qobject_cast<TabletProxy*>(getTablet("com.highfidelity.interface.tablet.system")); | |
| 52 | + QObject* qmlSurface = tablet->getTabletSurface(); | |
| 53 | + OffscreenQmlSurface* surface = dynamic_cast<OffscreenQmlSurface*>(qmlSurface); | |
| 54 | + QQuickWindow* window = surface->getWindow(); | |
| 55 | + return window; | |
| 56 | +} | |
| 57 | + | |
| 58 | +QObject* TabletScriptingInterface::getFlags() | |
| 59 | +{ | |
| 60 | + auto offscreenUi = DependencyManager::get<OffscreenUi>(); | |
| 61 | + return offscreenUi->getFlags(); | |
| 62 | +} | |
| 63 | + | |
| 50 | 64 | // |
| 51 | 65 | // TabletProxy |
| 52 | 66 | // |
| @@ -200,6 +214,10 @@ void TabletProxy::addButtonsToHomeScreen() { · 147 unmodified lines | ||
| 200 | 214 | QObject::disconnect(loader, SIGNAL(loaded()), this, SLOT(addButtonsToHomeScreen())); |
| 201 | 215 | } |
| 202 | 216 | |
| 217 | +QObject* TabletProxy::getTabletSurface() { | |
| 218 | + return _qmlOffscreenSurface; | |
| 219 | +} | |
| 220 | + | |
| 203 | 221 | void TabletProxy::addButtonsToMenuScreen() { |
| 204 | 222 | if (!_qmlTabletRoot) { |
| 205 | 223 | return; |