Changeset View
Changeset View
Standalone View
Standalone View
ImportExport/ImportHandler.cpp
| Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 60 | { | |||
|---|---|---|---|---|---|
| 86 | return ok; | 86 | return ok; | ||
| 87 | } | 87 | } | ||
| 88 | 88 | | |||
| 89 | void ImportExport::ImportHandler::copyFromExternal() | 89 | void ImportExport::ImportHandler::copyFromExternal() | ||
| 90 | { | 90 | { | ||
| 91 | m_pendingCopies = m_settings.selectedImages(); | 91 | m_pendingCopies = m_settings.selectedImages(); | ||
| 92 | m_totalCopied = 0; | 92 | m_totalCopied = 0; | ||
| 93 | m_progress = new QProgressDialog( MainWindow::Window::theMainWindow()); | 93 | m_progress = new QProgressDialog( MainWindow::Window::theMainWindow()); | ||
| 94 | m_progress->setWindowTitle(i18n("Copying Images") ); | 94 | m_progress->setWindowTitle(i18nc("@title:window", "Copying Images")); | ||
| 95 | m_progress->setMinimum( 0 ); | 95 | m_progress->setMinimum( 0 ); | ||
| 96 | m_progress->setMaximum( 2 * m_pendingCopies.count() ); | 96 | m_progress->setMaximum( 2 * m_pendingCopies.count() ); | ||
| 97 | m_progress->show(); | 97 | m_progress->show(); | ||
| 98 | connect(m_progress, &QProgressDialog::canceled, this, &ImportHandler::stopCopyingImages); | 98 | connect(m_progress, &QProgressDialog::canceled, this, &ImportHandler::stopCopyingImages); | ||
| 99 | copyNextFromExternal(); | 99 | copyNextFromExternal(); | ||
| 100 | 100 | | |||
| 101 | } | 101 | } | ||
| 102 | 102 | | |||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
| 145 | } | 145 | } | ||
| 146 | 146 | | |||
| 147 | bool ImportExport::ImportHandler::copyFilesFromZipFile() | 147 | bool ImportExport::ImportHandler::copyFilesFromZipFile() | ||
| 148 | { | 148 | { | ||
| 149 | DB::ImageInfoList images = m_settings.selectedImages(); | 149 | DB::ImageInfoList images = m_settings.selectedImages(); | ||
| 150 | 150 | | |||
| 151 | m_totalCopied = 0; | 151 | m_totalCopied = 0; | ||
| 152 | m_progress = new QProgressDialog( MainWindow::Window::theMainWindow()); | 152 | m_progress = new QProgressDialog( MainWindow::Window::theMainWindow()); | ||
| 153 | m_progress->setWindowTitle(i18n("Copying Images") ); | 153 | m_progress->setWindowTitle(i18nc("@title:window", "Copying Images")); | ||
| 154 | m_progress->setMinimum( 0 ); | 154 | m_progress->setMinimum( 0 ); | ||
| 155 | m_progress->setMaximum( 2 * m_pendingCopies.count() ); | 155 | m_progress->setMaximum( 2 * m_pendingCopies.count() ); | ||
| 156 | m_progress->show(); | 156 | m_progress->show(); | ||
| 157 | 157 | | |||
| 158 | for( DB::ImageInfoListConstIterator it = images.constBegin(); it != images.constEnd(); ++it ) { | 158 | for( DB::ImageInfoListConstIterator it = images.constBegin(); it != images.constEnd(); ++it ) { | ||
| 159 | if ( !isImageAlreadyInDB( *it ) ) { | 159 | if ( !isImageAlreadyInDB( *it ) ) { | ||
| 160 | const DB::FileName fileName = (*it)->fileName(); | 160 | const DB::FileName fileName = (*it)->fileName(); | ||
| 161 | QByteArray data = m_kimFileReader->loadImage( fileName.relative() ); | 161 | QByteArray data = m_kimFileReader->loadImage( fileName.relative() ); | ||
| ▲ Show 20 Lines • Show All 196 Lines • Show Last 20 Lines | |||||