mirror of
https://github.com/JulianGro/overte.git
synced 2025-07-14 04:26:38 +02:00
checking to see if I did something blocking the build
This commit is contained in:
parent
de233e456e
commit
dec176b921
7 changed files with 647 additions and 429 deletions
67
browserUI/warning.qml
Normal file
67
browserUI/warning.qml
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
Rectangle {
|
||||||
|
id:permissionsContainer
|
||||||
|
visible:false
|
||||||
|
color: "#000000"
|
||||||
|
width: parent.width
|
||||||
|
anchors.top: buttons.bottom
|
||||||
|
height:40
|
||||||
|
z:100
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop { position: 0.0; color: "black" }
|
||||||
|
GradientStop { position: 1.0; color: "grey" }
|
||||||
|
}
|
||||||
|
|
||||||
|
RalewayLight {
|
||||||
|
id: permissionsInfo
|
||||||
|
anchors.right:permissionsRow.left
|
||||||
|
anchors.rightMargin: 32
|
||||||
|
anchors.topMargin:8
|
||||||
|
anchors.top:parent.top
|
||||||
|
text: "This site wants to use your microphone/camera"
|
||||||
|
size: 18
|
||||||
|
color: hifi.colors.white
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: permissionsRow
|
||||||
|
spacing: 4
|
||||||
|
anchors.top:parent.top
|
||||||
|
anchors.topMargin: 8
|
||||||
|
anchors.right: parent.right
|
||||||
|
visible: true
|
||||||
|
z:101
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id:allow
|
||||||
|
text: "Allow"
|
||||||
|
color: hifi.buttons.blue
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
width: 120
|
||||||
|
enabled: true
|
||||||
|
onClicked: root.allowPermissions();
|
||||||
|
z:101
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
id:block
|
||||||
|
text: "Block"
|
||||||
|
color: hifi.buttons.red
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
width: 120
|
||||||
|
enabled: true
|
||||||
|
onClicked: root.hidePermissionsBar();
|
||||||
|
z:101
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function hidePermissionsBar(){
|
||||||
|
permissionsContainer.visible=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function allowPermissions(){
|
||||||
|
webview.grantFeaturePermission(permissionsBar.securityOrigin, permissionsBar.feature, true);
|
||||||
|
hidePermissionsBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ import QtWebChannel 1.0
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
|
|
||||||
import stylesUit 1.0 as StylesUIt
|
import stylesUit 1.0 as StylesUIt
|
||||||
|
import "../hifi/PermissionPopup.qml" as PermissionPopup
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: flick
|
id: flick
|
||||||
|
@ -140,8 +141,14 @@ Item {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PermissionPopup {
|
||||||
|
id: permissionPopup
|
||||||
|
}
|
||||||
|
|
||||||
onFeaturePermissionRequested: {
|
onFeaturePermissionRequested: {
|
||||||
grantFeaturePermission(securityOrigin, feature, false);
|
console.log("Requesting permissions:")
|
||||||
|
permissionPopup.visible = true;
|
||||||
|
// grantFeaturePermission(securityOrigin, feature, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//disable popup
|
//disable popup
|
||||||
|
|
82
interface/resources/qml/hifi/PermissionPopup.qml
Normal file
82
interface/resources/qml/hifi/PermissionPopup.qml
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
import QtQuick 2.5
|
||||||
|
import controlsUit 1.0 as HifiControls
|
||||||
|
import stylesUit 1.0 as HifiStyles
|
||||||
|
import "../windows" as Windows
|
||||||
|
import "../."
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: root
|
||||||
|
width: 600
|
||||||
|
height: 200
|
||||||
|
z:100
|
||||||
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
|
// anchors.top: buttons.bottom
|
||||||
|
Rectangle {
|
||||||
|
id: mainContainer
|
||||||
|
width: root.width
|
||||||
|
height: root.height
|
||||||
|
color: hifi.colors.white
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: webAccessHeaderContainer
|
||||||
|
height: root.height * 0.30
|
||||||
|
RalewayLight {
|
||||||
|
id: webAccessHeaderText
|
||||||
|
text: "WEB CAMERA ACCESS REQUEST"
|
||||||
|
width: mainContainer.width
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
font.bold: true
|
||||||
|
color: hifi.colors.black
|
||||||
|
size: 17
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: webAccessInfoContainer
|
||||||
|
anchors.top: webAccessHeaderContainer.bottom
|
||||||
|
anchors.topMargin: 10
|
||||||
|
RalewayLight {
|
||||||
|
width: mainContainer.width
|
||||||
|
id: webAccessInfoText
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
text: "This domain is requesting access to your web camera and microphone"
|
||||||
|
size: 17
|
||||||
|
color: hifi.colors.black
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: permissionsButtonRow
|
||||||
|
color: "#AAAAAA"
|
||||||
|
anchors.topMargin: 10
|
||||||
|
height: 50
|
||||||
|
width: leftButton.width + rightButton.width + (this.space * 3)
|
||||||
|
anchors.top: webAccessInfoContainer.bottom
|
||||||
|
anchors.horizontalCenter: webAccessInfoContainer.horizontalCenter
|
||||||
|
anchors.verticalCenter: webAccessInfoContainer.verticalCenter
|
||||||
|
property real space: 5
|
||||||
|
Button {
|
||||||
|
anchors.left: permissionsButtonRow.left
|
||||||
|
id: leftButton
|
||||||
|
anchors.leftMargin: permissionsButtonRow.space
|
||||||
|
|
||||||
|
text: "Yes allow access"
|
||||||
|
color: hifi.buttons.blue
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
enabled: true
|
||||||
|
width: 155
|
||||||
|
}
|
||||||
|
Button {
|
||||||
|
id: rightButton
|
||||||
|
anchors.left: leftButton.right
|
||||||
|
anchors.leftMargin: permissionsButtonRow.space
|
||||||
|
text: "Don't Allow"
|
||||||
|
color: hifi.buttons.red
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
enabled: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
34
interface/resources/qml/hifi/PermissionPopupBackground.qml
Normal file
34
interface/resources/qml/hifi/PermissionPopupBackground.qml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
import QtQuick 2.5
|
||||||
|
import controlsUit 1.0
|
||||||
|
import stylesUit 1.0
|
||||||
|
import "../windows"
|
||||||
|
import "../."
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: permissionPopupBackground
|
||||||
|
anchors.fill: parent
|
||||||
|
color: QT.rgba(0, 0, 0, 0.7);
|
||||||
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
|
PermissionPopup {
|
||||||
|
id: permissionPopupItem
|
||||||
|
visible: false
|
||||||
|
Component.onCompleted: {
|
||||||
|
console.log("\n\n TESTING!! \n\n")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onFeaturePermissionRequested: {
|
||||||
|
permissionPopupItem.onLeftButtonClicked = function() {
|
||||||
|
console.log("TEST FOR PERMISSIONS :: LEFT CLICKED");
|
||||||
|
grantFeaturePermission(securityOrigin, feature, true);
|
||||||
|
.visible = false;
|
||||||
|
}
|
||||||
|
permissionPopupItem.onRightButtonClicked = function() {
|
||||||
|
console.log("TEST FOR PERMISSIONS :: RIGHT CLICKED");
|
||||||
|
grantFeaturePermission(securityOrigin, feature, false);
|
||||||
|
permissionPopupBackground.visible = false;
|
||||||
|
}
|
||||||
|
permissionPopupBackground.visible = true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -56,6 +56,12 @@
|
||||||
|
|
||||||
#include "scripting/RenderScriptingInterface.h"
|
#include "scripting/RenderScriptingInterface.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
QSharedPointer<OffscreenUi> getOff() {
|
||||||
|
return DependencyManager::get<OffscreenUi>();
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
extern bool DEV_DECIMATE_TEXTURES;
|
extern bool DEV_DECIMATE_TEXTURES;
|
||||||
|
|
||||||
Menu* Menu::getInstance() {
|
Menu* Menu::getInstance() {
|
||||||
|
@ -76,16 +82,15 @@ Menu::Menu() {
|
||||||
addActionToQMenuAndActionHash(fileMenu, MenuOption::Login);
|
addActionToQMenuAndActionHash(fileMenu, MenuOption::Login);
|
||||||
|
|
||||||
// connect to the appropriate signal of the AccountManager so that we can change the Login/Logout menu item
|
// connect to the appropriate signal of the AccountManager so that we can change the Login/Logout menu item
|
||||||
connect(accountManager.data(), &AccountManager::profileChanged,
|
connect(accountManager.data(), &AccountManager::profileChanged, dialogsManager.data(),
|
||||||
dialogsManager.data(), &DialogsManager::toggleLoginDialog);
|
&DialogsManager::toggleLoginDialog);
|
||||||
connect(accountManager.data(), &AccountManager::logoutComplete,
|
connect(accountManager.data(), &AccountManager::logoutComplete, dialogsManager.data(),
|
||||||
dialogsManager.data(), &DialogsManager::toggleLoginDialog);
|
&DialogsManager::toggleLoginDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
// File > Quit
|
// File > Quit
|
||||||
addActionToQMenuAndActionHash(fileMenu, MenuOption::Quit, Qt::CTRL | Qt::Key_Q, qApp, SLOT(quit()), QAction::QuitRole);
|
addActionToQMenuAndActionHash(fileMenu, MenuOption::Quit, Qt::CTRL | Qt::Key_Q, qApp, SLOT(quit()), QAction::QuitRole);
|
||||||
|
|
||||||
|
|
||||||
// Edit menu ----------------------------------
|
// Edit menu ----------------------------------
|
||||||
MenuWrapper* editMenu = addMenu("Edit");
|
MenuWrapper* editMenu = addMenu("Edit");
|
||||||
|
|
||||||
|
@ -133,8 +138,7 @@ Menu::Menu() {
|
||||||
editMenu->addSeparator();
|
editMenu->addSeparator();
|
||||||
|
|
||||||
// Edit > Asset Browser
|
// Edit > Asset Browser
|
||||||
auto assetServerAction = addActionToQMenuAndActionHash(editMenu, MenuOption::AssetServer,
|
auto assetServerAction = addActionToQMenuAndActionHash(editMenu, MenuOption::AssetServer, Qt::CTRL | Qt::SHIFT | Qt::Key_A,
|
||||||
Qt::CTRL | Qt::SHIFT | Qt::Key_A,
|
|
||||||
qApp, SLOT(showAssetServerWidget()));
|
qApp, SLOT(showAssetServerWidget()));
|
||||||
{
|
{
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
@ -145,9 +149,7 @@ Menu::Menu() {
|
||||||
// Edit > Avatar Packager
|
// Edit > Avatar Packager
|
||||||
#ifndef Q_OS_ANDROID
|
#ifndef Q_OS_ANDROID
|
||||||
action = addActionToQMenuAndActionHash(editMenu, MenuOption::AvatarPackager);
|
action = addActionToQMenuAndActionHash(editMenu, MenuOption::AvatarPackager);
|
||||||
connect(action, &QAction::triggered, [] {
|
connect(action, &QAction::triggered, [] { DependencyManager::get<AvatarPackager>()->open(); });
|
||||||
DependencyManager::get<AvatarPackager>()->open();
|
|
||||||
});
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Edit > Reload All Content
|
// Edit > Reload All Content
|
||||||
|
@ -162,7 +164,6 @@ Menu::Menu() {
|
||||||
QActionGroup* displayModeGroup = new QActionGroup(displayModeMenu);
|
QActionGroup* displayModeGroup = new QActionGroup(displayModeMenu);
|
||||||
displayModeGroup->setExclusive(true);
|
displayModeGroup->setExclusive(true);
|
||||||
|
|
||||||
|
|
||||||
// View menu ----------------------------------
|
// View menu ----------------------------------
|
||||||
MenuWrapper* viewMenu = addMenu("View");
|
MenuWrapper* viewMenu = addMenu("View");
|
||||||
QActionGroup* cameraModeGroup = new QActionGroup(viewMenu);
|
QActionGroup* cameraModeGroup = new QActionGroup(viewMenu);
|
||||||
|
@ -171,31 +172,29 @@ Menu::Menu() {
|
||||||
cameraModeGroup->setExclusive(true);
|
cameraModeGroup->setExclusive(true);
|
||||||
|
|
||||||
// View > First Person
|
// View > First Person
|
||||||
auto firstPersonAction = cameraModeGroup->addAction(addCheckableActionToQMenuAndActionHash(
|
auto firstPersonAction = cameraModeGroup->addAction(
|
||||||
viewMenu, MenuOption::FirstPerson, 0,
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FirstPerson, 0, true, qApp, SLOT(cameraMenuChanged())));
|
||||||
true, qApp, SLOT(cameraMenuChanged())));
|
|
||||||
|
|
||||||
firstPersonAction->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(cameraModeGroup));
|
firstPersonAction->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(cameraModeGroup));
|
||||||
|
|
||||||
// View > Third Person
|
// View > Third Person
|
||||||
auto thirdPersonAction = cameraModeGroup->addAction(addCheckableActionToQMenuAndActionHash(
|
auto thirdPersonAction = cameraModeGroup->addAction(
|
||||||
viewMenu, MenuOption::ThirdPerson, 0,
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::ThirdPerson, 0, false, qApp, SLOT(cameraMenuChanged())));
|
||||||
false, qApp, SLOT(cameraMenuChanged())));
|
|
||||||
|
|
||||||
thirdPersonAction->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(cameraModeGroup));
|
thirdPersonAction->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(cameraModeGroup));
|
||||||
|
|
||||||
// View > Mirror
|
// View > Mirror
|
||||||
auto viewMirrorAction = cameraModeGroup->addAction(addCheckableActionToQMenuAndActionHash(
|
auto viewMirrorAction =
|
||||||
viewMenu, MenuOption::FullscreenMirror, 0,
|
cameraModeGroup->addAction(addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FullscreenMirror, 0, false,
|
||||||
false, qApp, SLOT(cameraMenuChanged())));
|
qApp, SLOT(cameraMenuChanged())));
|
||||||
|
|
||||||
viewMirrorAction->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(cameraModeGroup));
|
viewMirrorAction->setProperty(EXCLUSION_GROUP_KEY, QVariant::fromValue(cameraModeGroup));
|
||||||
|
|
||||||
viewMenu->addSeparator();
|
viewMenu->addSeparator();
|
||||||
|
|
||||||
// View > Center Player In View
|
// View > Center Player In View
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::CenterPlayerInView,
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::CenterPlayerInView, 0, true, qApp,
|
||||||
0, true, qApp, SLOT(rotationModeChanged()));
|
SLOT(rotationModeChanged()));
|
||||||
|
|
||||||
// View > Enter First Person Mode in HMD
|
// View > Enter First Person Mode in HMD
|
||||||
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FirstPersonHMD, 0, true);
|
addCheckableActionToQMenuAndActionHash(viewMenu, MenuOption::FirstPersonHMD, 0, true);
|
||||||
|
@ -210,21 +209,19 @@ Menu::Menu() {
|
||||||
|
|
||||||
// Navigate > Copy Address
|
// Navigate > Copy Address
|
||||||
auto addressManager = DependencyManager::get<AddressManager>();
|
auto addressManager = DependencyManager::get<AddressManager>();
|
||||||
addActionToQMenuAndActionHash(navigateMenu, MenuOption::CopyAddress, 0,
|
addActionToQMenuAndActionHash(navigateMenu, MenuOption::CopyAddress, 0, addressManager.data(), SLOT(copyAddress()));
|
||||||
addressManager.data(), SLOT(copyAddress()));
|
|
||||||
|
|
||||||
// Navigate > Copy Path
|
// Navigate > Copy Path
|
||||||
addActionToQMenuAndActionHash(navigateMenu, MenuOption::CopyPath, 0,
|
addActionToQMenuAndActionHash(navigateMenu, MenuOption::CopyPath, 0, addressManager.data(), SLOT(copyPath()));
|
||||||
addressManager.data(), SLOT(copyPath()));
|
|
||||||
|
|
||||||
// Navigate > Start-up Location
|
// Navigate > Start-up Location
|
||||||
MenuWrapper* startupLocationMenu = navigateMenu->addMenu(MenuOption::StartUpLocation);
|
MenuWrapper* startupLocationMenu = navigateMenu->addMenu(MenuOption::StartUpLocation);
|
||||||
QActionGroup* startupLocatiopnGroup = new QActionGroup(startupLocationMenu);
|
QActionGroup* startupLocatiopnGroup = new QActionGroup(startupLocationMenu);
|
||||||
startupLocatiopnGroup->setExclusive(true);
|
startupLocatiopnGroup->setExclusive(true);
|
||||||
startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0,
|
startupLocatiopnGroup->addAction(
|
||||||
false));
|
addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::HomeLocation, 0, false));
|
||||||
startupLocatiopnGroup->addAction(addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0,
|
startupLocatiopnGroup->addAction(
|
||||||
true));
|
addCheckableActionToQMenuAndActionHash(startupLocationMenu, MenuOption::LastLocation, 0, true));
|
||||||
|
|
||||||
// Settings menu ----------------------------------
|
// Settings menu ----------------------------------
|
||||||
MenuWrapper* settingsMenu = addMenu("Settings");
|
MenuWrapper* settingsMenu = addMenu("Settings");
|
||||||
|
@ -275,6 +272,20 @@ Menu::Menu() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
action = addActionToQMenuAndActionHash(editMenu, "Test Permissions");
|
||||||
|
connect(action, &QAction::triggered, [] {
|
||||||
|
auto logMessage = [=](QQmlContext* context, QObject* newObject) {
|
||||||
|
qCDebug(interfaceapp) << "Testing permissions setting";
|
||||||
|
};
|
||||||
|
|
||||||
|
qCDebug(interfaceapp) << "\n\nTesting permissions setting\n\n";
|
||||||
|
static const QUrl url{ "hifi/Permission.qml" };
|
||||||
|
|
||||||
|
DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", logMessage);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
// Settings > Security...
|
// Settings > Security...
|
||||||
action = addActionToQMenuAndActionHash(settingsMenu, "Security...");
|
action = addActionToQMenuAndActionHash(settingsMenu, "Security...");
|
||||||
connect(action, &QAction::triggered, [] {
|
connect(action, &QAction::triggered, [] {
|
||||||
|
@ -301,9 +312,7 @@ Menu::Menu() {
|
||||||
|
|
||||||
// Developer > Scripting > Console...
|
// Developer > Scripting > Console...
|
||||||
addActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::Console, Qt::CTRL | Qt::ALT | Qt::Key_J,
|
addActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::Console, Qt::CTRL | Qt::ALT | Qt::Key_J,
|
||||||
DependencyManager::get<StandAloneJSConsole>().data(),
|
DependencyManager::get<StandAloneJSConsole>().data(), SLOT(toggleConsole()), QAction::NoRole,
|
||||||
SLOT(toggleConsole()),
|
|
||||||
QAction::NoRole,
|
|
||||||
UNSPECIFIED_POSITION);
|
UNSPECIFIED_POSITION);
|
||||||
|
|
||||||
// Developer > Scripting > API Debugger
|
// Developer > Scripting > API Debugger
|
||||||
|
@ -315,8 +324,8 @@ Menu::Menu() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Developer > Scripting > Entity Script Server Log
|
// Developer > Scripting > Entity Script Server Log
|
||||||
auto essLogAction = addActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::EntityScriptServerLog, 0,
|
auto essLogAction = addActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::EntityScriptServerLog, 0, qApp,
|
||||||
qApp, SLOT(toggleEntityScriptServerLogDialog()));
|
SLOT(toggleEntityScriptServerLogDialog()));
|
||||||
{
|
{
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
QObject::connect(nodeList.data(), &NodeList::canRezChanged, essLogAction, [essLogAction] {
|
QObject::connect(nodeList.data(), &NodeList::canRezChanged, essLogAction, [essLogAction] {
|
||||||
|
@ -327,22 +336,20 @@ Menu::Menu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Developer > Scripting > Script Log (HMD friendly)...
|
// Developer > Scripting > Script Log (HMD friendly)...
|
||||||
addActionToQMenuAndActionHash(scriptingOptionsMenu, "Script Log (HMD friendly)...", Qt::NoButton,
|
addActionToQMenuAndActionHash(scriptingOptionsMenu, "Script Log (HMD friendly)...", Qt::NoButton, qApp,
|
||||||
qApp, SLOT(showScriptLogs()));
|
SLOT(showScriptLogs()));
|
||||||
|
|
||||||
// Developer > Scripting > Verbose Logging
|
// Developer > Scripting > Verbose Logging
|
||||||
addCheckableActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::VerboseLogging, 0, false,
|
addCheckableActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::VerboseLogging, 0, false, qApp,
|
||||||
qApp, SLOT(updateVerboseLogging()));
|
SLOT(updateVerboseLogging()));
|
||||||
|
|
||||||
// Developer > Scripting > Enable Speech Control API
|
// Developer > Scripting > Enable Speech Control API
|
||||||
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
|
#if defined(Q_OS_MAC) || defined(Q_OS_WIN)
|
||||||
auto speechRecognizer = DependencyManager::get<SpeechRecognizer>();
|
auto speechRecognizer = DependencyManager::get<SpeechRecognizer>();
|
||||||
QAction* speechRecognizerAction = addCheckableActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::ControlWithSpeech,
|
QAction* speechRecognizerAction =
|
||||||
Qt::CTRL | Qt::SHIFT | Qt::Key_C,
|
addCheckableActionToQMenuAndActionHash(scriptingOptionsMenu, MenuOption::ControlWithSpeech,
|
||||||
speechRecognizer->getEnabled(),
|
Qt::CTRL | Qt::SHIFT | Qt::Key_C, speechRecognizer->getEnabled(),
|
||||||
speechRecognizer.data(),
|
speechRecognizer.data(), SLOT(setEnabled(bool)), UNSPECIFIED_POSITION);
|
||||||
SLOT(setEnabled(bool)),
|
|
||||||
UNSPECIFIED_POSITION);
|
|
||||||
connect(speechRecognizer.data(), SIGNAL(enabledUpdated(bool)), speechRecognizerAction, SLOT(setChecked(bool)));
|
connect(speechRecognizer.data(), SIGNAL(enabledUpdated(bool)), speechRecognizerAction, SLOT(setChecked(bool)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -355,27 +362,26 @@ Menu::Menu() {
|
||||||
addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::Overlays, 0, true);
|
addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::Overlays, 0, true);
|
||||||
|
|
||||||
// Developer > UI > Desktop Tablet Becomes Toolbar
|
// Developer > UI > Desktop Tablet Becomes Toolbar
|
||||||
connect(action, &QAction::triggered, [action] {
|
connect(action, &QAction::triggered, [action] { qApp->setDesktopTabletBecomesToolbarSetting(action->isChecked()); });
|
||||||
qApp->setDesktopTabletBecomesToolbarSetting(action->isChecked());
|
|
||||||
});
|
|
||||||
|
|
||||||
// Developer > UI > HMD Tablet Becomes Toolbar
|
// Developer > UI > HMD Tablet Becomes Toolbar
|
||||||
action = addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::HMDTabletToToolbar, 0,
|
action = addCheckableActionToQMenuAndActionHash(uiOptionsMenu, MenuOption::HMDTabletToToolbar, 0,
|
||||||
qApp->getHmdTabletBecomesToolbarSetting());
|
qApp->getHmdTabletBecomesToolbarSetting());
|
||||||
connect(action, &QAction::triggered, [action] {
|
connect(action, &QAction::triggered, [action] { qApp->setHmdTabletBecomesToolbarSetting(action->isChecked()); });
|
||||||
qApp->setHmdTabletBecomesToolbarSetting(action->isChecked());
|
|
||||||
});
|
|
||||||
|
|
||||||
// Developer > Render >>>
|
// Developer > Render >>>
|
||||||
MenuWrapper* renderOptionsMenu = developerMenu->addMenu("Render");
|
MenuWrapper* renderOptionsMenu = developerMenu->addMenu("Render");
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::AntiAliasing, 0, RenderScriptingInterface::getInstance()->getAntialiasingEnabled(),
|
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::AntiAliasing, 0,
|
||||||
|
RenderScriptingInterface::getInstance()->getAntialiasingEnabled(),
|
||||||
RenderScriptingInterface::getInstance(), SLOT(setAntialiasingEnabled(bool)));
|
RenderScriptingInterface::getInstance(), SLOT(setAntialiasingEnabled(bool)));
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::Shadows, 0, RenderScriptingInterface::getInstance()->getShadowsEnabled(),
|
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::Shadows, 0,
|
||||||
|
RenderScriptingInterface::getInstance()->getShadowsEnabled(),
|
||||||
RenderScriptingInterface::getInstance(), SLOT(setShadowsEnabled(bool)));
|
RenderScriptingInterface::getInstance(), SLOT(setShadowsEnabled(bool)));
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::AmbientOcclusion, 0, RenderScriptingInterface::getInstance()->getAmbientOcclusionEnabled(),
|
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::AmbientOcclusion, 0,
|
||||||
|
RenderScriptingInterface::getInstance()->getAmbientOcclusionEnabled(),
|
||||||
RenderScriptingInterface::getInstance(), SLOT(setAmbientOcclusionEnabled(bool)));
|
RenderScriptingInterface::getInstance(), SLOT(setAmbientOcclusionEnabled(bool)));
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::WorldAxes);
|
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::WorldAxes);
|
||||||
|
@ -398,7 +404,8 @@ Menu::Menu() {
|
||||||
MenuWrapper* textureMenu = renderOptionsMenu->addMenu(MenuOption::RenderMaxTextureMemory);
|
MenuWrapper* textureMenu = renderOptionsMenu->addMenu(MenuOption::RenderMaxTextureMemory);
|
||||||
QActionGroup* textureGroup = new QActionGroup(textureMenu);
|
QActionGroup* textureGroup = new QActionGroup(textureMenu);
|
||||||
textureGroup->setExclusive(true);
|
textureGroup->setExclusive(true);
|
||||||
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTextureAutomatic, 0, true));
|
textureGroup->addAction(
|
||||||
|
addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTextureAutomatic, 0, true));
|
||||||
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture4MB, 0, false));
|
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture4MB, 0, false));
|
||||||
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture64MB, 0, false));
|
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture64MB, 0, false));
|
||||||
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture256MB, 0, false));
|
textureGroup->addAction(addCheckableActionToQMenuAndActionHash(textureMenu, MenuOption::RenderMaxTexture256MB, 0, false));
|
||||||
|
@ -437,7 +444,8 @@ Menu::Menu() {
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
// Developer > Render > Enable Sparse Textures
|
// Developer > Render > Enable Sparse Textures
|
||||||
{
|
{
|
||||||
auto action = addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::SparseTextureManagement, 0, gpu::Texture::getEnableSparseTextures());
|
auto action = addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::SparseTextureManagement, 0,
|
||||||
|
gpu::Texture::getEnableSparseTextures());
|
||||||
connect(action, &QAction::triggered, [&](bool checked) {
|
connect(action, &QAction::triggered, [&](bool checked) {
|
||||||
qDebug() << "[TEXTURE TRANSFER SUPPORT] --- Enable Dynamic Texture Management menu option:" << checked;
|
qDebug() << "[TEXTURE TRANSFER SUPPORT] --- Enable Dynamic Texture Management menu option:" << checked;
|
||||||
gpu::Texture::setEnableSparseTextures(checked);
|
gpu::Texture::setEnableSparseTextures(checked);
|
||||||
|
@ -445,10 +453,10 @@ Menu::Menu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
qDebug() << "[TEXTURE TRANSFER SUPPORT] Incremental Texture Transfer and Dynamic Texture Management not supported on this platform.";
|
qDebug() << "[TEXTURE TRANSFER SUPPORT] Incremental Texture Transfer and Dynamic Texture Management not supported on this "
|
||||||
|
"platform.";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
auto action = addActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::RenderClearKtxCache);
|
auto action = addActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::RenderClearKtxCache);
|
||||||
connect(action, &QAction::triggered, [] {
|
connect(action, &QAction::triggered, [] {
|
||||||
|
@ -457,24 +465,22 @@ Menu::Menu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Developer > Render > LOD Tools
|
// Developer > Render > LOD Tools
|
||||||
addActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::LodTools, 0,
|
addActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::LodTools, 0, qApp, SLOT(loadLODToolsDialog()));
|
||||||
qApp, SLOT(loadLODToolsDialog()));
|
|
||||||
|
|
||||||
// HACK enable texture decimation
|
// HACK enable texture decimation
|
||||||
{
|
{
|
||||||
auto action = addCheckableActionToQMenuAndActionHash(renderOptionsMenu, "Decimate Textures");
|
auto action = addCheckableActionToQMenuAndActionHash(renderOptionsMenu, "Decimate Textures");
|
||||||
connect(action, &QAction::triggered, [&](bool checked) {
|
connect(action, &QAction::triggered, [&](bool checked) { DEV_DECIMATE_TEXTURES = checked; });
|
||||||
DEV_DECIMATE_TEXTURES = checked;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::ComputeBlendshapes, 0, true,
|
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::ComputeBlendshapes, 0, true,
|
||||||
DependencyManager::get<ModelBlender>().data(), SLOT(setComputeBlendshapes(bool)));
|
DependencyManager::get<ModelBlender>().data(), SLOT(setComputeBlendshapes(bool)));
|
||||||
|
|
||||||
{
|
{
|
||||||
auto drawStatusConfig = qApp->getRenderEngine()->getConfiguration()->getConfig<render::DrawStatus>("RenderMainView.DrawStatus");
|
auto drawStatusConfig =
|
||||||
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::HighlightTransitions, 0, false,
|
qApp->getRenderEngine()->getConfiguration()->getConfig<render::DrawStatus>("RenderMainView.DrawStatus");
|
||||||
drawStatusConfig, SLOT(setShowFade(bool)));
|
addCheckableActionToQMenuAndActionHash(renderOptionsMenu, MenuOption::HighlightTransitions, 0, false, drawStatusConfig,
|
||||||
|
SLOT(setShowFade(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Developer > Assets >>>
|
// Developer > Assets >>>
|
||||||
|
@ -485,8 +491,7 @@ Menu::Menu() {
|
||||||
auto& atpMigrator = ATPAssetMigrator::getInstance();
|
auto& atpMigrator = ATPAssetMigrator::getInstance();
|
||||||
atpMigrator.setDialogParent(this);
|
atpMigrator.setDialogParent(this);
|
||||||
|
|
||||||
addActionToQMenuAndActionHash(assetDeveloperMenu, MenuOption::AssetMigration,
|
addActionToQMenuAndActionHash(assetDeveloperMenu, MenuOption::AssetMigration, 0, &atpMigrator,
|
||||||
0, &atpMigrator,
|
|
||||||
SLOT(loadEntityServerFile()));
|
SLOT(loadEntityServerFile()));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -502,21 +507,21 @@ Menu::Menu() {
|
||||||
#ifdef HAVE_DDE
|
#ifdef HAVE_DDE
|
||||||
defaultNoFaceTracking = false;
|
defaultNoFaceTracking = false;
|
||||||
#endif
|
#endif
|
||||||
QAction* noFaceTracker = addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::NoFaceTracking,
|
QAction* noFaceTracker =
|
||||||
0, defaultNoFaceTracking,
|
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::NoFaceTracking, 0, defaultNoFaceTracking, qApp,
|
||||||
qApp, SLOT(setActiveFaceTracker()));
|
SLOT(setActiveFaceTracker()));
|
||||||
faceTrackerGroup->addAction(noFaceTracker);
|
faceTrackerGroup->addAction(noFaceTracker);
|
||||||
|
|
||||||
#ifdef HAVE_DDE
|
#ifdef HAVE_DDE
|
||||||
QAction* ddeFaceTracker = addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::UseCamera,
|
QAction* ddeFaceTracker = addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::UseCamera, 0, true, qApp,
|
||||||
0, true,
|
SLOT(setActiveFaceTracker()));
|
||||||
qApp, SLOT(setActiveFaceTracker()));
|
|
||||||
faceTrackerGroup->addAction(ddeFaceTracker);
|
faceTrackerGroup->addAction(ddeFaceTracker);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef HAVE_DDE
|
#ifdef HAVE_DDE
|
||||||
faceTrackingMenu->addSeparator();
|
faceTrackingMenu->addSeparator();
|
||||||
QAction* binaryEyelidControl = addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::BinaryEyelidControl, 0, true);
|
QAction* binaryEyelidControl =
|
||||||
|
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::BinaryEyelidControl, 0, true);
|
||||||
binaryEyelidControl->setVisible(true); // DDE face tracking is on by default
|
binaryEyelidControl->setVisible(true); // DDE face tracking is on by default
|
||||||
QAction* coupleEyelids = addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::CoupleEyelids, 0, true);
|
QAction* coupleEyelids = addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::CoupleEyelids, 0, true);
|
||||||
coupleEyelids->setVisible(true); // DDE face tracking is on by default
|
coupleEyelids->setVisible(true); // DDE face tracking is on by default
|
||||||
|
@ -529,37 +534,41 @@ Menu::Menu() {
|
||||||
ddeCalibrate->setVisible(true); // DDE face tracking is on by default
|
ddeCalibrate->setVisible(true); // DDE face tracking is on by default
|
||||||
faceTrackingMenu->addSeparator();
|
faceTrackingMenu->addSeparator();
|
||||||
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::MuteFaceTracking,
|
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::MuteFaceTracking,
|
||||||
[](bool mute) { FaceTracker::setIsMuted(mute); },
|
[](bool mute) { FaceTracker::setIsMuted(mute); }, Qt::CTRL | Qt::SHIFT | Qt::Key_F,
|
||||||
Qt::CTRL | Qt::SHIFT | Qt::Key_F, FaceTracker::isMuted());
|
FaceTracker::isMuted());
|
||||||
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::AutoMuteAudio, 0, false);
|
addCheckableActionToQMenuAndActionHash(faceTrackingMenu, MenuOption::AutoMuteAudio, 0, false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_IVIEWHMD
|
#ifdef HAVE_IVIEWHMD
|
||||||
// Developer > Avatar > Eye Tracking
|
// Developer > Avatar > Eye Tracking
|
||||||
MenuWrapper* eyeTrackingMenu = avatarDebugMenu->addMenu("Eye Tracking");
|
MenuWrapper* eyeTrackingMenu = avatarDebugMenu->addMenu("Eye Tracking");
|
||||||
addCheckableActionToQMenuAndActionHash(eyeTrackingMenu, MenuOption::SMIEyeTracking, 0, false,
|
addCheckableActionToQMenuAndActionHash(eyeTrackingMenu, MenuOption::SMIEyeTracking, 0, false, qApp,
|
||||||
qApp, SLOT(setActiveEyeTracker()));
|
SLOT(setActiveEyeTracker()));
|
||||||
{
|
{
|
||||||
MenuWrapper* calibrateEyeTrackingMenu = eyeTrackingMenu->addMenu("Calibrate");
|
MenuWrapper* calibrateEyeTrackingMenu = eyeTrackingMenu->addMenu("Calibrate");
|
||||||
addActionToQMenuAndActionHash(calibrateEyeTrackingMenu, MenuOption::OnePointCalibration, 0,
|
addActionToQMenuAndActionHash(calibrateEyeTrackingMenu, MenuOption::OnePointCalibration, 0, qApp,
|
||||||
qApp, SLOT(calibrateEyeTracker1Point()));
|
SLOT(calibrateEyeTracker1Point()));
|
||||||
addActionToQMenuAndActionHash(calibrateEyeTrackingMenu, MenuOption::ThreePointCalibration, 0,
|
addActionToQMenuAndActionHash(calibrateEyeTrackingMenu, MenuOption::ThreePointCalibration, 0, qApp,
|
||||||
qApp, SLOT(calibrateEyeTracker3Points()));
|
SLOT(calibrateEyeTracker3Points()));
|
||||||
addActionToQMenuAndActionHash(calibrateEyeTrackingMenu, MenuOption::FivePointCalibration, 0,
|
addActionToQMenuAndActionHash(calibrateEyeTrackingMenu, MenuOption::FivePointCalibration, 0, qApp,
|
||||||
qApp, SLOT(calibrateEyeTracker5Points()));
|
SLOT(calibrateEyeTracker5Points()));
|
||||||
}
|
}
|
||||||
addCheckableActionToQMenuAndActionHash(eyeTrackingMenu, MenuOption::SimulateEyeTracking, 0, false,
|
addCheckableActionToQMenuAndActionHash(eyeTrackingMenu, MenuOption::SimulateEyeTracking, 0, false, qApp,
|
||||||
qApp, SLOT(setActiveEyeTracker()));
|
SLOT(setActiveEyeTracker()));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
action = addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AvatarReceiveStats, 0, false);
|
action = addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AvatarReceiveStats, 0, false);
|
||||||
connect(action, &QAction::triggered, [this]{ Avatar::setShowReceiveStats(isOptionChecked(MenuOption::AvatarReceiveStats)); });
|
connect(action, &QAction::triggered,
|
||||||
|
[this] { Avatar::setShowReceiveStats(isOptionChecked(MenuOption::AvatarReceiveStats)); });
|
||||||
action = addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowBoundingCollisionShapes, 0, false);
|
action = addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowBoundingCollisionShapes, 0, false);
|
||||||
connect(action, &QAction::triggered, [this]{ Avatar::setShowCollisionShapes(isOptionChecked(MenuOption::ShowBoundingCollisionShapes)); });
|
connect(action, &QAction::triggered,
|
||||||
|
[this] { Avatar::setShowCollisionShapes(isOptionChecked(MenuOption::ShowBoundingCollisionShapes)); });
|
||||||
action = addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowMyLookAtVectors, 0, false);
|
action = addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowMyLookAtVectors, 0, false);
|
||||||
connect(action, &QAction::triggered, [this]{ Avatar::setShowMyLookAtVectors(isOptionChecked(MenuOption::ShowMyLookAtVectors)); });
|
connect(action, &QAction::triggered,
|
||||||
|
[this] { Avatar::setShowMyLookAtVectors(isOptionChecked(MenuOption::ShowMyLookAtVectors)); });
|
||||||
action = addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowOtherLookAtVectors, 0, false);
|
action = addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowOtherLookAtVectors, 0, false);
|
||||||
connect(action, &QAction::triggered, [this]{ Avatar::setShowOtherLookAtVectors(isOptionChecked(MenuOption::ShowOtherLookAtVectors)); });
|
connect(action, &QAction::triggered,
|
||||||
|
[this] { Avatar::setShowOtherLookAtVectors(isOptionChecked(MenuOption::ShowOtherLookAtVectors)); });
|
||||||
|
|
||||||
auto avatarManager = DependencyManager::get<AvatarManager>();
|
auto avatarManager = DependencyManager::get<AvatarManager>();
|
||||||
auto avatar = avatarManager->getMyAvatar();
|
auto avatar = avatarManager->getMyAvatar();
|
||||||
|
@ -570,57 +579,55 @@ Menu::Menu() {
|
||||||
});
|
});
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::FixGaze, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::FixGaze, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ToggleHipsFollowing, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ToggleHipsFollowing, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setToggleHips(bool)));
|
SLOT(setToggleHips(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawBaseOfSupport, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawBaseOfSupport, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawBaseOfSupport(bool)));
|
SLOT(setEnableDebugDrawBaseOfSupport(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawDefaultPose, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawDefaultPose, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawDefaultPose(bool)));
|
SLOT(setEnableDebugDrawDefaultPose(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawAnimPose, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawAnimPose, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawAnimPose(bool)));
|
SLOT(setEnableDebugDrawAnimPose(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawPosition, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawPosition, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawPosition(bool)));
|
SLOT(setEnableDebugDrawPosition(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawOtherSkeletons, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::AnimDebugDrawOtherSkeletons, 0, false,
|
||||||
avatarManager.data(), SLOT(setEnableDebugDrawOtherSkeletons(bool)));
|
avatarManager.data(), SLOT(setEnableDebugDrawOtherSkeletons(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::MeshVisible, 0, true,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::MeshVisible, 0, true, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableMeshVisible(bool)));
|
SLOT(setEnableMeshVisible(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::DisableEyelidAdjustment, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::DisableEyelidAdjustment, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::TurnWithHead, 0, false);
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::TurnWithHead, 0, false);
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::EnableInverseKinematics, 0, true,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::EnableInverseKinematics, 0, true, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableInverseKinematics(bool)));
|
SLOT(setEnableInverseKinematics(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderSensorToWorldMatrix, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderSensorToWorldMatrix, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawSensorToWorldMatrix(bool)));
|
SLOT(setEnableDebugDrawSensorToWorldMatrix(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderIKTargets, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderIKTargets, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawIKTargets(bool)));
|
SLOT(setEnableDebugDrawIKTargets(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderIKConstraints, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderIKConstraints, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawIKConstraints(bool)));
|
SLOT(setEnableDebugDrawIKConstraints(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderIKChains, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderIKChains, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawIKChains(bool)));
|
SLOT(setEnableDebugDrawIKChains(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderDetailedCollision, 0, false,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::RenderDetailedCollision, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawDetailedCollision(bool)));
|
SLOT(setEnableDebugDrawDetailedCollision(bool)));
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ActionMotorControl, 0, true,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ActionMotorControl, 0, true, avatar.get(),
|
||||||
avatar.get(), SLOT(updateMotionBehaviorFromMenu()),
|
SLOT(updateMotionBehaviorFromMenu()), UNSPECIFIED_POSITION, "Developer");
|
||||||
UNSPECIFIED_POSITION, "Developer");
|
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ScriptedMotorControl, 0, true,
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ScriptedMotorControl, 0, true, avatar.get(),
|
||||||
avatar.get(), SLOT(updateMotionBehaviorFromMenu()),
|
SLOT(updateMotionBehaviorFromMenu()), UNSPECIFIED_POSITION, "Developer");
|
||||||
UNSPECIFIED_POSITION, "Developer");
|
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowTrackedObjects, 0, false, qApp, SLOT(setShowTrackedObjects(bool)));
|
addCheckableActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::ShowTrackedObjects, 0, false, qApp,
|
||||||
|
SLOT(setShowTrackedObjects(bool)));
|
||||||
|
|
||||||
addActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::PackageModel, 0, qApp, SLOT(packageModel()));
|
addActionToQMenuAndActionHash(avatarDebugMenu, MenuOption::PackageModel, 0, qApp, SLOT(packageModel()));
|
||||||
|
|
||||||
// Developer > Hands >>>
|
// Developer > Hands >>>
|
||||||
MenuWrapper* handOptionsMenu = developerMenu->addMenu("Hands");
|
MenuWrapper* handOptionsMenu = developerMenu->addMenu("Hands");
|
||||||
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::DisplayHandTargets, 0, false,
|
addCheckableActionToQMenuAndActionHash(handOptionsMenu, MenuOption::DisplayHandTargets, 0, false, avatar.get(),
|
||||||
avatar.get(), SLOT(setEnableDebugDrawHandControllers(bool)));
|
SLOT(setEnableDebugDrawHandControllers(bool)));
|
||||||
|
|
||||||
// Developer > Entities >>>
|
// Developer > Entities >>>
|
||||||
MenuWrapper* entitiesOptionsMenu = developerMenu->addMenu("Entities");
|
MenuWrapper* entitiesOptionsMenu = developerMenu->addMenu("Entities");
|
||||||
|
|
||||||
addActionToQMenuAndActionHash(entitiesOptionsMenu, MenuOption::OctreeStats, 0,
|
addActionToQMenuAndActionHash(entitiesOptionsMenu, MenuOption::OctreeStats, 0, qApp, SLOT(loadEntityStatisticsDialog()));
|
||||||
qApp, SLOT(loadEntityStatisticsDialog()));
|
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(entitiesOptionsMenu, MenuOption::ShowRealtimeEntityStats);
|
addCheckableActionToQMenuAndActionHash(entitiesOptionsMenu, MenuOption::ShowRealtimeEntityStats);
|
||||||
|
|
||||||
|
@ -632,32 +639,27 @@ Menu::Menu() {
|
||||||
QString("hifi/tablet/TabletNetworkingPreferences.qml"), "NetworkingPreferencesDialog");
|
QString("hifi/tablet/TabletNetworkingPreferences.qml"), "NetworkingPreferencesDialog");
|
||||||
});
|
});
|
||||||
addActionToQMenuAndActionHash(networkMenu, MenuOption::ReloadContent, 0, qApp, SLOT(reloadResourceCaches()));
|
addActionToQMenuAndActionHash(networkMenu, MenuOption::ReloadContent, 0, qApp, SLOT(reloadResourceCaches()));
|
||||||
addActionToQMenuAndActionHash(networkMenu, MenuOption::ClearDiskCache, 0,
|
addActionToQMenuAndActionHash(networkMenu, MenuOption::ClearDiskCache, 0, DependencyManager::get<AssetClient>().data(),
|
||||||
DependencyManager::get<AssetClient>().data(), SLOT(clearCache()));
|
SLOT(clearCache()));
|
||||||
addCheckableActionToQMenuAndActionHash(networkMenu,
|
addCheckableActionToQMenuAndActionHash(networkMenu, MenuOption::DisableActivityLogger, 0, false,
|
||||||
MenuOption::DisableActivityLogger,
|
&UserActivityLogger::getInstance(), SLOT(disable(bool)));
|
||||||
0,
|
addActionToQMenuAndActionHash(networkMenu, MenuOption::ShowDSConnectTable, 0, qApp, SLOT(loadDomainConnectionDialog()));
|
||||||
false,
|
|
||||||
&UserActivityLogger::getInstance(),
|
|
||||||
SLOT(disable(bool)));
|
|
||||||
addActionToQMenuAndActionHash(networkMenu, MenuOption::ShowDSConnectTable, 0,
|
|
||||||
qApp, SLOT(loadDomainConnectionDialog()));
|
|
||||||
|
|
||||||
#if (PR_BUILD || DEV_BUILD)
|
#if (PR_BUILD || DEV_BUILD)
|
||||||
addCheckableActionToQMenuAndActionHash(networkMenu, MenuOption::SendWrongProtocolVersion, 0, false,
|
addCheckableActionToQMenuAndActionHash(networkMenu, MenuOption::SendWrongProtocolVersion, 0, false, qApp,
|
||||||
qApp, SLOT(sendWrongProtocolVersionsSignature(bool)));
|
SLOT(sendWrongProtocolVersionsSignature(bool)));
|
||||||
|
|
||||||
{
|
{
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
addCheckableActionToQMenuAndActionHash(networkMenu, MenuOption::SendWrongDSConnectVersion, 0, false,
|
addCheckableActionToQMenuAndActionHash(networkMenu, MenuOption::SendWrongDSConnectVersion, 0, false, nodeList.data(),
|
||||||
nodeList.data(), SLOT(toggleSendNewerDSConnectVersion(bool)));
|
SLOT(toggleSendNewerDSConnectVersion(bool)));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// Developer >> Tests >>>
|
// Developer >> Tests >>>
|
||||||
MenuWrapper* testMenu = developerMenu->addMenu("Tests");
|
MenuWrapper* testMenu = developerMenu->addMenu("Tests");
|
||||||
addActionToQMenuAndActionHash(testMenu, MenuOption::RunClientScriptTests, 0, dialogsManager.data(), SLOT(showTestingResults()));
|
addActionToQMenuAndActionHash(testMenu, MenuOption::RunClientScriptTests, 0, dialogsManager.data(),
|
||||||
|
SLOT(showTestingResults()));
|
||||||
|
|
||||||
// Developer > Timing >>>
|
// Developer > Timing >>>
|
||||||
MenuWrapper* timingMenu = developerMenu->addMenu("Timing");
|
MenuWrapper* timingMenu = developerMenu->addMenu("Timing");
|
||||||
|
@ -678,7 +680,6 @@ Menu::Menu() {
|
||||||
addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::LogExtraTimings);
|
addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::LogExtraTimings);
|
||||||
addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::SuppressShortTimings);
|
addCheckableActionToQMenuAndActionHash(timingMenu, MenuOption::SuppressShortTimings);
|
||||||
|
|
||||||
|
|
||||||
// Developer > Audio >>>
|
// Developer > Audio >>>
|
||||||
MenuWrapper* audioDebugMenu = developerMenu->addMenu("Audio");
|
MenuWrapper* audioDebugMenu = developerMenu->addMenu("Audio");
|
||||||
|
|
||||||
|
@ -691,12 +692,12 @@ Menu::Menu() {
|
||||||
|
|
||||||
action = addActionToQMenuAndActionHash(audioDebugMenu, "Buffers...");
|
action = addActionToQMenuAndActionHash(audioDebugMenu, "Buffers...");
|
||||||
connect(action, &QAction::triggered, [] {
|
connect(action, &QAction::triggered, [] {
|
||||||
qApp->showDialog(QString("hifi/dialogs/AudioBuffers.qml"),
|
qApp->showDialog(QString("hifi/dialogs/AudioBuffers.qml"), QString("hifi/tablet/TabletAudioBuffers.qml"),
|
||||||
QString("hifi/tablet/TabletAudioBuffers.qml"), "AudioBuffersDialog");
|
"AudioBuffersDialog");
|
||||||
});
|
});
|
||||||
|
|
||||||
addActionToQMenuAndActionHash(audioDebugMenu, MenuOption::MuteEnvironment, 0,
|
addActionToQMenuAndActionHash(audioDebugMenu, MenuOption::MuteEnvironment, 0, DependencyManager::get<AudioClient>().data(),
|
||||||
DependencyManager::get<AudioClient>().data(), SLOT(sendMuteEnvironmentPacket()));
|
SLOT(sendMuteEnvironmentPacket()));
|
||||||
|
|
||||||
action = addActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioScope);
|
action = addActionToQMenuAndActionHash(audioDebugMenu, MenuOption::AudioScope);
|
||||||
connect(action, &QAction::triggered, [] {
|
connect(action, &QAction::triggered, [] {
|
||||||
|
@ -708,16 +709,22 @@ Menu::Menu() {
|
||||||
// Developer > Physics >>>
|
// Developer > Physics >>>
|
||||||
MenuWrapper* physicsOptionsMenu = developerMenu->addMenu("Physics");
|
MenuWrapper* physicsOptionsMenu = developerMenu->addMenu("Physics");
|
||||||
{
|
{
|
||||||
auto drawStatusConfig = qApp->getRenderEngine()->getConfiguration()->getConfig<render::DrawStatus>("RenderMainView.DrawStatus");
|
auto drawStatusConfig =
|
||||||
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowOwned,
|
qApp->getRenderEngine()->getConfiguration()->getConfig<render::DrawStatus>("RenderMainView.DrawStatus");
|
||||||
0, false, drawStatusConfig, SLOT(setShowNetwork(bool)));
|
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowOwned, 0, false, drawStatusConfig,
|
||||||
|
SLOT(setShowNetwork(bool)));
|
||||||
}
|
}
|
||||||
|
|
||||||
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletWireframe, 0, false, qApp, SLOT(setShowBulletWireframe(bool)));
|
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletWireframe, 0, false, qApp,
|
||||||
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletAABBs, 0, false, qApp, SLOT(setShowBulletAABBs(bool)));
|
SLOT(setShowBulletWireframe(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletContactPoints, 0, false, qApp, SLOT(setShowBulletContactPoints(bool)));
|
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletAABBs, 0, false, qApp,
|
||||||
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletConstraints, 0, false, qApp, SLOT(setShowBulletConstraints(bool)));
|
SLOT(setShowBulletAABBs(bool)));
|
||||||
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletConstraintLimits, 0, false, qApp, SLOT(setShowBulletConstraintLimits(bool)));
|
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletContactPoints, 0, false, qApp,
|
||||||
|
SLOT(setShowBulletContactPoints(bool)));
|
||||||
|
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletConstraints, 0, false, qApp,
|
||||||
|
SLOT(setShowBulletConstraints(bool)));
|
||||||
|
addCheckableActionToQMenuAndActionHash(physicsOptionsMenu, MenuOption::PhysicsShowBulletConstraintLimits, 0, false, qApp,
|
||||||
|
SLOT(setShowBulletConstraintLimits(bool)));
|
||||||
|
|
||||||
// Developer > Picking >>>
|
// Developer > Picking >>>
|
||||||
MenuWrapper* pickingOptionsMenu = developerMenu->addMenu("Picking");
|
MenuWrapper* pickingOptionsMenu = developerMenu->addMenu("Picking");
|
||||||
|
@ -770,8 +777,8 @@ Menu::Menu() {
|
||||||
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::AnimStats);
|
addCheckableActionToQMenuAndActionHash(developerMenu, MenuOption::AnimStats);
|
||||||
|
|
||||||
// Developer > Log
|
// Developer > Log
|
||||||
addActionToQMenuAndActionHash(developerMenu, MenuOption::Log, Qt::CTRL | Qt::SHIFT | Qt::Key_L,
|
addActionToQMenuAndActionHash(developerMenu, MenuOption::Log, Qt::CTRL | Qt::SHIFT | Qt::Key_L, qApp,
|
||||||
qApp, SLOT(toggleLogDialog()));
|
SLOT(toggleLogDialog()));
|
||||||
|
|
||||||
#if 0 /// -------------- REMOVED FOR NOW --------------
|
#if 0 /// -------------- REMOVED FOR NOW --------------
|
||||||
addDisabledActionAndSeparator(navigateMenu, "History");
|
addDisabledActionAndSeparator(navigateMenu, "History");
|
||||||
|
@ -805,28 +812,22 @@ Menu::Menu() {
|
||||||
// Help > About High Fidelity
|
// Help > About High Fidelity
|
||||||
action = addActionToQMenuAndActionHash(helpMenu, "About High Fidelity");
|
action = addActionToQMenuAndActionHash(helpMenu, "About High Fidelity");
|
||||||
connect(action, &QAction::triggered, [] {
|
connect(action, &QAction::triggered, [] {
|
||||||
qApp->showDialog(QString("hifi/dialogs/AboutDialog.qml"),
|
qApp->showDialog(QString("hifi/dialogs/AboutDialog.qml"), QString("hifi/dialogs/TabletAboutDialog.qml"), "AboutDialog");
|
||||||
QString("hifi/dialogs/TabletAboutDialog.qml"), "AboutDialog");
|
|
||||||
});
|
});
|
||||||
helpMenu->addSeparator();
|
helpMenu->addSeparator();
|
||||||
|
|
||||||
// Help > HiFi Docs
|
// Help > HiFi Docs
|
||||||
action = addActionToQMenuAndActionHash(helpMenu, "Online Documentation");
|
action = addActionToQMenuAndActionHash(helpMenu, "Online Documentation");
|
||||||
connect(action, &QAction::triggered, qApp, [] {
|
connect(action, &QAction::triggered, qApp, [] { QDesktopServices::openUrl(QUrl("https://docs.highfidelity.com/")); });
|
||||||
QDesktopServices::openUrl(QUrl("https://docs.highfidelity.com/"));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Help > HiFi Forum
|
// Help > HiFi Forum
|
||||||
action = addActionToQMenuAndActionHash(helpMenu, "Online Forums");
|
action = addActionToQMenuAndActionHash(helpMenu, "Online Forums");
|
||||||
connect(action, &QAction::triggered, qApp, [] {
|
connect(action, &QAction::triggered, qApp, [] { QDesktopServices::openUrl(QUrl("https://forums.highfidelity.com/")); });
|
||||||
QDesktopServices::openUrl(QUrl("https://forums.highfidelity.com/"));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Help > Scripting Reference
|
// Help > Scripting Reference
|
||||||
action = addActionToQMenuAndActionHash(helpMenu, "Online Script Reference");
|
action = addActionToQMenuAndActionHash(helpMenu, "Online Script Reference");
|
||||||
connect(action, &QAction::triggered, qApp, [] {
|
connect(action, &QAction::triggered, qApp,
|
||||||
QDesktopServices::openUrl(QUrl("https://docs.highfidelity.com/api-reference"));
|
[] { QDesktopServices::openUrl(QUrl("https://docs.highfidelity.com/api-reference")); });
|
||||||
});
|
|
||||||
|
|
||||||
addActionToQMenuAndActionHash(helpMenu, "Controls Reference", 0, qApp, SLOT(showHelp()));
|
addActionToQMenuAndActionHash(helpMenu, "Controls Reference", 0, qApp, SLOT(showHelp()));
|
||||||
|
|
||||||
|
@ -834,15 +835,12 @@ Menu::Menu() {
|
||||||
|
|
||||||
// Help > Release Notes
|
// Help > Release Notes
|
||||||
action = addActionToQMenuAndActionHash(helpMenu, "Release Notes");
|
action = addActionToQMenuAndActionHash(helpMenu, "Release Notes");
|
||||||
connect(action, &QAction::triggered, qApp, [] {
|
connect(action, &QAction::triggered, qApp,
|
||||||
QDesktopServices::openUrl(QUrl("http://steamcommunity.com/games/390540/announcements/"));
|
[] { QDesktopServices::openUrl(QUrl("http://steamcommunity.com/games/390540/announcements/")); });
|
||||||
});
|
|
||||||
|
|
||||||
// Help > Report a Bug!
|
// Help > Report a Bug!
|
||||||
action = addActionToQMenuAndActionHash(helpMenu, "Report a Bug!");
|
action = addActionToQMenuAndActionHash(helpMenu, "Report a Bug!");
|
||||||
connect(action, &QAction::triggered, qApp, [] {
|
connect(action, &QAction::triggered, qApp, [] { QDesktopServices::openUrl(QUrl("mailto:support@highfidelity.com")); });
|
||||||
QDesktopServices::openUrl(QUrl("mailto:support@highfidelity.com"));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::addMenuItem(const MenuItemProperties& properties) {
|
void Menu::addMenuItem(const MenuItemProperties& properties) {
|
||||||
|
@ -872,10 +870,10 @@ void Menu::addMenuItem(const MenuItemProperties& properties) {
|
||||||
if (properties.isSeparator) {
|
if (properties.isSeparator) {
|
||||||
addDisabledActionAndSeparator(menuObj, properties.menuItemName, requestedPosition, properties.grouping);
|
addDisabledActionAndSeparator(menuObj, properties.menuItemName, requestedPosition, properties.grouping);
|
||||||
} else if (properties.isCheckable) {
|
} else if (properties.isCheckable) {
|
||||||
menuItemAction = addCheckableActionToQMenuAndActionHash(menuObj, properties.menuItemName,
|
menuItemAction =
|
||||||
properties.shortcutKeySequence, properties.isChecked,
|
addCheckableActionToQMenuAndActionHash(menuObj, properties.menuItemName, properties.shortcutKeySequence,
|
||||||
MenuScriptingInterface::getInstance(), SLOT(menuItemTriggered()),
|
properties.isChecked, MenuScriptingInterface::getInstance(),
|
||||||
requestedPosition, properties.grouping);
|
SLOT(menuItemTriggered()), requestedPosition, properties.grouping);
|
||||||
} else {
|
} else {
|
||||||
menuItemAction = addActionToQMenuAndActionHash(menuObj, properties.menuItemName, properties.shortcutKeySequence,
|
menuItemAction = addActionToQMenuAndActionHash(menuObj, properties.menuItemName, properties.shortcutKeySequence,
|
||||||
MenuScriptingInterface::getInstance(), SLOT(menuItemTriggered()),
|
MenuScriptingInterface::getInstance(), SLOT(menuItemTriggered()),
|
||||||
|
|
|
@ -200,7 +200,8 @@ namespace MenuOption {
|
||||||
const QString SuppressShortTimings = "Suppress Timings Less than 10ms";
|
const QString SuppressShortTimings = "Suppress Timings Less than 10ms";
|
||||||
const QString ThirdPerson = "Third Person";
|
const QString ThirdPerson = "Third Person";
|
||||||
const QString ThreePointCalibration = "3 Point Calibration";
|
const QString ThreePointCalibration = "3 Point Calibration";
|
||||||
const QString ThrottleFPSIfNotFocus = "Throttle FPS If Not Focus"; // FIXME - this value duplicated in Basic2DWindowOpenGLDisplayPlugin.cpp
|
const QString ThrottleFPSIfNotFocus =
|
||||||
|
"Throttle FPS If Not Focus"; // FIXME - this value duplicated in Basic2DWindowOpenGLDisplayPlugin.cpp
|
||||||
const QString ToggleHipsFollowing = "Toggle Hips Following";
|
const QString ToggleHipsFollowing = "Toggle Hips Following";
|
||||||
const QString ToolWindow = "Tool Window";
|
const QString ToolWindow = "Tool Window";
|
||||||
const QString TransmitterDrive = "Transmitter Drive";
|
const QString TransmitterDrive = "Transmitter Drive";
|
||||||
|
@ -223,7 +224,6 @@ namespace MenuOption {
|
||||||
const QString ForceCoarsePicking = "Force Coarse Picking";
|
const QString ForceCoarsePicking = "Force Coarse Picking";
|
||||||
const QString ComputeBlendshapes = "Compute Blendshapes";
|
const QString ComputeBlendshapes = "Compute Blendshapes";
|
||||||
const QString HighlightTransitions = "Highlight Transitions";
|
const QString HighlightTransitions = "Highlight Transitions";
|
||||||
}
|
} // namespace MenuOption
|
||||||
|
|
||||||
#endif // hifi_Menu_h
|
#endif // hifi_Menu_h
|
||||||
|
|
||||||
|
|
|
@ -222,6 +222,36 @@ function onEmoteAppBarClosed() {
|
||||||
emoteAppBarWindow = false;
|
emoteAppBarWindow = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var PERMISSION_QML_PATH = Script.resourcesPath() + "qml/hifi/Permission.qml";
|
||||||
|
var PERMISSION_WINDOW_TITLE = "Permissions";
|
||||||
|
var PERMISSION_WINDOW_PRESENTATION_MODE = Desktop.PresentationMode.NATIVE;
|
||||||
|
var PERMISSION_WINDOW_WIDTH_PX = 600;
|
||||||
|
var PERMISSION_WINDOW_HEIGHT_PX = 200;
|
||||||
|
var PERMISSION_WINDOW_FLAGS =
|
||||||
|
0x00000001 | // Qt::Window
|
||||||
|
0x00000800 | // Qt::FramelessWindowHint
|
||||||
|
0x40000000 | // Qt::NoDropShadowWindowHint
|
||||||
|
0x00200000; // Qt::WindowDoesNotAcceptFocus
|
||||||
|
var PERMISSION_WINDOW_LEFT_MARGIN = 600;
|
||||||
|
var PERMISSION_WINDOW_BOTTOM_MARGIN = 200;
|
||||||
|
var permissionWindow = false;
|
||||||
|
function showPermissionsWindow() {
|
||||||
|
permissionWindow = Desktop.createWindow(PERMISSION_QML_PATH, {
|
||||||
|
title: PERMISSION_WINDOW_TITLE,
|
||||||
|
presentationMode: PERMISSION_WINDOW_PRESENTATION_MODE,
|
||||||
|
size: {
|
||||||
|
x: PERMISSION_WINDOW_WIDTH_PX,
|
||||||
|
y: PERMISSION_WINDOW_HEIGHT_PX
|
||||||
|
},
|
||||||
|
position: {
|
||||||
|
x: Window.x + PERMISSION_WINDOW_LEFT_MARGIN,
|
||||||
|
y: Window.y + Window.innerHeight - PERMISSION_WINDOW_BOTTOM_MARGIN
|
||||||
|
},
|
||||||
|
overrideFlags: PERMISSION_WINDOW_FLAGS
|
||||||
|
});
|
||||||
|
// emoteAppBarWindow.fromQml.connect(onMessageFromEmoteAppBar);
|
||||||
|
// emoteAppBarWindow.closed.connect(onEmoteAppBarClosed);
|
||||||
|
}
|
||||||
|
|
||||||
var EMOTE_APP_BAR_QML_PATH = Script.resourcesPath() + "qml/hifi/simplifiedUI/emoteApp/bar/EmoteAppBar.qml";
|
var EMOTE_APP_BAR_QML_PATH = Script.resourcesPath() + "qml/hifi/simplifiedUI/emoteApp/bar/EmoteAppBar.qml";
|
||||||
var EMOTE_APP_BAR_WINDOW_TITLE = "Emote";
|
var EMOTE_APP_BAR_WINDOW_TITLE = "Emote";
|
||||||
|
|
Loading…
Reference in a new issue