QtlMovie 1.12 (A specialized FFmpeg front-end)
QtlMovieAction Class Reference

A class which represents an action which starts, progresses and completes. More...

Inheritance diagram for QtlMovieAction:
QtlLogger QtlMovieCleanupSubtitles QtlMovieConvertSubStationAlpha QtlMovieDeleteAction QtlMovieDvdExtractionSession QtlMovieJob QtlMovieProcess QtlMovieTsDemux QtlMovieCcExtractorProcess QtlMovieClosedCaptionsSearch QtlMovieDvdAuthorProcess QtlMovieFFmpegProcess QtlMovieGrowisofsProcess QtlMovieMkisofsProcess QtlMovieTeletextExtract QtlMovieTeletextSearch

Signals

void completed (bool success)
 Emitted when the action completes. More...
 
void progress (const QString &description, int current, int maximum, int elapsedSeconds, int remainingSeconds)
 Emitted when some progress in the reporting is available. More...
 
void started ()
 Emitted when the action starts. More...
 

Public Member Functions

 QtlMovieAction (const QtlMovieSettings *settings, QtlLogger *log, QObject *parent=0)
 Constructor. More...
 
virtual ~QtlMovieAction ()
 Virtual destructor. More...
 
virtual void abort ()
 Abort action execution. More...
 
virtual void debug (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE
 Log a line of debug text. More...
 
QString description () const
 Get the description of the action. More...
 
int elapsedSeconds () const
 Get the number of seconds since the action started. More...
 
bool isCompleted () const
 Check if the action is completed. More...
 
bool isSilent () const
 Check if unimportant messages are skipped. More...
 
bool isStarted () const
 Check if the action was started (and possibly completed in the meantime). More...
 
virtual void line (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE
 Log a line of text. More...
 
void setDescription (const QString &description)
 Set the description of the action. More...
 
void setSilent (bool silent)
 Set if unimportant messages are skipped. More...
 
const QtlMovieSettingssettings () const
 Get the application settings. More...
 
virtual bool start ()
 Start the action. More...
 
virtual void text (const QString &text) Q_DECL_OVERRIDE
 Log text. More...
 

Protected Member Functions

virtual void emitCompleted (bool success, const QString &message=QString())
 Emit the completed() signal. More...
 
virtual void emitProgress (int current, int maximum, int remainingSeconds=-1)
 Emit the progress() signal. More...
 

Private Member Functions

 QtlMovieAction () Q_DECL_EQ_DELETE
 

Private Attributes

bool _completed
 completed() has been signaled. More...
 
QString _description
 Description of the operation. More...
 
QtlLogger_log
 Message logger. More...
 
const QtlMovieSettings_settings
 Application settings. More...
 
bool _silent
 Do not report unimportant messages. More...
 
bool _started
 start() was called. More...
 
QDateTime _startTime
 Start time. More...
 

Detailed Description

A class which represents an action which starts, progresses and completes.

Constructor & Destructor Documentation

◆ QtlMovieAction() [1/2]

QtlMovieAction::QtlMovieAction ( const QtlMovieSettings settings,
QtlLogger log,
QObject *  parent = 0 
)

Constructor.

Parameters
[in]settingsApplication settings.
[in]logMessage logger.
[in]parentOptional parent object.

◆ ~QtlMovieAction()

virtual QtlMovieAction::~QtlMovieAction ( )
inlinevirtual

Virtual destructor.

◆ QtlMovieAction() [2/2]

QtlMovieAction::QtlMovieAction ( )
private

Member Function Documentation

◆ settings()

const QtlMovieSettings* QtlMovieAction::settings ( ) const
inline

Get the application settings.

Returns
The application settings.

◆ description()

QString QtlMovieAction::description ( ) const
inline

Get the description of the action.

Returns
The description.

◆ setDescription()

void QtlMovieAction::setDescription ( const QString &  description)
inline

Set the description of the action.

Parameters
[in]descriptionThe description.

◆ start()

bool QtlMovieAction::start ( )
virtual

Start the action.

If the action was not yet started, emit started().

Returns
False if already started. True otherwise.

Reimplemented in QtlMovieDvdExtractionSession, QtlMovieProcess, QtlMovieDeleteAction, QtlMovieFFmpegProcess, QtlMovieCleanupSubtitles, QtlMovieConvertSubStationAlpha, QtlMovieTeletextExtract, QtlMovieTsDemux, QtlMovieDvdAuthorProcess, and QtlMovieJob.

◆ abort()

void QtlMovieAction::abort ( )
virtual

Abort action execution.

If the action was started, the signal completed() will be emitted when the action actually terminates.

Reimplemented in QtlMovieDvdExtractionSession, QtlMovieProcess, QtlMovieCleanupSubtitles, QtlMovieConvertSubStationAlpha, QtlMovieTsDemux, and QtlMovieJob.

◆ isStarted()

bool QtlMovieAction::isStarted ( ) const
inline

Check if the action was started (and possibly completed in the meantime).

Returns
True if the action was started.

◆ elapsedSeconds()

int QtlMovieAction::elapsedSeconds ( ) const
inline

Get the number of seconds since the action started.

Returns
The number of seconds since the action started.

◆ isCompleted()

bool QtlMovieAction::isCompleted ( ) const
inline

Check if the action is completed.

Returns
True if the action is completed.

◆ isSilent()

bool QtlMovieAction::isSilent ( ) const
inline

Check if unimportant messages are skipped.

Returns
True if unimportant messages are skipped.

◆ setSilent()

void QtlMovieAction::setSilent ( bool  silent)
inline

Set if unimportant messages are skipped.

Parameters
[in]silentIf true, unimportant messages are skipped.

◆ text()

void QtlMovieAction::text ( const QString &  text)
virtual

Log text.

Implementation of QtlLogger.

Parameters
[in]textText to log.

Implements QtlLogger.

◆ line()

void QtlMovieAction::line ( const QString &  line,
const QColor &  color = QColor() 
)
virtual

Log a line of text.

Implementation of QtlLogger.

Parameters
[in]lineLine to log. No need to contain a trailing new-line character.
[in]colorWhen a valid color is passed, try to display the text in this color.

Implements QtlLogger.

◆ debug()

void QtlMovieAction::debug ( const QString &  line,
const QColor &  color = QColor() 
)
virtual

Log a line of debug text.

Implementation of QtlLogger.

Parameters
[in]lineLine to log. No need to contain a trailing new-line character.
[in]colorWhen a valid color is passed, try to display the text in this color.

Implements QtlLogger.

◆ started

void QtlMovieAction::started ( )
signal

Emitted when the action starts.

◆ progress

void QtlMovieAction::progress ( const QString &  description,
int  current,
int  maximum,
int  elapsedSeconds,
int  remainingSeconds 
)
signal

Emitted when some progress in the reporting is available.

Parameters
[in]descriptionThe description of the current process in the action.
[in]currentCurrent value (whatever unit it means).
[in]maximumValue indicating full completion. If zero, we cannot evaluate the progress.
[in]elapsedSecondsElapsed seconds since the action started.
[in]remainingSecondsEstimated remaining seconds to process. Negative if the remaining time cannot be estimated.

◆ completed

void QtlMovieAction::completed ( bool  success)
signal

Emitted when the action completes.

Parameters
[in]successTrue when the action completed successfully, false otherwise.

◆ emitProgress()

void QtlMovieAction::emitProgress ( int  current,
int  maximum,
int  remainingSeconds = -1 
)
protectedvirtual

Emit the progress() signal.

Parameters
[in]currentCurrent value (whatever unit it means).
[in]maximumValue indicating full completion. If zero, we cannot evaluate the progress.
[in]remainingSecondsEstimated remaining seconds to process. If negative, the processing time is considered linear and the remaining time is computed from current and maximum.

◆ emitCompleted()

void QtlMovieAction::emitCompleted ( bool  success,
const QString &  message = QString() 
)
protectedvirtual

Emit the completed() signal.

Parameters
[in]successTrue when the action completed successfully, false otherwise.
[in]messageOptional error message to log.

Reimplemented in QtlMovieJob, QtlMovieTsDemux, QtlMovieCleanupSubtitles, QtlMovieConvertSubStationAlpha, QtlMovieFFmpegVolumeDetect, QtlMovieClosedCaptionsSearch, and QtlMovieTeletextExtract.

Member Data Documentation

◆ _settings

const QtlMovieSettings* QtlMovieAction::_settings
private

Application settings.

◆ _log

QtlLogger* QtlMovieAction::_log
private

Message logger.

◆ _description

QString QtlMovieAction::_description
private

Description of the operation.

◆ _startTime

QDateTime QtlMovieAction::_startTime
private

Start time.

◆ _started

bool QtlMovieAction::_started
private

start() was called.

◆ _completed

bool QtlMovieAction::_completed
private

completed() has been signaled.

◆ _silent

bool QtlMovieAction::_silent
private

Do not report unimportant messages.


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