Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit 2b0932aa authored by Frédéric Larue's avatar Frédéric Larue
Browse files

Waiting mouse cursor set during data import / export.

parent 8e887803
......@@ -1546,7 +1546,12 @@ void UIMainWindow::launchExport( ExportInterface *exportPlugIn,
if( fileNames.empty() )
return;
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
QCoreApplication::processEvents();
exportPlugIn->saveSingleFile( id, fileNames.front(), selectedItems.front(), *m_CurrentExportParams, ctx );
QApplication::restoreOverrideCursor();
}
else
{
......@@ -1560,6 +1565,9 @@ void UIMainWindow::launchExport( ExportInterface *exportPlugIn,
if( fileNames.empty() )
return;
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
QCoreApplication::processEvents();
QString path = fileNames.front() + '/';
QString suffix;
for( QStringList::iterator flt=filters.begin(), ext=fileExtensions.begin(); flt!=filters.end(); ++flt, ++ext )
......@@ -1574,6 +1582,8 @@ void UIMainWindow::launchExport( ExportInterface *exportPlugIn,
QString filename = path + m->GetBaseName() + suffix;
exportPlugIn->saveSingleFile( id, filename, m, *m_CurrentExportParams, ctx );
}
QApplication::restoreOverrideCursor();
}
break;
......@@ -1590,6 +1600,9 @@ void UIMainWindow::launchExport( ExportInterface *exportPlugIn,
if( fileNames.empty() )
return;
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
QCoreApplication::processEvents();
QString suffix;
for( QStringList::iterator flt=filters.begin(), ext=fileExtensions.begin(); flt!=filters.end(); ++flt, ++ext )
if( *flt == dlg.selectedNameFilter() )
......@@ -1601,6 +1614,8 @@ void UIMainWindow::launchExport( ExportInterface *exportPlugIn,
QString path = fileNames.front() + '/';
exportPlugIn->saveMultiFiles( id, path, suffix, selectedItemsByType, *m_CurrentExportParams, ctx );
QApplication::restoreOverrideCursor();
break;
}
case ExportInterface::MULTIPLE_FILES_TO_ONE_FILE:
......@@ -1614,6 +1629,9 @@ void UIMainWindow::launchExport( ExportInterface *exportPlugIn,
if( fileNames.empty() )
return;
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
QCoreApplication::processEvents();
QString suffix;
for( QStringList::iterator flt=filters.begin(), ext=fileExtensions.begin(); flt!=filters.end(); ++flt, ++ext )
if( *flt == dlg.selectedNameFilter() )
......@@ -1624,11 +1642,15 @@ void UIMainWindow::launchExport( ExportInterface *exportPlugIn,
exportPlugIn->saveMultiFiles( id, fileNames.front(), suffix, selectedItemsByType, *m_CurrentExportParams, ctx );
QApplication::restoreOverrideCursor();
break;
}
case ExportInterface::INVALID_MODE:
default:
break;
{
break;
}
}
}
......@@ -1792,6 +1814,12 @@ void UIMainWindow::importFiles(const QStringList& selectedFiles)
newProject();
// Change mouse cursor to "waiting" state.
QApplication::setOverrideCursor( QCursor(Qt::WaitCursor) );
QCoreApplication::processEvents();
// Associates a list of files to be processed to each involved plug-in.
QMap<ImportHandle,QStringList> filesForEachImportPlugin;
......@@ -1875,8 +1903,15 @@ void UIMainWindow::importFiles(const QStringList& selectedFiles)
}
// Update the project tree view and the type filter combo box.
updateTypeFilters();
updateCurrentProjectContent();
// Restore the default application mouse cursor.
QApplication::restoreOverrideCursor();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment