mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 20:10:29 +02:00
Merge branch 'tablet-ui' of github.com:highfidelity/hifi into tablet-ui
This commit is contained in:
commit
df84ff27e9
11 changed files with 72 additions and 75 deletions
|
@ -9,34 +9,30 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
import "tabletWindows"
|
import "tabletWindows"
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: profileRoot
|
id: profileRoot
|
||||||
initialItem: root
|
initialItem: root
|
||||||
objectName: "stack"
|
objectName: "stack"
|
||||||
property var title: "Audio Preferences"
|
property string title: "Audio Settings"
|
||||||
|
|
||||||
property var eventBridge;
|
property var eventBridge;
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
|
||||||
function pushSource(path) {
|
function pushSource(path) {
|
||||||
editRoot.push(Qt.reslovedUrl(path));
|
profileRoot.push(Qt.reslovedUrl(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
function popSource() {
|
function popSource() {
|
||||||
|
profileRoot.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabletPreferencesDialog {
|
TabletPreferencesDialog {
|
||||||
id: root
|
id: root
|
||||||
property string title: "Audio Settings"
|
|
||||||
objectName: "TabletAudioPreferences"
|
objectName: "TabletAudioPreferences"
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
showCategories: ["Audio"]
|
showCategories: ["Audio"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,34 +9,30 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
import "tabletWindows"
|
import "tabletWindows"
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: profileRoot
|
id: profileRoot
|
||||||
initialItem: root
|
initialItem: root
|
||||||
objectName: "stack"
|
objectName: "stack"
|
||||||
property var title: "Avatar Preferences"
|
property string title: "Avatar Settings"
|
||||||
|
|
||||||
property var eventBridge;
|
property var eventBridge;
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
|
||||||
function pushSource(path) {
|
function pushSource(path) {
|
||||||
editRoot.push(Qt.reslovedUrl(path));
|
profileRoot.push(Qt.reslovedUrl(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
function popSource() {
|
function popSource() {
|
||||||
|
profileRoot.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabletPreferencesDialog {
|
TabletPreferencesDialog {
|
||||||
id: root
|
id: root
|
||||||
property string title: "Avatar Preferences"
|
|
||||||
objectName: "TabletAvatarPreferences"
|
objectName: "TabletAvatarPreferences"
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
showCategories: ["Avatar Basics", "Avatar Tuning", "Avatar Camera"]
|
showCategories: ["Avatar Basics", "Avatar Tuning", "Avatar Camera"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,35 +9,30 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
import "tabletWindows"
|
import "tabletWindows"
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: profileRoot
|
id: profileRoot
|
||||||
initialItem: root
|
initialItem: root
|
||||||
objectName: "stack"
|
objectName: "stack"
|
||||||
property var title: "General Prefernces"
|
property string title: "General Settings"
|
||||||
|
|
||||||
property var eventBridge;
|
property var eventBridge;
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
|
||||||
function pushSource(path) {
|
function pushSource(path) {
|
||||||
editRoot.push(Qt.reslovedUrl(path));
|
profileRoot.push(Qt.reslovedUrl(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
function popSource() {
|
function popSource() {
|
||||||
|
profileRoot.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabletPreferencesDialog {
|
TabletPreferencesDialog {
|
||||||
id: root
|
id: root
|
||||||
property string title: "General Preferences"
|
|
||||||
objectName: "TabletGeneralPreferences"
|
objectName: "TabletGeneralPreferences"
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
showCategories: ["UI", "Snapshots", "Scripts", "Privacy", "Octree", "HMD", "Sixense Controllers", "Perception Neuron", "Kinect"]
|
showCategories: ["UI", "Snapshots", "Scripts", "Privacy", "Octree", "HMD", "Sixense Controllers", "Perception Neuron", "Kinect"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,38 @@
|
||||||
import QtQuick 2.5
|
//
|
||||||
import Qt.labs.settings 1.0
|
// TabletGraphicsPreferences.qml
|
||||||
|
//
|
||||||
|
// Created by Vlad Stelmahovsky on 12 Mar 2017.
|
||||||
|
// Copyright 2017 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
import "tabletWindows"
|
import "tabletWindows"
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: profileRoot
|
id: profileRoot
|
||||||
initialItem: root
|
initialItem: root
|
||||||
objectName: "stack"
|
objectName: "stack"
|
||||||
|
property string title: "Graphics Settings"
|
||||||
|
|
||||||
property var eventBridge;
|
property var eventBridge;
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
|
||||||
function pushSource(path) {
|
function pushSource(path) {
|
||||||
editRoot.push(Qt.reslovedUrl(path));
|
profileRoot.push(Qt.reslovedUrl(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
function popSource() {
|
function popSource() {
|
||||||
|
profileRoot.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabletPreferencesDialog {
|
TabletPreferencesDialog {
|
||||||
id: root
|
id: root
|
||||||
property string title: "Graphics Settings"
|
|
||||||
objectName: "TabletGraphicsPreferences"
|
objectName: "TabletGraphicsPreferences"
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
showCategories: ["Graphics"]
|
showCategories: ["Graphics"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,38 @@
|
||||||
import QtQuick 2.5
|
//
|
||||||
import Qt.labs.settings 1.0
|
// TabletLodPreferences.qml
|
||||||
|
//
|
||||||
|
// Created by Vlad Stelmahovsky on 11 Mar 2017.
|
||||||
|
// Copyright 2017 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
import "tabletWindows"
|
import "tabletWindows"
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: profileRoot
|
id: profileRoot
|
||||||
initialItem: root
|
initialItem: root
|
||||||
objectName: "stack"
|
objectName: "stack"
|
||||||
|
property string title: "LOD Settings"
|
||||||
|
|
||||||
property var eventBridge;
|
property var eventBridge;
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
|
||||||
function pushSource(path) {
|
function pushSource(path) {
|
||||||
editRoot.push(Qt.reslovedUrl(path));
|
profileRoot.push(Qt.reslovedUrl(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
function popSource() {
|
function popSource() {
|
||||||
|
profileRoot.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabletPreferencesDialog {
|
TabletPreferencesDialog {
|
||||||
id: root
|
id: root
|
||||||
property string title: "LOD Settings"
|
|
||||||
objectName: "TabletLodPreferences"
|
objectName: "TabletLodPreferences"
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
showCategories: ["Level of Detail Tuning"]
|
showCategories: ["Level of Detail Tuning"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ FocusScope {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: iconColorOverlay.color = "#1fc6a6";
|
onEntered: iconColorOverlay.color = "#1fc6a6";
|
||||||
onExited: iconColorOverlay.color = "#ffffff";
|
onExited: iconColorOverlay.color = "#34a2c7";
|
||||||
// navigate back to root level menu
|
// navigate back to root level menu
|
||||||
onClicked: {
|
onClicked: {
|
||||||
buildMenu();
|
buildMenu();
|
||||||
|
|
|
@ -9,34 +9,30 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.5
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
import "tabletWindows"
|
import "tabletWindows"
|
||||||
import "../../dialogs"
|
import "../../dialogs"
|
||||||
import QtQuick.Controls 1.4
|
|
||||||
import QtQuick.Controls.Styles 1.4
|
|
||||||
import QtGraphicalEffects 1.0
|
|
||||||
|
|
||||||
StackView {
|
StackView {
|
||||||
id: profileRoot
|
id: profileRoot
|
||||||
initialItem: root
|
initialItem: root
|
||||||
objectName: "stack"
|
objectName: "stack"
|
||||||
property var title: "Network Preferences"
|
property var title: "Networking Settings"
|
||||||
|
|
||||||
property var eventBridge;
|
property var eventBridge;
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
|
||||||
function pushSource(path) {
|
function pushSource(path) {
|
||||||
editRoot.push(Qt.reslovedUrl(path));
|
profileRoot.push(Qt.reslovedUrl(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
function popSource() {
|
function popSource() {
|
||||||
|
profileRoot.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
TabletPreferencesDialog {
|
TabletPreferencesDialog {
|
||||||
id: root
|
id: root
|
||||||
property string title: "Networking Settings"
|
objectName: "TabletNetworkingPreferences"
|
||||||
objectName: "NetworkingPreferences"
|
|
||||||
width: parent.width
|
|
||||||
height: parent.height
|
|
||||||
showCategories: ["Networking"]
|
showCategories: ["Networking"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,21 +58,10 @@ Item {
|
||||||
Tablet.getTablet("com.highfidelity.interface.tablet.system").gotoHomeScreen();
|
Tablet.getTablet("com.highfidelity.interface.tablet.system").gotoHomeScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.TabletHeader {
|
|
||||||
id: header
|
|
||||||
title: parent.title
|
|
||||||
|
|
||||||
anchors {
|
|
||||||
top: parent.top
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: main
|
id: main
|
||||||
anchors {
|
anchors {
|
||||||
top: header.bottom
|
top: parent.top
|
||||||
bottom: footer.top
|
bottom: footer.top
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: parent.right
|
right: parent.right
|
||||||
|
|
|
@ -56,6 +56,13 @@ public:
|
||||||
QQuickWindow* getTabletWindow();
|
QQuickWindow* getTabletWindow();
|
||||||
|
|
||||||
QObject* getFlags();
|
QObject* getFlags();
|
||||||
|
signals:
|
||||||
|
/** jsdoc
|
||||||
|
* Signaled when a tablet message or dialog is created
|
||||||
|
* @function TabletProxy#tabletNotification
|
||||||
|
* @returns {Signal}
|
||||||
|
*/
|
||||||
|
void tabletNotification();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void processMenuEvents(QObject* object, const QKeyEvent* event);
|
void processMenuEvents(QObject* object, const QKeyEvent* event);
|
||||||
|
|
|
@ -223,6 +223,7 @@ QQuickItem* OffscreenUi::createMessageBox(Icon icon, const QString& title, const
|
||||||
invokeResult = QMetaObject::invokeMethod(tabletRoot, "messageBox",
|
invokeResult = QMetaObject::invokeMethod(tabletRoot, "messageBox",
|
||||||
Q_RETURN_ARG(QVariant, result),
|
Q_RETURN_ARG(QVariant, result),
|
||||||
Q_ARG(QVariant, QVariant::fromValue(map)));
|
Q_ARG(QVariant, QVariant::fromValue(map)));
|
||||||
|
emit tabletScriptingInterface->tabletNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!invokeResult) {
|
if (!invokeResult) {
|
||||||
|
@ -430,6 +431,7 @@ QQuickItem* OffscreenUi::createInputDialog(const Icon icon, const QString& title
|
||||||
invokeResult = QMetaObject::invokeMethod(tabletRoot, "inputDialog",
|
invokeResult = QMetaObject::invokeMethod(tabletRoot, "inputDialog",
|
||||||
Q_RETURN_ARG(QVariant, result),
|
Q_RETURN_ARG(QVariant, result),
|
||||||
Q_ARG(QVariant, QVariant::fromValue(map)));
|
Q_ARG(QVariant, QVariant::fromValue(map)));
|
||||||
|
emit tabletScriptingInterface->tabletNotification();
|
||||||
}
|
}
|
||||||
if (!invokeResult) {
|
if (!invokeResult) {
|
||||||
qWarning() << "Failed to create message box";
|
qWarning() << "Failed to create message box";
|
||||||
|
@ -457,6 +459,7 @@ QQuickItem* OffscreenUi::createCustomInputDialog(const Icon icon, const QString&
|
||||||
invokeResult = QMetaObject::invokeMethod(tabletRoot, "inputDialog",
|
invokeResult = QMetaObject::invokeMethod(tabletRoot, "inputDialog",
|
||||||
Q_RETURN_ARG(QVariant, result),
|
Q_RETURN_ARG(QVariant, result),
|
||||||
Q_ARG(QVariant, QVariant::fromValue(map)));
|
Q_ARG(QVariant, QVariant::fromValue(map)));
|
||||||
|
emit tabletScriptingInterface->tabletNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!invokeResult) {
|
if (!invokeResult) {
|
||||||
|
@ -614,6 +617,7 @@ QString OffscreenUi::fileDialog(const QVariantMap& properties) {
|
||||||
invokeResult = QMetaObject::invokeMethod(tabletRoot, "fileDialog",
|
invokeResult = QMetaObject::invokeMethod(tabletRoot, "fileDialog",
|
||||||
Q_RETURN_ARG(QVariant, buildDialogResult),
|
Q_RETURN_ARG(QVariant, buildDialogResult),
|
||||||
Q_ARG(QVariant, QVariant::fromValue(properties)));
|
Q_ARG(QVariant, QVariant::fromValue(properties)));
|
||||||
|
emit tabletScriptingInterface->tabletNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!invokeResult) {
|
if (!invokeResult) {
|
||||||
|
|
|
@ -94,11 +94,13 @@ var NotificationType = {
|
||||||
LOD_WARNING: 2,
|
LOD_WARNING: 2,
|
||||||
CONNECTION_REFUSED: 3,
|
CONNECTION_REFUSED: 3,
|
||||||
EDIT_ERROR: 4,
|
EDIT_ERROR: 4,
|
||||||
|
TABLET: 5,
|
||||||
properties: [
|
properties: [
|
||||||
{ text: "Snapshot" },
|
{ text: "Snapshot" },
|
||||||
{ text: "Level of Detail" },
|
{ text: "Level of Detail" },
|
||||||
{ text: "Connection Refused" },
|
{ text: "Connection Refused" },
|
||||||
{ text: "Edit error" }
|
{ text: "Edit error" },
|
||||||
|
{ text: "Tablet" }
|
||||||
],
|
],
|
||||||
getTypeFromMenuItem: function(menuItemName) {
|
getTypeFromMenuItem: function(menuItemName) {
|
||||||
if (menuItemName.substr(menuItemName.length - NOTIFICATION_MENU_ITEM_POST.length) !== NOTIFICATION_MENU_ITEM_POST) {
|
if (menuItemName.substr(menuItemName.length - NOTIFICATION_MENU_ITEM_POST.length) !== NOTIFICATION_MENU_ITEM_POST) {
|
||||||
|
@ -535,6 +537,10 @@ function onSnapshotTaken(pathStillSnapshot, pathAnimatedSnapshot, notify) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function tabletNotification() {
|
||||||
|
createNotification("Tablet needs your attention", NotificationType.TABLET);
|
||||||
|
}
|
||||||
|
|
||||||
function processingGif() {
|
function processingGif() {
|
||||||
createNotification("Processing GIF snapshot...", NotificationType.SNAPSHOT);
|
createNotification("Processing GIF snapshot...", NotificationType.SNAPSHOT);
|
||||||
}
|
}
|
||||||
|
@ -641,7 +647,7 @@ Window.snapshotTaken.connect(onSnapshotTaken);
|
||||||
Window.processingGif.connect(processingGif);
|
Window.processingGif.connect(processingGif);
|
||||||
Window.notifyEditError = onEditError;
|
Window.notifyEditError = onEditError;
|
||||||
Window.notify = onNotify;
|
Window.notify = onNotify;
|
||||||
|
Tablet.tabletNotification.connect(tabletNotification);
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
}()); // END LOCAL_SCOPE
|
}()); // END LOCAL_SCOPE
|
||||||
|
|
Loading…
Reference in a new issue