digiKam
|
Classes | |
class | Entry |
Public Member Functions | |
const FilterAction & | action (int i) const |
int | actionCount () const |
Returns the number of non-null actions. More... | |
void | adjustCurrentUuid (const QString &uuid) |
Changes the UUID of the current (last added current) referred image. More... | |
void | adjustReferredImages () |
QList< FilterAction > | allActions () const |
Gets all actions which are not null. More... | |
QList< HistoryImageId > | allReferredImages () const |
void | appendReferredImage (const HistoryImageId &id) |
void | clearReferredImages () |
Remove all referredImages, leaving the entries list untouched. More... | |
HistoryImageId | currentReferredImage () const |
DImageHistory () | |
DImageHistory (const DImageHistory &other) | |
QList< DImageHistory::Entry > & | entries () |
const QList< DImageHistory::Entry > & | entries () const |
bool | hasActions () const |
Returns if there is any non-null action. More... | |
bool | hasCurrentReferredImage () const |
bool | hasFilters () const |
bool | hasOriginalReferredImage () const |
bool | hasReferredImageOfType (HistoryImageId::Type type) const |
bool | hasReferredImages () const |
void | insertReferredImage (int entryIndex, const HistoryImageId &id) |
bool | isEmpty () const |
bool | isNull () const |
bool | isValid () const |
void | moveCurrentReferredImage (const QString &newPath, const QString &newFileName) |
bool | operator!= (const DImageHistory &other) const |
bool | operator< (const DImageHistory &other) const |
DImageHistory & | operator<< (const FilterAction &action) |
DImageHistory & | operator<< (const HistoryImageId &imageId) |
DImageHistory & | operator= (const DImageHistory &other) |
bool | operator== (const DImageHistory &other) const |
bool | operator> (const DImageHistory &other) const |
Entry & | operator[] (int i) |
const Entry & | operator[] (int i) const |
HistoryImageId | originalReferredImage () const |
void | purgePathFromReferredImages (const QString &path, const QString &fileName) |
QList< HistoryImageId > & | referredImages (int i) |
const QList< HistoryImageId > & | referredImages (int i) const |
QList< HistoryImageId > | referredImagesOfType (HistoryImageId::Type type) const |
void | removeLast () |
Removes the last entry from the history. More... | |
int | size () const |
Returns the number of entries. More... | |
QString | toXml () const |
~DImageHistory () | |
Static Public Member Functions | |
static DImageHistory | fromXml (const QString &xml) |
Digikam::DImageHistory::DImageHistory | ( | ) |
Digikam::DImageHistory::DImageHistory | ( | const DImageHistory & | other | ) |
Digikam::DImageHistory::~DImageHistory | ( | ) |
const FilterAction & Digikam::DImageHistory::action | ( | int | i | ) | const |
Referenced by fromXml(), and operator<<().
int Digikam::DImageHistory::actionCount | ( | ) | const |
Returns the number of non-null actions.
References Digikam::DImageHistory::Entry::action, and Digikam::FilterAction::isNull().
Referenced by Digikam::UndoManager::hasChanges().
void Digikam::DImageHistory::adjustCurrentUuid | ( | const QString & | uuid | ) |
Changes the UUID of the current (last added current) referred image.
References Digikam::DImageHistory::Entry::referredImages.
void Digikam::DImageHistory::adjustReferredImages | ( | ) |
Adjusts the type of a Current HistoryImageId: If it is the first entry, it becomes Original, if it is in an intermediate entry, it becomes Intermediate, if in the last entry, it stays current.
References Digikam::HistoryImageId::Intermediate, Digikam::HistoryImageId::Original, and Digikam::DImageHistory::Entry::referredImages.
Referenced by insertReferredImage(), Digikam::DImg::lastSavedFileOriginData(), and Digikam::DImg::prepareMetadataToSave().
QList< FilterAction > Digikam::DImageHistory::allActions | ( | ) | const |
Gets all actions which are not null.
References Digikam::DImageHistory::Entry::action, and Digikam::FilterAction::isNull().
QList< HistoryImageId > Digikam::DImageHistory::allReferredImages | ( | ) | const |
References Digikam::DImageHistory::Entry::referredImages.
void Digikam::DImageHistory::appendReferredImage | ( | const HistoryImageId & | id | ) |
References insertReferredImage().
Referenced by operator<<().
void Digikam::DImageHistory::clearReferredImages | ( | ) |
Remove all referredImages, leaving the entries list untouched.
Edit referred images
Referenced by Digikam::EditorCore::slotImageLoaded(), and Digikam::EditorCore::switchToLastSaved().
HistoryImageId Digikam::DImageHistory::currentReferredImage | ( | ) | const |
References Digikam::DImageHistory::Entry::referredImages.
Referenced by Digikam::EditorCore::ensureHasCurrentUuid(), and Digikam::EditorCore::provideCurrentUuid().
QList< DImageHistory::Entry > & Digikam::DImageHistory::entries | ( | ) |
Access entries. There are size() entries.
Referenced by Digikam::ItemHistoryGraphData::addHistory(), Digikam::ItemFiltersHistoryModel::ItemFiltersHistoryModel(), Digikam::DImg::lastSavedFileOriginData(), Digikam::EditorWindow::resolvedImageHistory(), Digikam::ItemScanner::resolvedImageHistory(), Digikam::FiltersHistoryWidget::setHistory(), Digikam::ItemFiltersHistoryModel::setUrl(), and toXml().
const QList< DImageHistory::Entry > & Digikam::DImageHistory::entries | ( | ) | const |
|
static |
References action(), Digikam::FilterAction::addFlag(), Digikam::FilterAction::addParameter(), Digikam::FilterAction::ComplexFilter, Digikam::FilterAction::DocumentedHistory, Digikam::FilterAction::ExplicitBranch, Digikam::HistoryImageId::Intermediate, Digikam::HistoryImageId::isOriginalFile(), Digikam::HistoryImageId::isValid(), Digikam::HistoryImageId::m_creationDate, Digikam::HistoryImageId::m_originalUUID, Digikam::HistoryImageId::m_type, Digikam::HistoryImageId::m_uuid, Digikam::HistoryImageId::Original, Digikam::FilterAction::ReproducibleFilter, Digikam::HistoryImageId::setCreationDate(), Digikam::FilterAction::setDisplayableName(), Digikam::HistoryImageId::setFileName(), Digikam::HistoryImageId::setPath(), Digikam::HistoryImageId::setUniqueHash(), size(), and Digikam::HistoryImageId::Source.
Referenced by Digikam::ItemInfo::imageHistory(), Digikam::ItemFiltersHistoryModel::ItemFiltersHistoryModel(), Digikam::DImgLoader::readMetadata(), Digikam::EditorCore::readMetadataFromFile(), Digikam::ItemScanner::resolveImageHistory(), and Digikam::ItemFiltersHistoryModel::setUrl().
bool Digikam::DImageHistory::hasActions | ( | ) | const |
Returns if there is any non-null action.
Access actions.
There is one action per entry, but the action may be null.
References Digikam::DImageHistory::Entry::action, and Digikam::FilterAction::isNull().
bool Digikam::DImageHistory::hasCurrentReferredImage | ( | ) | const |
References Digikam::HistoryImageId::Current, and hasReferredImageOfType().
|
inline |
bool Digikam::DImageHistory::hasOriginalReferredImage | ( | ) | const |
References hasReferredImageOfType(), and Digikam::HistoryImageId::Original.
Referenced by Digikam::EditorWindow::hasOriginalToRestore().
bool Digikam::DImageHistory::hasReferredImageOfType | ( | HistoryImageId::Type | type | ) | const |
References Digikam::DImageHistory::Entry::referredImages.
Referenced by hasCurrentReferredImage(), and hasOriginalReferredImage().
bool Digikam::DImageHistory::hasReferredImages | ( | ) | const |
References Digikam::DImageHistory::Entry::referredImages.
void Digikam::DImageHistory::insertReferredImage | ( | int | entryIndex, |
const HistoryImageId & | id | ||
) |
References adjustReferredImages(), and isValid().
Referenced by appendReferredImage().
bool Digikam::DImageHistory::isEmpty | ( | ) | const |
A history is considered empty if there are no entries.
Referenced by Digikam::ItemHistoryGraphData::addHistory(), and Digikam::DImg::lastSavedFileOriginData().
bool Digikam::DImageHistory::isNull | ( | ) | const |
A history is null if it is constructed with the default constructor
Referenced by Digikam::ItemScanner::resolveImageHistory(), and Digikam::EditorCore::switchToLastSaved().
bool Digikam::DImageHistory::isValid | ( | ) | const |
A history is a valid history (telling something about the past), if the history is not empty, and there is at least one referred image other than the "Current" entry, or there is a valid action.
References Digikam::DImageHistory::Entry::action, Digikam::FilterAction::isNull(), and Digikam::DImageHistory::Entry::referredImages.
Referenced by insertReferredImage().
void Digikam::DImageHistory::moveCurrentReferredImage | ( | const QString & | newPath, |
const QString & | newFileName | ||
) |
Change file path entries of the current referred image
References Digikam::DImageHistory::Entry::referredImages.
|
inline |
References Digikam::operator==().
bool Digikam::DImageHistory::operator< | ( | const DImageHistory & | other | ) | const |
References size().
DImageHistory & Digikam::DImageHistory::operator<< | ( | const FilterAction & | action | ) |
Appends a new filter action to the history.
References Digikam::DImageHistory::Entry::action, action(), and Digikam::FilterAction::isNull().
DImageHistory & Digikam::DImageHistory::operator<< | ( | const HistoryImageId & | imageId | ) |
Appends a new referred image, representing the current state of the history. If you add an id of type Current, adjustReferredImages() will be called.
References appendReferredImage().
DImageHistory & Digikam::DImageHistory::operator= | ( | const DImageHistory & | other | ) |
bool Digikam::DImageHistory::operator== | ( | const DImageHistory & | other | ) | const |
bool Digikam::DImageHistory::operator> | ( | const DImageHistory & | other | ) | const |
References size().
DImageHistory::Entry & Digikam::DImageHistory::operator[] | ( | int | i | ) |
const DImageHistory::Entry & Digikam::DImageHistory::operator[] | ( | int | i | ) | const |
HistoryImageId Digikam::DImageHistory::originalReferredImage | ( | ) | const |
References Digikam::DImageHistory::Entry::referredImages.
void Digikam::DImageHistory::purgePathFromReferredImages | ( | const QString & | path, |
const QString & | fileName | ||
) |
Remove file path entries pointing to the given absolute path from any referred images. This is useful when said file is about to be overwritten. All other HistoryImageId fields remain unchanged, no HistoryImageId is removed. path: directory path, without filename.
References Digikam::DImageHistory::Entry::referredImages.
Referenced by Digikam::DImg::prepareMetadataToSave().
QList< HistoryImageId > & Digikam::DImageHistory::referredImages | ( | int | i | ) |
Access referred images
const QList< HistoryImageId > & Digikam::DImageHistory::referredImages | ( | int | i | ) | const |
QList< HistoryImageId > Digikam::DImageHistory::referredImagesOfType | ( | HistoryImageId::Type | type | ) | const |
References Digikam::DImageHistory::Entry::referredImages.
void Digikam::DImageHistory::removeLast | ( | ) |
Removes the last entry from the history.
int Digikam::DImageHistory::size | ( | ) | const |
Returns the number of entries.
Referenced by fromXml(), operator<(), operator>(), Digikam::EditorCore::Private::saveNext(), Digikam::DImg::setHistoryBranchAfter(), and Digikam::DImg::setHistoryBranchForLastSteps().
QString Digikam::DImageHistory::toXml | ( | ) | const |
Serialize toand from XML.
Note: The "Current" entry is skipped when writing to XML, so make sure the file into the metadata of which you write the XML, is the file marked as "Current" in this history.
References Digikam::DImageHistory::Entry::action, Digikam::FilterAction::category(), Digikam::FilterAction::ComplexFilter, Digikam::FilterAction::displayableName(), Digikam::FilterAction::DocumentedHistory, entries(), Digikam::FilterAction::ExplicitBranch, Digikam::FilterAction::flags(), Digikam::FilterAction::identifier(), Digikam::HistoryImageId::isCurrentFile(), Digikam::FilterAction::isNull(), Digikam::HistoryImageId::isOriginalFile(), Digikam::HistoryImageId::isSourceFile(), Digikam::HistoryImageId::isValid(), Digikam::HistoryImageId::m_creationDate, Digikam::HistoryImageId::m_fileName, Digikam::HistoryImageId::m_filePath, Digikam::HistoryImageId::m_fileSize, Digikam::HistoryImageId::m_uniqueHash, Digikam::HistoryImageId::m_uuid, Digikam::FilterAction::parameters(), Digikam::DImageHistory::Entry::referredImages, Digikam::FilterAction::ReproducibleFilter, and Digikam::FilterAction::version().
Referenced by Digikam::DImg::prepareMetadataToSave(), and Digikam::ItemInfo::setItemHistory().