mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01: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) {
|
||||
switch (message.method) {
|
||||
case 'selectTab':
|
||||
|
@ -333,6 +349,9 @@ TabBar {
|
|||
case 'grid':
|
||||
editTabView.currentIndex = 3;
|
||||
break;
|
||||
case 'import':
|
||||
editTabView.currentIndex = 4;
|
||||
break;
|
||||
default:
|
||||
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) {
|
||||
switch (message.method) {
|
||||
case 'selectTab':
|
||||
|
@ -304,7 +320,7 @@ TabBar {
|
|||
// Changes the current tab based on tab index or title as input
|
||||
function selectTab(id) {
|
||||
if (typeof id === 'number') {
|
||||
if (id >= tabIndex.create && id <= tabIndex.grid) {
|
||||
if (id >= tabIndex.create && id <= tabIndex.import) {
|
||||
editTabView.currentIndex = id;
|
||||
} else {
|
||||
console.warn('Attempt to switch to invalid tab:', id);
|
||||
|
@ -320,6 +336,9 @@ TabBar {
|
|||
case 'grid':
|
||||
editTabView.currentIndex = tabIndex.grid;
|
||||
break;
|
||||
case 'import':
|
||||
editTabView.currentIndex = tabIndex.import;
|
||||
break;
|
||||
default:
|
||||
console.warn('Attempt to switch to invalid tab:', id);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue