digiKam Developer Documentation: Digikam::ExifToolProcess Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Classes | Public Types | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
Digikam::ExifToolProcess Class Reference
Inheritance diagram for Digikam::ExifToolProcess:

## Classes
class | Result

## Public Types
enum | Action { LOAD_METADATA = 0 , LOAD_CHUNKS , APPLY_CHANGES , APPLY_CHANGES_EXV , APPLY_METADATA_FILE , CHANGE_TIMESTAMPS , READ_FORMATS , WRITE_FORMATS , TRANSLATIONS_LIST , TAGS_DATABASE , VERSION_STRING , COPY_TAGS , TRANS_TAGS , NO_ACTION }
| ExifTool actions to process. More...
enum | CopyTagsSource { COPY_EXIF = 0x01 , COPY_MAKERNOTES = 0x02 , RESTORE_PREVIEW = 0x04 , COPY_IPTC = 0x08 , COPY_XMP = 0x10 , COPY_ICC = 0x20 , COPY_ALL = 0x40 , COPY_NONE = 0x80 }
| Possible copying tags operations to OR combine with COPY_TAGS action. More...
enum | ResultStatus { COMMAND_RESULT = 0 , FINISH_RESULT , ERROR_RESULT }
| Command result state.
enum | TranslateTagsOps { TRANS_ALL_XMP = 0x01 , TRANS_ALL_IPTC = 0x02 , TRANS_ALL_EXIF = 0x04 }
| Possible translating tags operations to OR combine with COPY_TAGS action. More...
enum | WritingTagsMode { WRITE_EXISTING_TAGS = 0x01 , CREATE_NEW_TAGS = 0x02 , CREATE_NEW_GROUPS = 0x04 , ALL_MODES }
| Possible writing tags mode to OR combine with COPY_TAGS action. More...

## Signals
void | signalChangeProgram (const QString &etExePath)
void | signalExecNextCmd ()
void | signalExifToolResult (int cmdId)

## Public Member Functions
| ExifToolProcess ()
| Constructs a ExifToolProcess.
| ~ExifToolProcess ()
| Destructs the ExifToolProcess object, i.e., killing the process.
int | command (const QByteArrayList &args, Action ac)
| Send a command to exiftool process.
bool | exifToolAvailable () const
| Returns true if ExifToolProcess is available (process state == Running)
QProcess::ProcessError | exifToolError () const
| Returns the type of error that occurred last.
QString | exifToolErrorString () const
| Returns an error message.
bool | exifToolIsBusy () const
| Returns true if a command is running.
QString | getExifToolProgram () const
ExifToolProcess::Result | getExifToolResult (int cmdId) const
| Returns the ExifToolProcess result.
void | initExifTool ()
| Setup connections, apply Settings and start ExifTool process.
void | setExifToolProgram (const QString &etExePath)
| Change the ExifTool path configuration.
void | shutDownExifTool ()
| Attempts to shut down the ExifTool process.
ExifToolProcess::Result | waitForExifToolResult (int cmdId) const
| WatCondition for the ExifToolParser class.

## Static Public Member Functions
static ExifToolProcess * | instance ()
static bool | isCreated ()

## Static Public Attributes
static QPointer< ExifToolProcess > | internalPtr = QPointer<ExifToolProcess>()
| internalPtr - singleton implementation

## Member Enumeration Documentation

## ◆ Action

enum Digikam::ExifToolProcess::Action

Enumerator
LOAD_METADATA | Load all metadata from a file with ExifTool.
LOAD_CHUNKS | Load Exif, Iptc, and Xmp chunks from a file as byte-array for MetaEngine.
APPLY_CHANGES | Apply tag changes in a file with ExifTool.
APPLY_CHANGES_EXV | Apply tag changes in a file with ExifTool using an EXV container.
APPLY_METADATA_FILE | Apply a metadata file to a file with ExifTool.
CHANGE_TIMESTAMPS | Change all timestamps in a file with ExifTool.
READ_FORMATS | Return the list of readable ExifTool file formats.
WRITE_FORMATS | Return the list of writable ExifTool file formats.
TRANSLATIONS_LIST | List of ExifTool languages available for translations.
TAGS_DATABASE | List of ExifTool tags from database.
VERSION_STRING | Return the ExifTool version as string.
COPY_TAGS | Copy tags from one file to another one. See CopyTagsSource enum for details.
TRANS_TAGS | Translate tags in file. See TranslateTagsOps enum for details.
NO_ACTION | Last value from this list. Do nothing.

## ◆ CopyTagsSource

enum Digikam::ExifToolProcess::CopyTagsSource

Enumerator
COPY_EXIF | Copy all Exif Tags from source file.
COPY_MAKERNOTES | Copy all Makernotes tags from source file.
RESTORE_PREVIEW | Restore preview image from source file.
COPY_IPTC | Copy all Iptc tags from source file.
COPY_XMP | Copy all Xmp tags from source file.
COPY_ICC | Copy ICC profile from source file.
COPY_ALL | Copy all tags from source file.
COPY_NONE | No copy operation.

## ◆ TranslateTagsOps

enum Digikam::ExifToolProcess::TranslateTagsOps

Enumerator
TRANS_ALL_XMP | Translate all existing Tags from source file to Xmp.
TRANS_ALL_IPTC | Translate all existing Tags from source file to Iptc.
TRANS_ALL_EXIF | Translate all existing Tags from source file to Exif.

## ◆ WritingTagsMode

enum Digikam::ExifToolProcess::WritingTagsMode

Enumerator
WRITE_EXISTING_TAGS | Overwrite existing tags.
CREATE_NEW_TAGS | Create new tags.
CREATE_NEW_GROUPS | Create new groups if necessary.

## Constructor & Destructor Documentation

## ◆ ~ExifToolProcess()

Digikam::ExifToolProcess::~ExifToolProcess | ( |  | ) |

Note that this function will not return until the process is terminated.

## Member Function Documentation

## ◆ command()

int Digikam::ExifToolProcess::command | ( | const QByteArrayList & | args,
|  | Action | ac
| ) |  |

This function can be called from another thread. Return 0: ExitTool not running, write channel is closed or args is empty.

## ◆ initExifTool()

void Digikam::ExifToolProcess::initExifTool | ( |  | ) |

This function cannot be called from another thread.

## ◆ setExifToolProgram()

void Digikam::ExifToolProcess::setExifToolProgram | ( | const QString & | etExePath | ) |

This function can be called from another thread.

## ◆ shutDownExifTool()

void Digikam::ExifToolProcess::shutDownExifTool | ( |  | ) |

This function cannot be called from another thread.

## ◆ waitForExifToolResult()

ExifToolProcess::Result Digikam::ExifToolProcess::waitForExifToolResult | ( | int | cmdId | ) | const

Returns the ExifToolProcess result.