History

Settings for Tablet Becomes Toolbar

Anthony J. Thibault committed 9 years ago

Commit 8ccca861 parent 5b1f1506 files · +70 −3Browse files

Showing the changes to libraries/script-engine/src/TabletScriptingInterface.cpp (1 of 6 files). Show all

Unified · Split

libraries/script-engine/src/TabletScriptingInterface.cpp+11−0
@@ -54,10 +54,21 @@ QObject* TabletScriptingInterface::getTablet(const QString& tabletId) { · 53 unmodified lines
5454 // allocate a new tablet, add it to the map then return it.
5555 auto tabletProxy = QSharedPointer<TabletProxy>(new TabletProxy(tabletId));
5656 _tabletProxies[tabletId] = tabletProxy;
57+ tabletProxy->setToolbarMode(_toolbarMode);
5758 return tabletProxy.data();
5859 }
5960 }
6061
62+void TabletScriptingInterface::setToolbarMode(bool toolbarMode) {
63+ std::lock_guard<std::mutex> guard(_mutex);
64+
65+ _toolbarMode = toolbarMode;
66+
67+ for (auto& iter : _tabletProxies) {
68+ iter.second->setToolbarMode(toolbarMode);
69+ }
70+}
71+
6172 void TabletScriptingInterface::setQmlTabletRoot(QString tabletId, QQuickItem* qmlTabletRoot, QObject* qmlOffscreenSurface) {
6273 TabletProxy* tablet = qobject_cast<TabletProxy*>(getTablet(tabletId));
6374 if (tablet) {