A class which represents an action which starts, progresses and completes. More...
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 QtlMovieSettings * | settings () 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... | |
A class which represents an action which starts, progresses and completes.
| QtlMovieAction::QtlMovieAction | ( | const QtlMovieSettings * | settings, |
| QtlLogger * | log, | ||
| QObject * | parent = 0 |
||
| ) |
Constructor.
| [in] | settings | Application settings. |
| [in] | log | Message logger. |
| [in] | parent | Optional parent object. |
|
inlinevirtual |
Virtual destructor.
|
private |
|
inline |
Get the application settings.
|
inline |
Get the description of the action.
|
inline |
Set the description of the action.
| [in] | description | The description. |
|
virtual |
Start the action.
If the action was not yet started, emit started().
Reimplemented in QtlMovieDvdExtractionSession, QtlMovieProcess, QtlMovieDeleteAction, QtlMovieFFmpegProcess, QtlMovieCleanupSubtitles, QtlMovieConvertSubStationAlpha, QtlMovieTeletextExtract, QtlMovieTsDemux, QtlMovieDvdAuthorProcess, and QtlMovieJob.
|
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.
|
inline |
Check if the action was started (and possibly completed in the meantime).
|
inline |
Get the number of seconds since the action started.
|
inline |
Check if the action is completed.
|
inline |
Check if unimportant messages are skipped.
|
inline |
Set if unimportant messages are skipped.
| [in] | silent | If true, unimportant messages are skipped. |
|
virtual |
|
virtual |
|
virtual |
|
signal |
Emitted when the action starts.
|
signal |
Emitted when some progress in the reporting is available.
| [in] | description | The description of the current process in the action. |
| [in] | current | Current value (whatever unit it means). |
| [in] | maximum | Value indicating full completion. If zero, we cannot evaluate the progress. |
| [in] | elapsedSeconds | Elapsed seconds since the action started. |
| [in] | remainingSeconds | Estimated remaining seconds to process. Negative if the remaining time cannot be estimated. |
|
signal |
Emitted when the action completes.
| [in] | success | True when the action completed successfully, false otherwise. |
|
protectedvirtual |
Emit the progress() signal.
| [in] | current | Current value (whatever unit it means). |
| [in] | maximum | Value indicating full completion. If zero, we cannot evaluate the progress. |
| [in] | remainingSeconds | Estimated remaining seconds to process. If negative, the processing time is considered linear and the remaining time is computed from current and maximum. |
|
protectedvirtual |
Emit the completed() signal.
| [in] | success | True when the action completed successfully, false otherwise. |
| [in] | message | Optional error message to log. |
Reimplemented in QtlMovieJob, QtlMovieTsDemux, QtlMovieCleanupSubtitles, QtlMovieConvertSubStationAlpha, QtlMovieFFmpegVolumeDetect, QtlMovieClosedCaptionsSearch, and QtlMovieTeletextExtract.
|
private |
Application settings.
|
private |
Message logger.
|
private |
Description of the operation.
|
private |
Start time.
|
private |
start() was called.
|
private |
completed() has been signaled.
|
private |
Do not report unimportant messages.