示例#1
0
void LoginDialog::showWithSelection() {
    auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
    auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
    auto hmd = DependencyManager::get<HMDScriptingInterface>();

    if (!qApp->isHMDMode()) {
        if (qApp->getLoginDialogPoppedUp()) {
            LoginDialog::show();
            return;
        } else {
            if (!tablet->isPathLoaded(TABLET_LOGIN_DIALOG_URL)) {
                tablet->loadQMLSource(TABLET_LOGIN_DIALOG_URL);
            }
        }
    } else {
        if (!qApp->getLoginDialogPoppedUp()) {
            tablet->initialScreen(TABLET_LOGIN_DIALOG_URL);
        } else {
            qApp->createLoginDialogOverlay();
        }
    }

    if (!hmd->getShouldShowTablet()) {
        hmd->openTablet();
    }
}
示例#2
0
void LoginDialog::showWithSelection()
{
    auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
    auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
    auto hmd = DependencyManager::get<HMDScriptingInterface>();

    if (tablet->getToolbarMode()) {
        LoginDialog::show();
    } else {
        static const QUrl url("../../dialogs/TabletLoginDialog.qml");
        tablet->initialScreen(url);
        if (!hmd->getShouldShowTablet()) {
            hmd->openTablet();
        }
    }
}
示例#3
0
void DialogsManager::setDomainConnectionFailureVisibility(bool visible) {
    auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
    auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));

    if (tablet->getToolbarMode()) {
        if (visible) {
            ConnectionFailureDialog::show();
        } else {
            ConnectionFailureDialog::hide();
        }
    } else {
        static const QUrl url("dialogs/TabletConnectionFailureDialog.qml");
        auto hmd = DependencyManager::get<HMDScriptingInterface>();
        if (visible) {
            tablet->initialScreen(url);
            if (!hmd->getShouldShowTablet()) {
                hmd->openTablet();
            }
        }
    }
}