mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 19:16:56 +02:00
open webview from tabletwebscreen
This commit is contained in:
parent
b1abbbe472
commit
2bf7b12c7d
4 changed files with 11 additions and 9 deletions
|
@ -270,13 +270,8 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
onNewViewRequested: {
|
onNewViewRequested: {
|
||||||
console.log("--------------> new window opened <-------------");
|
|
||||||
request.openIn(webview);
|
request.openIn(webview);
|
||||||
}
|
}
|
||||||
|
|
||||||
onWindowCloseRequested: {
|
|
||||||
console.log("-------------> requested to cloes window <---------------");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HiFiControls.Keyboard {
|
HiFiControls.Keyboard {
|
||||||
|
|
|
@ -24,7 +24,6 @@ Item {
|
||||||
option = value;
|
option = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
Component { id: profileCreator; HFTabletWebEngineProfile {} }
|
|
||||||
Component { id: inputDialogBuilder; TabletQueryDialog { } }
|
Component { id: inputDialogBuilder; TabletQueryDialog { } }
|
||||||
function inputDialog(properties) {
|
function inputDialog(properties) {
|
||||||
openModal = inputDialogBuilder.createObject(tabletRoot, properties);
|
openModal = inputDialogBuilder.createObject(tabletRoot, properties);
|
||||||
|
@ -91,6 +90,11 @@ Item {
|
||||||
loader.item.gotoPreviousApp = true;
|
loader.item.gotoPreviousApp = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadWebBase() {
|
||||||
|
loader.source = "";
|
||||||
|
loader.source = "TabletWebView.qml";
|
||||||
|
}
|
||||||
|
|
||||||
function returnToPreviousApp() {
|
function returnToPreviousApp() {
|
||||||
tabletApps.remove(currentApp);
|
tabletApps.remove(currentApp);
|
||||||
|
@ -117,8 +121,6 @@ Item {
|
||||||
|
|
||||||
function loadWebUrl(url, injectedJavaScriptUrl) {
|
function loadWebUrl(url, injectedJavaScriptUrl) {
|
||||||
tabletApps.clear();
|
tabletApps.clear();
|
||||||
var newProfile = profileCreator.createObject();
|
|
||||||
loader.item.viewProfile = newProfile;
|
|
||||||
loader.item.url = url;
|
loader.item.url = url;
|
||||||
loader.item.scriptURL = injectedJavaScriptUrl;
|
loader.item.scriptURL = injectedJavaScriptUrl;
|
||||||
tabletApps.append({"appUrl": "TabletWebView.qml", "isWebUrl": true, "scriptUrl": injectedJavaScriptUrl, "appWebUrl": url});
|
tabletApps.append({"appUrl": "TabletWebView.qml", "isWebUrl": true, "scriptUrl": injectedJavaScriptUrl, "appWebUrl": url});
|
||||||
|
|
|
@ -38,6 +38,11 @@ Windows.ScrollingWindow {
|
||||||
loader.source = url;
|
loader.source = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadWebBase() {
|
||||||
|
loader.source = "";
|
||||||
|
loader.source = "WindowWebView.qml";
|
||||||
|
}
|
||||||
|
|
||||||
function loadWebUrl(url, injectedJavaScriptUrl) {
|
function loadWebUrl(url, injectedJavaScriptUrl) {
|
||||||
loader.item.url = url;
|
loader.item.url = url;
|
||||||
loader.item.scriptURL = injectedJavaScriptUrl;
|
loader.item.scriptURL = injectedJavaScriptUrl;
|
||||||
|
|
|
@ -508,7 +508,7 @@ void TabletProxy::gotoWebScreen(const QString& url, const QString& injectedJavaS
|
||||||
|
|
||||||
if (root) {
|
if (root) {
|
||||||
removeButtonsFromHomeScreen();
|
removeButtonsFromHomeScreen();
|
||||||
QMetaObject::invokeMethod(root, "loadSource", Q_ARG(const QVariant&, QVariant(WEB_VIEW_SOURCE_URL)));
|
QMetaObject::invokeMethod(root, "loadWebBase");
|
||||||
QMetaObject::invokeMethod(root, "setShown", Q_ARG(const QVariant&, QVariant(true)));
|
QMetaObject::invokeMethod(root, "setShown", Q_ARG(const QVariant&, QVariant(true)));
|
||||||
QMetaObject::invokeMethod(root, "loadWebUrl", Q_ARG(const QVariant&, QVariant(url)), Q_ARG(const QVariant&, QVariant(injectedJavaScriptUrl)));
|
QMetaObject::invokeMethod(root, "loadWebUrl", Q_ARG(const QVariant&, QVariant(url)), Q_ARG(const QVariant&, QVariant(injectedJavaScriptUrl)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue