digiKam
Loading...
Searching...
No Matches
Digikam::ExifToolProcess Class Reference

#include <exiftoolprocess.h>

+ Inheritance diagram for Digikam::ExifToolProcess:

Classes

class  Private
 
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
}
 
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
}
 
enum  ResultStatus { COMMAND_RESULT = 0 , FINISH_RESULT , ERROR_RESULT }
 
enum  TranslateTagsOps { TRANS_ALL_XMP = 0x01 , TRANS_ALL_IPTC = 0x02 , TRANS_ALL_EXIF = 0x04 }
 
enum  WritingTagsMode { WRITE_EXISTING_TAGS = 0x01 , CREATE_NEW_TAGS = 0x02 , CREATE_NEW_GROUPS = 0x04 , ALL_MODES }
 

Signals

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

Public Member Functions

int command (const QByteArrayList &args, Action ac)
 
bool exifToolAvailable () const
 
QProcess::ProcessError exifToolError () const
 
QString exifToolErrorString () const
 
bool exifToolIsBusy () const
 
 ExifToolProcess ()
 
QString getExifToolProgram () const
 
ExifToolProcess::Result getExifToolResult (int cmdId) const
 
void initExifTool ()
 
void setExifToolProgram (const QString &etExePath)
 
void shutDownExifTool ()
 
ExifToolProcess::Result waitForExifToolResult (int cmdId) const
 
 ~ExifToolProcess ()
 

Static Public Member Functions

static ExifToolProcessinstance ()
 Q_GLOBAL_STATIC implementation.
 
static bool isCreated ()
 

Member Enumeration Documentation

◆ Action

ExifTool actions to process.

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

Possible copying tags operations to OR combine with COPY_TAGS action.

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.

◆ ResultStatus

Command result state.

Enumerator
COMMAND_RESULT 
FINISH_RESULT 
ERROR_RESULT 

◆ TranslateTagsOps

Possible translating tags operations to OR combine with COPY_TAGS action.

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

Possible writing tags mode to OR combine with COPY_TAGS action.

Enumerator
WRITE_EXISTING_TAGS 

Overwrite existing tags.

CREATE_NEW_TAGS 

Create new tags.

CREATE_NEW_GROUPS 

Create new groups if necessary.

ALL_MODES 

Constructor & Destructor Documentation

◆ ExifToolProcess()

Digikam::ExifToolProcess::ExifToolProcess ( )

◆ ~ExifToolProcess()

Digikam::ExifToolProcess::~ExifToolProcess ( )

Destructs the ExifToolProcess object, i.e., killing the process. 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 
)

◆ exifToolAvailable()

bool Digikam::ExifToolProcess::exifToolAvailable ( ) const

Returns true if ExifToolProcess is available (process state == Running)

Referenced by Digikam::ExifToolParser::exifToolAvailable().

◆ exifToolError()

QProcess::ProcessError Digikam::ExifToolProcess::exifToolError ( ) const

Returns the type of error that occurred last.

References Digikam::ExifToolProcess::Private::processError.

◆ exifToolErrorString()

QString Digikam::ExifToolProcess::exifToolErrorString ( ) const

◆ exifToolIsBusy()

bool Digikam::ExifToolProcess::exifToolIsBusy ( ) const

Returns true if a command is running.

References Digikam::ExifToolProcess::Private::cmdNumber.

◆ getExifToolProgram()

QString Digikam::ExifToolProcess::getExifToolProgram ( ) const

◆ getExifToolResult()

ExifToolProcess::Result Digikam::ExifToolProcess::getExifToolResult ( int  cmdId) const

◆ initExifTool()

void Digikam::ExifToolProcess::initExifTool ( )

Setup connections, apply Settings and start ExifTool process. This function cannot be called from another thread.

References Digikam::MetaEngineSettings::instance(), signalChangeProgram(), signalExecNextCmd(), and Digikam::ExifToolProcess::Private::slotExecNextCmd().

Referenced by Digikam::ExifToolThread::run().

◆ instance()

ExifToolProcess * Digikam::ExifToolProcess::instance ( )
static

Q_GLOBAL_STATIC implementation.

Referenced by Digikam::ExifToolParser::ExifToolParser(), and Digikam::ExifToolThread::run().

◆ isCreated()

bool Digikam::ExifToolProcess::isCreated ( )
static

◆ setExifToolProgram()

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

Change the ExifTool path configuration. This function can be called from another thread.

References signalChangeProgram().

Referenced by Digikam::ExifToolParser::setExifToolProgram().

◆ shutDownExifTool()

void Digikam::ExifToolProcess::shutDownExifTool ( )

Attempts to shut down the ExifTool process. This function cannot be called from another thread.

References Digikam::ExifToolProcess::Private::cmdQueue, and Digikam::ExifToolProcess::Private::writeChannelIsClosed.

Referenced by Digikam::ExifToolThread::run().

◆ signalChangeProgram

void Digikam::ExifToolProcess::signalChangeProgram ( const QString &  etExePath)
signal

Referenced by initExifTool(), and setExifToolProgram().

◆ signalExecNextCmd

void Digikam::ExifToolProcess::signalExecNextCmd ( )
signal

Referenced by command(), and initExifTool().

◆ signalExifToolResult

void Digikam::ExifToolProcess::signalExifToolResult ( int  cmdId)
signal

◆ waitForExifToolResult()


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