mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-19 08:18:05 +02:00
It works!
This commit is contained in:
parent
51c2cc793a
commit
fade8f9c04
4 changed files with 15 additions and 16 deletions
|
@ -74,11 +74,11 @@ OriginalDesktop.Desktop {
|
|||
shown: tablet ? tablet.toolbarMode : false;
|
||||
|
||||
onVisibleChanged: {
|
||||
console.log("ZRF HERE DESKTOP.QML: " + visible);
|
||||
desktop.toolbarVisibleChanged(visible);
|
||||
console.log("ZRF HERE DESKTOP.QML: " + visible + " " + sysToolbar.objectName);
|
||||
desktop.toolbarVisibleChanged(visible, sysToolbar.objectName);
|
||||
}
|
||||
}
|
||||
signal toolbarVisibleChanged(bool isVisible);
|
||||
signal toolbarVisibleChanged(bool isVisible, string toolbarName);
|
||||
|
||||
QtSettings.Settings {
|
||||
id: settings;
|
||||
|
|
|
@ -691,8 +691,7 @@ void OffscreenUi::createDesktop(const QUrl& url) {
|
|||
|
||||
QString toolbarName = newObject->property("toolbarObjectName").toString(); // will return "com.highfidelity.interface.toolbar.system"
|
||||
auto toolbarScriptingInterface = DependencyManager::get<ToolbarScriptingInterface>();
|
||||
_currentToolbarProxy = dynamic_cast<ToolbarProxy*>(toolbarScriptingInterface->getToolbar(toolbarName));
|
||||
connect(_desktop, SIGNAL(toolbarVisibleChanged(bool)), _currentToolbarProxy, SLOT(onToolbarVisibleChanged(bool)));
|
||||
connect(_desktop, SIGNAL(toolbarVisibleChanged(bool, QString)), toolbarScriptingInterface.data(), SLOT(onToolbarVisibleChanged(bool, QString)));
|
||||
|
||||
auto keyboardFocus = new KeyboardFocusHack();
|
||||
connect(_desktop, SIGNAL(showDesktop()), this, SIGNAL(showDesktop()));
|
||||
|
|
|
@ -63,11 +63,6 @@ void ToolbarButtonProxy::editProperties(const QVariantMap& properties) {
|
|||
}
|
||||
}
|
||||
|
||||
void ToolbarProxy::onToolbarVisibleChanged(bool isVisible) {
|
||||
qDebug() << "ZRF HERE IN ENGINE SLOT";
|
||||
emit ToolbarProxy::toolbarVisibleChanged(isVisible);
|
||||
}
|
||||
|
||||
ToolbarProxy::ToolbarProxy(QObject* qmlObject, QObject* parent) : QmlWrapper(qmlObject, parent) {
|
||||
Q_ASSERT(QThread::currentThread() == qApp->thread());
|
||||
}
|
||||
|
@ -125,3 +120,8 @@ ToolbarProxy* ToolbarScriptingInterface::getToolbar(const QString& toolbarId) {
|
|||
|
||||
return new ToolbarProxy(rawToolbar);
|
||||
}
|
||||
|
||||
void ToolbarScriptingInterface::onToolbarVisibleChanged(bool isVisible, QString toolbarName) {
|
||||
qDebug() << "ZRF HERE IN ENGINE SLOT" << isVisible << toolbarName;
|
||||
emit ToolbarScriptingInterface::toolbarVisibleChanged(isVisible, toolbarName);
|
||||
}
|
||||
|
|
|
@ -129,12 +129,6 @@ public:
|
|||
* @param {string[]} propertyList
|
||||
* @returns {object}
|
||||
*/
|
||||
|
||||
public slots:
|
||||
void onToolbarVisibleChanged(bool isVisible);
|
||||
|
||||
signals:
|
||||
void toolbarVisibleChanged(bool isVisible);
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(ToolbarProxy*);
|
||||
|
@ -156,6 +150,12 @@ public:
|
|||
* @returns {ToolbarProxy}
|
||||
*/
|
||||
Q_INVOKABLE ToolbarProxy* getToolbar(const QString& toolbarId);
|
||||
|
||||
public slots:
|
||||
void onToolbarVisibleChanged(bool isVisible, QString toolbarName);
|
||||
|
||||
signals:
|
||||
void toolbarVisibleChanged(bool isVisible, QString toolbarName);
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue