digiKam
Digikam::DImageHistory Class Reference

Classes

class  Entry
 

Public Member Functions

const FilterActionaction (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< FilterActionallActions () const
 Gets all actions which are not null. More...
 
QList< HistoryImageIdallReferredImages () 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
 
DImageHistoryoperator<< (const FilterAction &action)
 
DImageHistoryoperator<< (const HistoryImageId &imageId)
 
DImageHistoryoperator= (const DImageHistory &other)
 
bool operator== (const DImageHistory &other) const
 
bool operator> (const DImageHistory &other) const
 
Entryoperator[] (int i)
 
const Entryoperator[] (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< HistoryImageIdreferredImagesOfType (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)
 

Constructor & Destructor Documentation

◆ DImageHistory() [1/2]

Digikam::DImageHistory::DImageHistory ( )

◆ DImageHistory() [2/2]

Digikam::DImageHistory::DImageHistory ( const DImageHistory other)

◆ ~DImageHistory()

Digikam::DImageHistory::~DImageHistory ( )

Member Function Documentation

◆ action()

const FilterAction & Digikam::DImageHistory::action ( int  i) const

Referenced by fromXml(), and operator<<().

◆ actionCount()

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().

◆ adjustCurrentUuid()

void Digikam::DImageHistory::adjustCurrentUuid ( const QString &  uuid)

Changes the UUID of the current (last added current) referred image.

References Digikam::DImageHistory::Entry::referredImages.

◆ adjustReferredImages()

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().

◆ allActions()

QList< FilterAction > Digikam::DImageHistory::allActions ( ) const

Gets all actions which are not null.

References Digikam::DImageHistory::Entry::action, and Digikam::FilterAction::isNull().

◆ allReferredImages()

QList< HistoryImageId > Digikam::DImageHistory::allReferredImages ( ) const

◆ appendReferredImage()

void Digikam::DImageHistory::appendReferredImage ( const HistoryImageId id)

References insertReferredImage().

Referenced by operator<<().

◆ clearReferredImages()

void Digikam::DImageHistory::clearReferredImages ( )

Remove all referredImages, leaving the entries list untouched.

Edit referred images

Referenced by Digikam::EditorCore::slotImageLoaded(), and Digikam::EditorCore::switchToLastSaved().

◆ currentReferredImage()

◆ entries() [1/2]

◆ entries() [2/2]

const QList< DImageHistory::Entry > & Digikam::DImageHistory::entries ( ) const

◆ fromXml()

◆ hasActions()

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().

◆ hasCurrentReferredImage()

bool Digikam::DImageHistory::hasCurrentReferredImage ( ) const

◆ hasFilters()

bool Digikam::DImageHistory::hasFilters ( ) const
inline

◆ hasOriginalReferredImage()

bool Digikam::DImageHistory::hasOriginalReferredImage ( ) const

◆ hasReferredImageOfType()

bool Digikam::DImageHistory::hasReferredImageOfType ( HistoryImageId::Type  type) const

◆ hasReferredImages()

bool Digikam::DImageHistory::hasReferredImages ( ) const

◆ insertReferredImage()

void Digikam::DImageHistory::insertReferredImage ( int  entryIndex,
const HistoryImageId id 
)

References adjustReferredImages(), and isValid().

Referenced by appendReferredImage().

◆ isEmpty()

bool Digikam::DImageHistory::isEmpty ( ) const

A history is considered empty if there are no entries.

Referenced by Digikam::ItemHistoryGraphData::addHistory(), and Digikam::DImg::lastSavedFileOriginData().

◆ isNull()

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().

◆ isValid()

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().

◆ moveCurrentReferredImage()

void Digikam::DImageHistory::moveCurrentReferredImage ( const QString &  newPath,
const QString &  newFileName 
)

Change file path entries of the current referred image

References Digikam::DImageHistory::Entry::referredImages.

◆ operator!=()

bool Digikam::DImageHistory::operator!= ( const DImageHistory other) const
inline

References Digikam::operator==().

◆ operator<()

bool Digikam::DImageHistory::operator< ( const DImageHistory other) const

References size().

◆ operator<<() [1/2]

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().

◆ operator<<() [2/2]

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().

◆ operator=()

DImageHistory & Digikam::DImageHistory::operator= ( const DImageHistory other)

◆ operator==()

bool Digikam::DImageHistory::operator== ( const DImageHistory other) const

◆ operator>()

bool Digikam::DImageHistory::operator> ( const DImageHistory other) const

References size().

◆ operator[]() [1/2]

DImageHistory::Entry & Digikam::DImageHistory::operator[] ( int  i)

◆ operator[]() [2/2]

const DImageHistory::Entry & Digikam::DImageHistory::operator[] ( int  i) const

◆ originalReferredImage()

HistoryImageId Digikam::DImageHistory::originalReferredImage ( ) const

◆ purgePathFromReferredImages()

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().

◆ referredImages() [1/2]

QList< HistoryImageId > & Digikam::DImageHistory::referredImages ( int  i)

Access referred images

◆ referredImages() [2/2]

const QList< HistoryImageId > & Digikam::DImageHistory::referredImages ( int  i) const

◆ referredImagesOfType()

QList< HistoryImageId > Digikam::DImageHistory::referredImagesOfType ( HistoryImageId::Type  type) const

◆ removeLast()

void Digikam::DImageHistory::removeLast ( )

Removes the last entry from the history.

◆ size()

int Digikam::DImageHistory::size ( ) const

◆ toXml()


The documentation for this class was generated from the following files: