mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 11:07:07 +02:00
Entirely remove addressBarToggle()
This commit is contained in:
parent
7a7cfb84e5
commit
e6edce5352
5 changed files with 2 additions and 49 deletions
|
@ -1418,11 +1418,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
connect(DependencyManager::get<AudioClient>().data(), &AudioClient::mutedByMixer, this, onMutedByMixer);
|
connect(DependencyManager::get<AudioClient>().data(), &AudioClient::mutedByMixer, this, onMutedByMixer);
|
||||||
|
|
||||||
// Track when the address bar is opened
|
// Track when the address bar is opened
|
||||||
auto onAddressBarToggled = [this]() {
|
auto onAddressBarShown = [this]() {
|
||||||
// Record time
|
// Record time
|
||||||
UserActivityLogger::getInstance().logAction("opened_address_bar", { { "uptime_ms", _sessionRunTimer.elapsed() } });
|
UserActivityLogger::getInstance().logAction("opened_address_bar", { { "uptime_ms", _sessionRunTimer.elapsed() } });
|
||||||
};
|
};
|
||||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarToggled, this, onAddressBarToggled);
|
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarShown, this, onAddressBarShown);
|
||||||
|
|
||||||
// Make sure we don't time out during slow operations at startup
|
// Make sure we don't time out during slow operations at startup
|
||||||
updateHeartbeat();
|
updateHeartbeat();
|
||||||
|
|
|
@ -16,8 +16,6 @@
|
||||||
#include "ui/DialogsManager.h"
|
#include "ui/DialogsManager.h"
|
||||||
|
|
||||||
DialogsManagerScriptingInterface::DialogsManagerScriptingInterface() {
|
DialogsManagerScriptingInterface::DialogsManagerScriptingInterface() {
|
||||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarToggled,
|
|
||||||
this, &DialogsManagerScriptingInterface::addressBarToggled);
|
|
||||||
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarShown,
|
connect(DependencyManager::get<DialogsManager>().data(), &DialogsManager::addressBarShown,
|
||||||
this, &DialogsManagerScriptingInterface::addressBarShown);
|
this, &DialogsManagerScriptingInterface::addressBarShown);
|
||||||
}
|
}
|
||||||
|
@ -28,11 +26,6 @@ DialogsManagerScriptingInterface* DialogsManagerScriptingInterface::getInstance(
|
||||||
return &sharedInstance;
|
return &sharedInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsManagerScriptingInterface::toggleAddressBar() {
|
|
||||||
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
|
||||||
"toggleAddressBar", Qt::QueuedConnection);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DialogsManagerScriptingInterface::showAddressBar() {
|
void DialogsManagerScriptingInterface::showAddressBar() {
|
||||||
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
QMetaObject::invokeMethod(DependencyManager::get<DialogsManager>().data(),
|
||||||
"showAddressBar", Qt::QueuedConnection);
|
"showAddressBar", Qt::QueuedConnection);
|
||||||
|
|
|
@ -22,12 +22,10 @@ public:
|
||||||
Q_INVOKABLE void showFeed();
|
Q_INVOKABLE void showFeed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void toggleAddressBar();
|
|
||||||
void showAddressBar();
|
void showAddressBar();
|
||||||
void hideAddressBar();
|
void hideAddressBar();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void addressBarToggled();
|
|
||||||
void addressBarShown(bool visible);
|
void addressBarShown(bool visible);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -46,42 +46,6 @@ void DialogsManager::maybeCreateDialog(QPointer<T>& member) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogsManager::toggleAddressBar() {
|
|
||||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
|
||||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
|
||||||
if (tablet->getToolbarMode()) {
|
|
||||||
if (tablet->isPathLoaded(TABLET_ADDRESS_DIALOG)) {
|
|
||||||
tablet->gotoHomeScreen();
|
|
||||||
emit addressBarToggled();
|
|
||||||
} else {
|
|
||||||
tablet->loadQMLSource(TABLET_ADDRESS_DIALOG);
|
|
||||||
emit addressBarToggled();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (hmd->getShouldShowTablet()) {
|
|
||||||
if (tablet->isPathLoaded(TABLET_ADDRESS_DIALOG) && _closeAddressBar) {
|
|
||||||
tablet->gotoHomeScreen();
|
|
||||||
hmd->closeTablet();
|
|
||||||
_closeAddressBar = false;
|
|
||||||
emit addressBarToggled();
|
|
||||||
} else {
|
|
||||||
tablet->loadQMLSource(TABLET_ADDRESS_DIALOG);
|
|
||||||
qApp->setKeyboardFocusOverlay(hmd->getCurrentTabletScreenID());
|
|
||||||
_closeAddressBar = true;
|
|
||||||
emit addressBarToggled();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tablet->loadQMLSource(TABLET_ADDRESS_DIALOG);
|
|
||||||
hmd->openTablet();
|
|
||||||
qApp->setKeyboardFocusOverlay(hmd->getCurrentTabletScreenID());
|
|
||||||
_closeAddressBar = true;
|
|
||||||
emit addressBarToggled();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void DialogsManager::showAddressBar() {
|
void DialogsManager::showAddressBar() {
|
||||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||||
|
|
|
@ -41,7 +41,6 @@ public:
|
||||||
void emitAddressBarShown(bool visible) { emit addressBarShown(visible); }
|
void emitAddressBarShown(bool visible) { emit addressBarShown(visible); }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void toggleAddressBar();
|
|
||||||
void showAddressBar();
|
void showAddressBar();
|
||||||
void hideAddressBar();
|
void hideAddressBar();
|
||||||
void showFeed();
|
void showFeed();
|
||||||
|
@ -58,7 +57,6 @@ public slots:
|
||||||
void showUpdateDialog();
|
void showUpdateDialog();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void addressBarToggled();
|
|
||||||
void addressBarShown(bool visible);
|
void addressBarShown(bool visible);
|
||||||
void setUseFeed(bool useFeed);
|
void setUseFeed(bool useFeed);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue