mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +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.Controls 1.4
|
||||
import "tabletWindows"
|
||||
import "../../dialogs"
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
StackView {
|
||||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
property var title: "Audio Preferences"
|
||||
property string title: "Audio Settings"
|
||||
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
function pushSource(path) {
|
||||
editRoot.push(Qt.reslovedUrl(path));
|
||||
profileRoot.push(Qt.reslovedUrl(path));
|
||||
}
|
||||
|
||||
function popSource() {
|
||||
|
||||
profileRoot.pop();
|
||||
}
|
||||
|
||||
TabletPreferencesDialog {
|
||||
id: root
|
||||
property string title: "Audio Settings"
|
||||
objectName: "TabletAudioPreferences"
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
showCategories: ["Audio"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,34 +9,30 @@
|
|||
//
|
||||
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Controls 1.4
|
||||
import "tabletWindows"
|
||||
import "../../dialogs"
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
StackView {
|
||||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
property var title: "Avatar Preferences"
|
||||
property string title: "Avatar Settings"
|
||||
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
function pushSource(path) {
|
||||
editRoot.push(Qt.reslovedUrl(path));
|
||||
profileRoot.push(Qt.reslovedUrl(path));
|
||||
}
|
||||
|
||||
function popSource() {
|
||||
|
||||
profileRoot.pop();
|
||||
}
|
||||
|
||||
TabletPreferencesDialog {
|
||||
id: root
|
||||
property string title: "Avatar Preferences"
|
||||
objectName: "TabletAvatarPreferences"
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
showCategories: ["Avatar Basics", "Avatar Tuning", "Avatar Camera"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,35 +9,30 @@
|
|||
//
|
||||
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Controls 1.4
|
||||
import "tabletWindows"
|
||||
import "../../dialogs"
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
StackView {
|
||||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
property var title: "General Prefernces"
|
||||
property string title: "General Settings"
|
||||
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
|
||||
function pushSource(path) {
|
||||
editRoot.push(Qt.reslovedUrl(path));
|
||||
profileRoot.push(Qt.reslovedUrl(path));
|
||||
}
|
||||
|
||||
function popSource() {
|
||||
|
||||
profileRoot.pop();
|
||||
}
|
||||
|
||||
|
||||
TabletPreferencesDialog {
|
||||
id: root
|
||||
property string title: "General Preferences"
|
||||
objectName: "TabletGeneralPreferences"
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
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 "../../dialogs"
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
StackView {
|
||||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
property string title: "Graphics Settings"
|
||||
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
function pushSource(path) {
|
||||
editRoot.push(Qt.reslovedUrl(path));
|
||||
profileRoot.push(Qt.reslovedUrl(path));
|
||||
}
|
||||
|
||||
function popSource() {
|
||||
|
||||
profileRoot.pop();
|
||||
}
|
||||
|
||||
TabletPreferencesDialog {
|
||||
id: root
|
||||
property string title: "Graphics Settings"
|
||||
objectName: "TabletGraphicsPreferences"
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
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 "../../dialogs"
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
StackView {
|
||||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
property string title: "LOD Settings"
|
||||
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
function pushSource(path) {
|
||||
editRoot.push(Qt.reslovedUrl(path));
|
||||
profileRoot.push(Qt.reslovedUrl(path));
|
||||
}
|
||||
|
||||
function popSource() {
|
||||
|
||||
profileRoot.pop();
|
||||
}
|
||||
|
||||
TabletPreferencesDialog {
|
||||
id: root
|
||||
property string title: "LOD Settings"
|
||||
objectName: "TabletLodPreferences"
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
showCategories: ["Level of Detail Tuning"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ FocusScope {
|
|||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: iconColorOverlay.color = "#1fc6a6";
|
||||
onExited: iconColorOverlay.color = "#ffffff";
|
||||
onExited: iconColorOverlay.color = "#34a2c7";
|
||||
// navigate back to root level menu
|
||||
onClicked: {
|
||||
buildMenu();
|
||||
|
|
|
@ -9,34 +9,30 @@
|
|||
//
|
||||
|
||||
import QtQuick 2.5
|
||||
import QtQuick.Controls 1.4
|
||||
import "tabletWindows"
|
||||
import "../../dialogs"
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
StackView {
|
||||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
property var title: "Network Preferences"
|
||||
property var title: "Networking Settings"
|
||||
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
function pushSource(path) {
|
||||
editRoot.push(Qt.reslovedUrl(path));
|
||||
profileRoot.push(Qt.reslovedUrl(path));
|
||||
}
|
||||
|
||||
function popSource() {
|
||||
|
||||
profileRoot.pop();
|
||||
}
|
||||
|
||||
TabletPreferencesDialog {
|
||||
id: root
|
||||
property string title: "Networking Settings"
|
||||
objectName: "NetworkingPreferences"
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
objectName: "TabletNetworkingPreferences"
|
||||
showCategories: ["Networking"]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,21 +58,10 @@ Item {
|
|||
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 {
|
||||
id: main
|
||||
anchors {
|
||||
top: header.bottom
|
||||
top: parent.top
|
||||
bottom: footer.top
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
|
|
|
@ -56,7 +56,14 @@ public:
|
|||
QQuickWindow* getTabletWindow();
|
||||
|
||||
QObject* getFlags();
|
||||
|
||||
signals:
|
||||
/** jsdoc
|
||||
* Signaled when a tablet message or dialog is created
|
||||
* @function TabletProxy#tabletNotification
|
||||
* @returns {Signal}
|
||||
*/
|
||||
void tabletNotification();
|
||||
|
||||
private:
|
||||
void processMenuEvents(QObject* object, const QKeyEvent* event);
|
||||
void processTabletEvents(QObject* object, const QKeyEvent* event);
|
||||
|
|
|
@ -223,6 +223,7 @@ QQuickItem* OffscreenUi::createMessageBox(Icon icon, const QString& title, const
|
|||
invokeResult = QMetaObject::invokeMethod(tabletRoot, "messageBox",
|
||||
Q_RETURN_ARG(QVariant, result),
|
||||
Q_ARG(QVariant, QVariant::fromValue(map)));
|
||||
emit tabletScriptingInterface->tabletNotification();
|
||||
}
|
||||
|
||||
if (!invokeResult) {
|
||||
|
@ -430,6 +431,7 @@ QQuickItem* OffscreenUi::createInputDialog(const Icon icon, const QString& title
|
|||
invokeResult = QMetaObject::invokeMethod(tabletRoot, "inputDialog",
|
||||
Q_RETURN_ARG(QVariant, result),
|
||||
Q_ARG(QVariant, QVariant::fromValue(map)));
|
||||
emit tabletScriptingInterface->tabletNotification();
|
||||
}
|
||||
if (!invokeResult) {
|
||||
qWarning() << "Failed to create message box";
|
||||
|
@ -457,6 +459,7 @@ QQuickItem* OffscreenUi::createCustomInputDialog(const Icon icon, const QString&
|
|||
invokeResult = QMetaObject::invokeMethod(tabletRoot, "inputDialog",
|
||||
Q_RETURN_ARG(QVariant, result),
|
||||
Q_ARG(QVariant, QVariant::fromValue(map)));
|
||||
emit tabletScriptingInterface->tabletNotification();
|
||||
}
|
||||
|
||||
if (!invokeResult) {
|
||||
|
@ -614,6 +617,7 @@ QString OffscreenUi::fileDialog(const QVariantMap& properties) {
|
|||
invokeResult = QMetaObject::invokeMethod(tabletRoot, "fileDialog",
|
||||
Q_RETURN_ARG(QVariant, buildDialogResult),
|
||||
Q_ARG(QVariant, QVariant::fromValue(properties)));
|
||||
emit tabletScriptingInterface->tabletNotification();
|
||||
}
|
||||
|
||||
if (!invokeResult) {
|
||||
|
|
|
@ -94,11 +94,13 @@ var NotificationType = {
|
|||
LOD_WARNING: 2,
|
||||
CONNECTION_REFUSED: 3,
|
||||
EDIT_ERROR: 4,
|
||||
TABLET: 5,
|
||||
properties: [
|
||||
{ text: "Snapshot" },
|
||||
{ text: "Level of Detail" },
|
||||
{ text: "Connection Refused" },
|
||||
{ text: "Edit error" }
|
||||
{ text: "Edit error" },
|
||||
{ text: "Tablet" }
|
||||
],
|
||||
getTypeFromMenuItem: function(menuItemName) {
|
||||
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() {
|
||||
createNotification("Processing GIF snapshot...", NotificationType.SNAPSHOT);
|
||||
}
|
||||
|
@ -641,7 +647,7 @@ Window.snapshotTaken.connect(onSnapshotTaken);
|
|||
Window.processingGif.connect(processingGif);
|
||||
Window.notifyEditError = onEditError;
|
||||
Window.notify = onNotify;
|
||||
|
||||
Tablet.tabletNotification.connect(tabletNotification);
|
||||
setup();
|
||||
|
||||
}()); // END LOCAL_SCOPE
|
||||
|
|
Loading…
Reference in a new issue