|
|
@ -81,6 +81,8 @@ const QString UBApplication::mimeTypeUniboardPage = QString("application/vnd.mne |
|
|
|
const QString UBApplication::mimeTypeUniboardPageItem = QString("application/vnd.mnemis-uniboard-page-item"); |
|
|
|
const QString UBApplication::mimeTypeUniboardPageItem = QString("application/vnd.mnemis-uniboard-page-item"); |
|
|
|
const QString UBApplication::mimeTypeUniboardPageThumbnail = QString("application/vnd.mnemis-uniboard-thumbnail"); |
|
|
|
const QString UBApplication::mimeTypeUniboardPageThumbnail = QString("application/vnd.mnemis-uniboard-thumbnail"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString UBApplication::fileToOpen = ""; |
|
|
|
|
|
|
|
|
|
|
|
#if defined(Q_OS_OSX) || defined(Q_OS_LINUX) |
|
|
|
#if defined(Q_OS_OSX) || defined(Q_OS_LINUX) |
|
|
|
bool bIsMinimized = false; |
|
|
|
bool bIsMinimized = false; |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -309,6 +311,14 @@ int UBApplication::exec(const QString& pFileToImport) |
|
|
|
boardController->paletteManager()->rightPalette()); |
|
|
|
boardController->paletteManager()->rightPalette()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!UBApplication::fileToOpen.isEmpty()) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (!UBApplication::fileToOpen.endsWith("ubx")) |
|
|
|
|
|
|
|
applicationController->importFile(UBApplication::fileToOpen); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
applicationController->showMessage(tr("Cannot open your UBX file directly. Please import it in Documents mode instead"), false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
connect(applicationController, SIGNAL(mainModeChanged(UBApplicationController::MainMode)), |
|
|
|
connect(applicationController, SIGNAL(mainModeChanged(UBApplicationController::MainMode)), |
|
|
|
boardController->paletteManager(), SLOT(slot_changeMainMode(UBApplicationController::MainMode))); |
|
|
|
boardController->paletteManager(), SLOT(slot_changeMainMode(UBApplicationController::MainMode))); |
|
|
|
|
|
|
|
|
|
|
@ -575,11 +585,22 @@ bool UBApplication::eventFilter(QObject *obj, QEvent *event) |
|
|
|
|
|
|
|
|
|
|
|
UBPlatformUtils::setFrontProcess(); |
|
|
|
UBPlatformUtils::setFrontProcess(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (applicationController) |
|
|
|
|
|
|
|
{ |
|
|
|
if (!fileToOpenEvent->file().endsWith("ubx")) |
|
|
|
if (!fileToOpenEvent->file().endsWith("ubx")) |
|
|
|
applicationController->importFile(fileToOpenEvent->file()); |
|
|
|
applicationController->importFile(fileToOpenEvent->file()); |
|
|
|
else |
|
|
|
else |
|
|
|
applicationController->showMessage(tr("Cannot open your UBX file directly. Please import it in Documents mode instead"), false); |
|
|
|
applicationController->showMessage(tr("Cannot open your UBX file directly. Please import it in Documents mode instead"), false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
//startup : progressdialog.exec() is called and fileOpenEvent is consumed too early
|
|
|
|
|
|
|
|
// we store the file and will import it when the documents tree is ready
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBApplication::fileToOpen = fileToOpenEvent->file(); |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (event->type() == QEvent::TabletLeaveProximity) |
|
|
|
if (event->type() == QEvent::TabletLeaveProximity) |
|
|
|
{ |
|
|
|
{ |
|
|
|