mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 13:33:27 +02:00
Add "Import" Tab
Add "Import" Tab
This commit is contained in:
parent
634dc64f8f
commit
f50101db8a
2 changed files with 39 additions and 1 deletions
|
@ -301,6 +301,22 @@ TabBar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EditTabButton {
|
||||||
|
title: "IMPORT"
|
||||||
|
active: true
|
||||||
|
enabled: true
|
||||||
|
property string originalUrl: ""
|
||||||
|
|
||||||
|
property Component visualItem: Component {
|
||||||
|
WebView {
|
||||||
|
id: advancedImportWebView
|
||||||
|
url: Qt.resolvedUrl("../importEntities/html/importEntities.html")
|
||||||
|
enabled: true
|
||||||
|
blurOnCtrlShift: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function fromScript(message) {
|
function fromScript(message) {
|
||||||
switch (message.method) {
|
switch (message.method) {
|
||||||
case 'selectTab':
|
case 'selectTab':
|
||||||
|
@ -333,6 +349,9 @@ TabBar {
|
||||||
case 'grid':
|
case 'grid':
|
||||||
editTabView.currentIndex = 3;
|
editTabView.currentIndex = 3;
|
||||||
break;
|
break;
|
||||||
|
case 'import':
|
||||||
|
editTabView.currentIndex = 4;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.warn('Attempt to switch to invalid tab:', id);
|
console.warn('Attempt to switch to invalid tab:', id);
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,6 +291,22 @@ TabBar {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EditTabButton {
|
||||||
|
title: "IMPORT"
|
||||||
|
active: true
|
||||||
|
enabled: true
|
||||||
|
property string originalUrl: ""
|
||||||
|
|
||||||
|
property Component visualItem: Component {
|
||||||
|
WebView {
|
||||||
|
id: advancedImportWebView
|
||||||
|
url: Qt.resolvedUrl("../importEntities/html/importEntities.html")
|
||||||
|
enabled: true
|
||||||
|
blurOnCtrlShift: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function fromScript(message) {
|
function fromScript(message) {
|
||||||
switch (message.method) {
|
switch (message.method) {
|
||||||
case 'selectTab':
|
case 'selectTab':
|
||||||
|
@ -304,7 +320,7 @@ TabBar {
|
||||||
// Changes the current tab based on tab index or title as input
|
// Changes the current tab based on tab index or title as input
|
||||||
function selectTab(id) {
|
function selectTab(id) {
|
||||||
if (typeof id === 'number') {
|
if (typeof id === 'number') {
|
||||||
if (id >= tabIndex.create && id <= tabIndex.grid) {
|
if (id >= tabIndex.create && id <= tabIndex.import) {
|
||||||
editTabView.currentIndex = id;
|
editTabView.currentIndex = id;
|
||||||
} else {
|
} else {
|
||||||
console.warn('Attempt to switch to invalid tab:', id);
|
console.warn('Attempt to switch to invalid tab:', id);
|
||||||
|
@ -320,6 +336,9 @@ TabBar {
|
||||||
case 'grid':
|
case 'grid':
|
||||||
editTabView.currentIndex = tabIndex.grid;
|
editTabView.currentIndex = tabIndex.grid;
|
||||||
break;
|
break;
|
||||||
|
case 'import':
|
||||||
|
editTabView.currentIndex = tabIndex.import;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.warn('Attempt to switch to invalid tab:', id);
|
console.warn('Attempt to switch to invalid tab:', id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue