A list of transcoding tasks. More...
Public Slots | |
void | addAndEditTask () |
Add a new task in the list and start editing it. More... | |
void | clear () |
Clear the table content. More... | |
void | deleteSelectedTasks () |
Delete the selected tasks (need to confirm first). More... | |
void | editSelectedTask () |
Start editing the first selected task. More... | |
void | moveDownSelectedTasks () |
Move the selected tasks down. More... | |
void | moveUpSelectedTasks () |
Move the selected tasks up. More... | |
void | removeCompletedTasks () |
Remove all completed tasks. More... | |
void | removeRow (int row) |
Remove a row from the table. More... | |
void | removeRows (int firstRow, int lastRow) |
Remove rows from the table. More... | |
void | requeueSelectedTasks () |
Requeue the selected tasks (if completed). More... | |
Public Member Functions | |
QtlMovieTaskList (QWidget *parent=0) | |
Constructor. More... | |
void | addTask (QtlMovieTask *task, bool editNow) |
Add a task at the end of the list. More... | |
QtlMovieTask * | addTask (const QString &inputFileName, bool editNow) |
Add a task at the end of the list. More... | |
QtlMovieTask * | currentTask () const |
Get the currently executing task. More... | |
bool | hasQueuedTasks () const |
Check if some queued tasks are present. More... | |
void | initialize (QtlMovieSettings *settings, QtlLogger *log) |
Initialize the task list. More... | |
QtlMovieTask * | nextTask () |
Get the first task in "queued" state. More... | |
Protected Member Functions | |
virtual void | dragEnterEvent (QDragEnterEvent *event) Q_DECL_OVERRIDE |
Invoked when a drag operation enters the widget. More... | |
virtual void | dragMoveEvent (QDragMoveEvent *event) Q_DECL_OVERRIDE |
Invoked when a drag operation is in progress and the cursor moves. More... | |
virtual void | dropEvent (QDropEvent *event) Q_DECL_OVERRIDE |
Invoked when a drop operation is performed. More... | |
Private Slots | |
void | taskChanged (QtlMovieTask *task) |
Triggered when the input file name, output file name or output type of a task changes. More... | |
void | taskStateChanged (QtlMovieTask *task) |
Triggered when the state of the task changes. More... | |
Private Member Functions | |
QtlMovieTaskList () Q_DECL_EQ_DELETE | |
void | editTask (QtlMovieTask *task) |
Edit a task. More... | |
int | rowOfTask (QtlMovieTask *task) const |
Get the row of a task. More... | |
QtlMovieTask * | taskOfRow (int row) const |
Get the task associated to a row. More... | |
void | updateRow (int row) |
Update the content of a row from the associated task content. More... | |
Static Private Member Functions | |
static void | setTask (QTableWidgetItem *item, QtlMovieTask *task) |
Associate a table item with a task. More... | |
Private Attributes | |
QtlMovieTask * | _currentTask |
Currently executing task. More... | |
QtlLogger * | _log |
Where to log errors. More... | |
QtlMovieSettings * | _settings |
Application settings. More... | |
A list of transcoding tasks.
This is both a widget for editing the tasks list and a reference model for the task list.
|
explicit |
Constructor.
[in] | parent | Optional parent object. |
|
private |
void QtlMovieTaskList::initialize | ( | QtlMovieSettings * | settings, |
QtlLogger * | log | ||
) |
Initialize the task list.
Must be invoked before using the task list. May be used only once.
[in] | settings | Application settings. |
[in] | log | Where to log errors. |
void QtlMovieTaskList::addTask | ( | QtlMovieTask * | task, |
bool | editNow | ||
) |
Add a task at the end of the list.
The QtlMovieTaskList intance takes ownership of the task object.
[in] | task | The task to add. |
[in] | editNow | If true, immediately opens an editor on it. |
QtlMovieTask * QtlMovieTaskList::addTask | ( | const QString & | inputFileName, |
bool | editNow | ||
) |
Add a task at the end of the list.
[in] | inputFileName | Input file name. All defaults apply. |
[in] | editNow | If true, immediately opens an editor on it. |
QtlMovieTask * QtlMovieTaskList::nextTask | ( | ) |
Get the first task in "queued" state.
The returned task becomes the "currently executing task".
bool QtlMovieTaskList::hasQueuedTasks | ( | ) | const |
Check if some queued tasks are present.
|
inline |
Get the currently executing task.
|
slot |
Clear the table content.
Reimplemented from QTableWidget.
|
slot |
Remove a row from the table.
Reimplemented from QTableWidget.
[in] | row | The row to remove. |
|
slot |
Remove rows from the table.
[in] | firstRow | The first row to remove. |
[in] | lastRow | The last row to remove. |
|
slot |
Remove all completed tasks.
|
slot |
Add a new task in the list and start editing it.
|
slot |
Start editing the first selected task.
|
slot |
Move the selected tasks up.
|
slot |
Move the selected tasks down.
|
slot |
Delete the selected tasks (need to confirm first).
|
slot |
Requeue the selected tasks (if completed).
|
privateslot |
Triggered when the input file name, output file name or output type of a task changes.
[in] | task | The changed task (ie. signal emitter). |
|
privateslot |
Triggered when the state of the task changes.
[in] | task | The changed task (ie. signal emitter). |
|
protectedvirtual |
Invoked when a drag operation enters the widget.
[in,out] | event | The notified event. |
|
protectedvirtual |
Invoked when a drag operation is in progress and the cursor moves.
[in,out] | event | The notified event. |
|
protectedvirtual |
Invoked when a drop operation is performed.
[in,out] | event | The notified event. |
|
staticprivate |
Associate a table item with a task.
[in,out] | item | The table item to set. |
[in] | task | The task. |
|
private |
Get the task associated to a row.
[in] | row | The row in the table. |
|
private |
Get the row of a task.
[in] | task | The task to seach. |
|
private |
Update the content of a row from the associated task content.
[in] | row | The row to update. |
|
private |
Edit a task.
[in,out] | task | The task to edit. |
|
private |
Application settings.
|
private |
Where to log errors.
|
private |
Currently executing task.