mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 13:58:51 +02:00
Add toggle event for address bar.
This commit is contained in:
parent
1655dea2c3
commit
e5b8701215
4 changed files with 20 additions and 2 deletions
|
@ -11,8 +11,16 @@
|
||||||
|
|
||||||
#include "DialogsManagerScriptingInterface.h"
|
#include "DialogsManagerScriptingInterface.h"
|
||||||
|
|
||||||
|
#include <DependencyManager.h>
|
||||||
|
|
||||||
#include "ui/DialogsManager.h"
|
#include "ui/DialogsManager.h"
|
||||||
|
|
||||||
void DialogsManagerScriptingInterface::toggleAddressBar() {
|
DialogsManagerScriptingInterface::DialogsManagerScriptingInterface() {
|
||||||
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(), "toggleAddressBar", Qt::QueuedConnection);
|
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarToggled,
|
||||||
|
this, &DialogsManagerScriptingInterface::addressBarToggled);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DialogsManagerScriptingInterface::toggleAddressBar() {
|
||||||
|
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
||||||
|
"toggleAddressBar", Qt::QueuedConnection);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,14 @@
|
||||||
|
|
||||||
class DialogsManagerScriptingInterface : public QObject {
|
class DialogsManagerScriptingInterface : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
DialogsManagerScriptingInterface();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void toggleAddressBar();
|
void toggleAddressBar();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void addressBarToggled();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
void DialogsManager::toggleAddressBar() {
|
void DialogsManager::toggleAddressBar() {
|
||||||
AddressBarDialog::toggle();
|
AddressBarDialog::toggle();
|
||||||
|
emit addressBarToggled();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsManager::toggleDiskCacheEditor() {
|
void DialogsManager::toggleDiskCacheEditor() {
|
||||||
|
|
|
@ -72,6 +72,9 @@ public slots:
|
||||||
// Application Update
|
// Application Update
|
||||||
void showUpdateDialog();
|
void showUpdateDialog();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void addressBarToggled();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void toggleToolWindow();
|
void toggleToolWindow();
|
||||||
void hmdToolsClosed();
|
void hmdToolsClosed();
|
||||||
|
|
Loading…
Reference in a new issue