digiKam
Digikam::ExifToolProcess Class Reference
+ Inheritance diagram for Digikam::ExifToolProcess:

Classes

class  Private
 

Public Types

enum  Action {
  LOAD_METADATA = 0 , LOAD_CHUNKS , APPLY_CHANGES , APPLY_CHANGES_EXV ,
  READ_FORMATS , WRITE_FORMATS , TRANSLATIONS_LIST , TAGS_DATABASE ,
  VERSION_STRING , COPY_TAGS , TRANS_TAGS , NO_ACTION
}
 
enum  CopyTagsSource {
  COPY_EXIF = 0x01 , COPY_MAKERNOTES = 0x02 , COPY_IPTC = 0x04 , COPY_XMP = 0x08 ,
  COPY_ICC = 0x10 , COPY_ALL = 0x20 , COPY_NONE = 0x40
}
 
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 signalCmdCompleted (int cmdAction, int execTime, const QByteArray &cmdOutputChannel, const QByteArray &cmdErrorChannel)
 
void signalErrorOccurred (int cmdAction, QProcess::ProcessError error)
 
void signalFinished (int cmdAction, int exitCode, QProcess::ExitStatus exitStatus)
 
void signalStarted (int cmdAction)
 
void signalStateChanged (int cmdAction, QProcess::ProcessState newState)
 

Public Member Functions

bool checkExifToolProgram ()
 
int command (const QByteArrayList &args, Action ac)
 
QProcess::ProcessError error () const
 
QString errorString () const
 
 ExifToolProcess (QObject *const parent)
 
int exitCode () const
 
QProcess::ExitStatus exitStatus () const
 
bool isBusy () const
 
bool isRunning () const
 
void kill ()
 
qint64 processId () const
 
QString program () const
 
void setProgram (const QString &etExePath, const QString &perlExePath=QString())
 
bool start ()
 
QProcess::ProcessState state () const
 
void terminate ()
 
bool waitForFinished (int msecs=30000) const
 
bool waitForStarted (int msecs=30000) const
 
 ~ExifToolProcess ()
 

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.

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.

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

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 ( QObject *const  parent)
explicit

◆ ~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.

References terminate().

Member Function Documentation

◆ checkExifToolProgram()

◆ command()

◆ error()

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

Returns the type of error that occurred last.

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

Referenced by Digikam::ExifToolProcess::Private::setProcessErrorAndEmit().

◆ errorString()

QString Digikam::ExifToolProcess::errorString ( ) const

◆ exitCode()

int Digikam::ExifToolProcess::exitCode ( ) const

◆ exitStatus()

QProcess::ExitStatus Digikam::ExifToolProcess::exitStatus ( ) const

Returns the exit status of the last process that finished.

References Digikam::ExifToolProcess::Private::process.

◆ isBusy()

bool Digikam::ExifToolProcess::isBusy ( ) const

Returns true if a command is running

References Digikam::ExifToolProcess::Private::cmdRunning.

◆ isRunning()

bool Digikam::ExifToolProcess::isRunning ( ) const

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

References Digikam::ExifToolProcess::Private::process.

◆ kill()

void Digikam::ExifToolProcess::kill ( )

Kills the current process, causing it to exit immediately. On Windows, kill() uses TerminateProcess, and on Unix and macOS, the SIGKILL signal is sent to the process.

References Digikam::ExifToolProcess::Private::process.

Referenced by terminate().

◆ processId()

qint64 Digikam::ExifToolProcess::processId ( ) const

Returns the native process identifier for the running process, if available. If no process is currently running, 0 is returned.

References Digikam::ExifToolProcess::Private::process.

◆ program()

QString Digikam::ExifToolProcess::program ( ) const

◆ setProgram()

void Digikam::ExifToolProcess::setProgram ( const QString &  etExePath,
const QString &  perlExePath = QString() 
)

◆ signalCmdCompleted

void Digikam::ExifToolProcess::signalCmdCompleted ( int  cmdAction,
int  execTime,
const QByteArray &  cmdOutputChannel,
const QByteArray &  cmdErrorChannel 
)
signal

◆ signalErrorOccurred

void Digikam::ExifToolProcess::signalErrorOccurred ( int  cmdAction,
QProcess::ProcessError  error 
)
signal

◆ signalFinished

void Digikam::ExifToolProcess::signalFinished ( int  cmdAction,
int  exitCode,
QProcess::ExitStatus  exitStatus 
)
signal

◆ signalStarted

void Digikam::ExifToolProcess::signalStarted ( int  cmdAction)
signal

◆ signalStateChanged

void Digikam::ExifToolProcess::signalStateChanged ( int  cmdAction,
QProcess::ProcessState  newState 
)
signal

◆ start()

◆ state()

QProcess::ProcessState Digikam::ExifToolProcess::state ( ) const

Returns the current state of the process.

References Digikam::ExifToolProcess::Private::process.

◆ terminate()

void Digikam::ExifToolProcess::terminate ( )

◆ waitForFinished()

bool Digikam::ExifToolProcess::waitForFinished ( int  msecs = 30000) const

Blocks until the process has finished and the finished() signal has been emitted, or until msecs milliseconds have passed.

References Digikam::ExifToolProcess::Private::process.

◆ waitForStarted()

bool Digikam::ExifToolProcess::waitForStarted ( int  msecs = 30000) const

Blocks until the process has started and the started() signal has been emitted, or until msecs milliseconds have passed.

References Digikam::ExifToolProcess::Private::process.


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