mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 03:53:52 +02:00
Included combobox in marketplace view
This commit is contained in:
parent
d63d0ba870
commit
b39c8c52ab
4 changed files with 56 additions and 49 deletions
52
interface/resources/qml/MarketplaceComboBox.qml
Normal file
52
interface/resources/qml/MarketplaceComboBox.qml
Normal file
|
@ -0,0 +1,52 @@
|
|||
//
|
||||
// MarketplaceComboBox.qml
|
||||
//
|
||||
// Created by Elisa Lupin-Jimenez on 3 Aug 2016
|
||||
// Copyright 2016 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 QtWebChannel 1.0
|
||||
import QtWebEngine 1.1
|
||||
import QtWebSockets 1.0
|
||||
import "qrc:///qtwebchannel/qwebchannel.js" as WebChannel
|
||||
|
||||
import "controls"
|
||||
import "controls-uit" as Controls
|
||||
import "styles"
|
||||
import "styles-uit"
|
||||
|
||||
Item {
|
||||
id: marketplaceComboBox
|
||||
anchors.fill: parent
|
||||
property var currentUrl: "https://metaverse.highfidelity.com/marketplace"
|
||||
Controls.WebView {
|
||||
id: webview
|
||||
url: currentUrl
|
||||
anchors.top: parent.top
|
||||
width: parent.width
|
||||
height: parent.height - 50
|
||||
//anchors.bottom: switchMarketView.top
|
||||
focus: true
|
||||
}
|
||||
|
||||
Controls.ComboBox {
|
||||
id: switchMarketView
|
||||
anchors.bottom: parent.bottom
|
||||
width: parent.width
|
||||
height: 50
|
||||
visible: true
|
||||
label: "Market View: "
|
||||
model: ["Marketplace", "Clara.io"]
|
||||
onCurrentIndexChanged: {
|
||||
if (currentIndex === 0) { webview.url = "https://metaverse.highfidelity.com/marketplace"; }
|
||||
if (currentIndex === 1) { webview.url = "https://clara.io/library"; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -76,6 +76,5 @@ Windows.Window {
|
|||
Item {
|
||||
id: contentHolder
|
||||
anchors.fill: parent
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,43 +0,0 @@
|
|||
//
|
||||
// MarketplaceComboBox.qml
|
||||
//
|
||||
// Created by Elisa Lupin-Jimenez on 3 Aug 2016
|
||||
// Copyright 2016 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 QtWebChannel 1.0
|
||||
import QtWebEngine 1.1
|
||||
import QtWebSockets 1.0
|
||||
import "qrc:///qtwebchannel/qwebchannel.js" as WebChannel
|
||||
|
||||
import "controls"
|
||||
import "controls-uit" as Controls
|
||||
import "styles"
|
||||
import "styles-uit"
|
||||
|
||||
// just temporary
|
||||
Controls.WebView {
|
||||
id: webview
|
||||
anchors.fill: parent
|
||||
url: "about:blank"
|
||||
focus: true
|
||||
}
|
||||
|
||||
Controls.ComboBox {
|
||||
id: switchMarketView
|
||||
//anchors.top: parent.bottom
|
||||
//anchors.bottomMargin: 4
|
||||
anchors.fill: parent
|
||||
visible: true
|
||||
model: ListModel {
|
||||
id: cbItems
|
||||
ListElement { text: "Banana" }
|
||||
ListElement { text: "Apple" }
|
||||
ListElement { text: "Coconut" }
|
||||
}
|
||||
}
|
|
@ -9,15 +9,14 @@
|
|||
//
|
||||
|
||||
var toolIconUrl = Script.resolvePath("assets/images/tools/");
|
||||
var qml = Script.resolvePath("../../interface/resources/qml/MarketplaceComboBox.qml")
|
||||
|
||||
var MARKETPLACE_URL = "https://metaverse.highfidelity.com/marketplace";
|
||||
var CLARA_URL = "https://clara.io/library";
|
||||
var marketplaceWindow = new OverlayWindow({
|
||||
title: "Marketplace",
|
||||
source: "about:blank",
|
||||
//source: MARKETPLACE_URL,
|
||||
//source: "https://s3.amazonaws.com/DreamingContent/qml/content.qml",
|
||||
//source: "C:\Users\elisa\Documents\GitHub\hifi\interface\resources\qml\controls-uit\WebView.qml",
|
||||
//source: "about:blank",
|
||||
source: qml,
|
||||
width: 900,
|
||||
height: 700,
|
||||
toolWindow: false,
|
||||
|
@ -42,7 +41,7 @@ function showMarketplace(marketplaceID) {
|
|||
|
||||
function hideMarketplace() {
|
||||
marketplaceWindow.setVisible(false);
|
||||
marketplaceWindow.webview.url = "about:blank";
|
||||
//marketplaceWindow.webview.url = "about:blank";
|
||||
}
|
||||
|
||||
function toggleMarketplace() {
|
||||
|
|
Loading…
Reference in a new issue