mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
starting the zip project
This commit is contained in:
parent
49ad0951dd
commit
4f33e1502f
3 changed files with 33 additions and 0 deletions
|
@ -2015,6 +2015,13 @@ bool Application::importSVOFromURL(const QString& urlString) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// attempt to start ZIP download project
|
||||||
|
bool Appplication::importZIPFromURL(const QString& urlString) {
|
||||||
|
emit zipImportRequested(urlString);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// end attempt
|
||||||
|
|
||||||
bool Application::event(QEvent* event) {
|
bool Application::event(QEvent* event) {
|
||||||
|
|
||||||
if (!Menu::getInstance()) {
|
if (!Menu::getInstance()) {
|
||||||
|
|
|
@ -59,6 +59,19 @@ WindowScriptingInterface::WindowScriptingInterface() {
|
||||||
OffscreenUi::warning("Import SVO Error", "You need to be running edit.js to import entities.");
|
OffscreenUi::warning("Import SVO Error", "You need to be running edit.js to import entities.");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
// attempt to start ZIP download project
|
||||||
|
connect(qApp, &Application::zipImportRequested, [this](const QString& urlString) {
|
||||||
|
static const QMetaMethod zipImportRequestedSignal =
|
||||||
|
QMetaMethod::fromSignal(&WindowScriptingInterface::zipImportRequested);
|
||||||
|
|
||||||
|
if (isSignalConnected(zipImportRequestedSignal)) {
|
||||||
|
QUrl url(urlString);
|
||||||
|
emit zipImportRequested(url.url());
|
||||||
|
} else {
|
||||||
|
OffscreenUi::warning("Import ZIP Error", "You need to be running edit.js to import entities.");
|
||||||
|
}
|
||||||
|
// end attempt
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
WebWindowClass* WindowScriptingInterface::doCreateWebWindow(const QString& title, const QString& url, int width, int height) {
|
WebWindowClass* WindowScriptingInterface::doCreateWebWindow(const QString& title, const QString& url, int width, int height) {
|
||||||
|
|
|
@ -1205,6 +1205,19 @@ function importSVO(importURL) {
|
||||||
}
|
}
|
||||||
Window.svoImportRequested.connect(importSVO);
|
Window.svoImportRequested.connect(importSVO);
|
||||||
|
|
||||||
|
// attempt to start ZIP download project
|
||||||
|
function importZIP(importURL) {
|
||||||
|
print("Import ZIP requested: " + importURL);
|
||||||
|
if (!Entities.canAdjustLocks()) {
|
||||||
|
Window.alert(INSUFFICIENT_PERMISSIONS_IMPORT_ERROR_MSG);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
Window.zipImportRequested.connect(importZIP);
|
||||||
|
//end attempt
|
||||||
|
|
||||||
Menu.menuItemEvent.connect(handeMenuEvent);
|
Menu.menuItemEvent.connect(handeMenuEvent);
|
||||||
|
|
||||||
Controller.keyPressEvent.connect(function (event) {
|
Controller.keyPressEvent.connect(function (event) {
|
||||||
|
|
Loading…
Reference in a new issue