Changeset View
Changeset View
Standalone View
Standalone View
src/processor.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
52 | 52 | | |||
53 | void Processor::addFile(const QString& filePath) | 53 | void Processor::addFile(const QString& filePath) | ||
54 | { | 54 | { | ||
55 | m_files << filePath; | 55 | m_files << filePath; | ||
56 | m_numFiles++; | 56 | m_numFiles++; | ||
57 | 57 | | |||
58 | QTimer::singleShot(0, this, SLOT(process())); | 58 | QTimer::singleShot(0, this, SLOT(process())); | ||
59 | emit numFilesChanged(); | 59 | emit numFilesChanged(); | ||
60 | ImageStorage::instance()->commit(); | ||||
60 | } | 61 | } | ||
61 | 62 | | |||
62 | void Processor::removeFile(const QString& filePath) | 63 | void Processor::removeFile(const QString& filePath) | ||
63 | { | 64 | { | ||
64 | ImageStorage::instance()->removeImage(filePath); | 65 | ImageStorage::instance()->removeImage(filePath); | ||
66 | ImageStorage::instance()->commit(); | ||||
65 | } | 67 | } | ||
66 | 68 | | |||
67 | float Processor::initialProgress() const | 69 | float Processor::initialProgress() const | ||
68 | { | 70 | { | ||
69 | if (m_numFiles) { | 71 | if (m_numFiles) { | ||
70 | return 1.0f - (m_files.size() * 1.0f / m_numFiles); | 72 | return 1.0f - (m_files.size() * 1.0f / m_numFiles); | ||
71 | } | 73 | } | ||
72 | 74 | | |||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |