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

A subclass of QMainWindow which implements the UI for the application. More...

Inheritance diagram for QtlMovieMainWindow:
QtlMovieMainWindowBase

Public Member Functions

 QtlMovieMainWindow (QWidget *parent=0, const QStringList &initialFileNames=QStringList(), bool logDebug=false)
 Constructor. More...
 
bool restartRequested () const
 Check if a restart of the application was requested by the user. More...
 
- Public Member Functions inherited from QtlMovieMainWindowBase
 QtlMovieMainWindowBase (QWidget *parent=0, bool logDebug=false)
 Constructor. More...
 
virtual ~QtlMovieMainWindowBase ()
 Destructor. More...
 
bool closePending () const
 Check if the application is about to close. More...
 
QtlLoggerlog () const
 Get the global logger of the application. More...
 
void playNotificationSound ()
 Start to play the notification sound. More...
 
void setIconTaskBarValue (int value, int maximum)
 Set the value of the task bar in the application's icon. More...
 
void setIconTaskBarVisible (bool visible)
 Set the task bar in the application's icon visible (or not). More...
 
QtlMovieSettingssettings () const
 Get the global settings of the application. More...
 

Private Slots

void cancelTranscoding ()
 Invoked by the "Cancel ..." buttons. More...
 
void deferredAbort ()
 Abort the transcoding, using a slot to defer the abort when back in the event loop. More...
 
void startDvdExtraction ()
 Invoked by the "DVD Extraction..." button. More...
 
void startTranscoding ()
 Invoked by the "Transcode ..." buttons. More...
 
void switchMode ()
 Invoked by the "Switch to {Single File|Batch} Mode" button. More...
 
void transcodingProgress (const QString &description, int current, int maximum, int elapsedSeconds, int remainingSeconds)
 Invoked when some progress is made in the transcoding process. More...
 
void transcodingStarted ()
 Invoked when transcoding starts. More...
 
void transcodingStopped (bool success)
 Invoked when transcoding stops. More...
 

Private Member Functions

virtual void applyUserInterfaceSettings (bool initial) Q_DECL_OVERRIDE
 Apply the settings which affect the UI. More...
 
virtual CancelStatus proposeToCancel () Q_DECL_OVERRIDE
 Check if an encoding is currently in progress and propose to abort it. More...
 
bool startNewJob (QtlMovieTask *task)
 Create and start a new job. More...
 
void transcodingUpdateUi (bool started)
 Update the UI when transcoding starts or stops. More...
 

Private Attributes

bool _batchMode
 The UI is currently in batch mode (ie not single file mode). More...
 
QtlMovieJob_job
 Current transcoding job. More...
 
bool _restartRequested
 A restart of the application is requested. More...
 
Ui::QtlMovieMainWindow _ui
 UI from Qt Designer. More...
 

Additional Inherited Members

- Public Slots inherited from QtlMovieMainWindowBase
void about ()
 Invoked by the "About" button. More...
 
void aboutMediaTools ()
 Invoked by the "About Media Tools" button. More...
 
void editSettings ()
 Invoked by the "Settings..." button. More...
 
void openHomePage ()
 Invoked by the "Home Page" button. More...
 
void openSupportPage ()
 Invoked by the "Support & Bug Report" button. More...
 
void searchNewVersion (bool silent=false)
 Invoked by the "Search New Version" button. More...
 
void showHelp ()
 Invoked by the "Help" button. More...
 
void showReleaseNotes ()
 Invoked by the "Release Notes" button. More...
 
- Protected Types inherited from QtlMovieMainWindowBase
enum  CancelStatus {
  NothingToCancel,
  CancelInProgress,
  CancelRefused
}
 The type of cancelation. More...
 
- Protected Member Functions inherited from QtlMovieMainWindowBase
virtual void closeEvent (QCloseEvent *event)
 Event handler to handle window close. More...
 
void setupUserInterface (QtlLogger *log, QAction *aboutQt)
 Finalize the setup of the user interface. More...
 

Detailed Description

A subclass of QMainWindow which implements the UI for the application.

The design of the UI is done using Qt Designer.

Constructor & Destructor Documentation

◆ QtlMovieMainWindow()

QtlMovieMainWindow::QtlMovieMainWindow ( QWidget *  parent = 0,
const QStringList &  initialFileNames = QStringList(),
bool  logDebug = false 
)
explicit

Constructor.

Parameters
[in]parentOptional parent widget.
[in]initialFileNamesOptional initial input files, typically from the command line.
[in]logDebugIf true, set initial log mode to debug.

Member Function Documentation

◆ restartRequested()

bool QtlMovieMainWindow::restartRequested ( ) const
inline

Check if a restart of the application was requested by the user.

Returns
True if the application shall be restarted.

◆ startTranscoding

void QtlMovieMainWindow::startTranscoding ( )
privateslot

Invoked by the "Transcode ..." buttons.

◆ cancelTranscoding

void QtlMovieMainWindow::cancelTranscoding ( )
privateslot

Invoked by the "Cancel ..." buttons.

◆ deferredAbort

void QtlMovieMainWindow::deferredAbort ( )
privateslot

Abort the transcoding, using a slot to defer the abort when back in the event loop.

◆ startDvdExtraction

void QtlMovieMainWindow::startDvdExtraction ( )
privateslot

Invoked by the "DVD Extraction..." button.

◆ switchMode

void QtlMovieMainWindow::switchMode ( )
privateslot

Invoked by the "Switch to {Single File|Batch} Mode" button.

◆ transcodingStarted

void QtlMovieMainWindow::transcodingStarted ( )
privateslot

Invoked when transcoding starts.

◆ transcodingStopped

void QtlMovieMainWindow::transcodingStopped ( bool  success)
privateslot

Invoked when transcoding stops.

Parameters
[in]successIndicates whether the transcoding succeeded or failed.

◆ transcodingProgress

void QtlMovieMainWindow::transcodingProgress ( const QString &  description,
int  current,
int  maximum,
int  elapsedSeconds,
int  remainingSeconds 
)
privateslot

Invoked when some progress is made in the transcoding process.

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

◆ proposeToCancel()

QtlMovieMainWindow::CancelStatus QtlMovieMainWindow::proposeToCancel ( )
privatevirtual

Check if an encoding is currently in progress and propose to abort it.

If the user accept to abort it, start the cancelation. The completion of the cancelation will be notified later by transcodingStopped().

Returns
Cancel status.

Implements QtlMovieMainWindowBase.

◆ applyUserInterfaceSettings()

void QtlMovieMainWindow::applyUserInterfaceSettings ( bool  initial)
privatevirtual

Apply the settings which affect the UI.

Parameters
[in]initialIf true, the object is being constructed.

Reimplemented from QtlMovieMainWindowBase.

◆ transcodingUpdateUi()

void QtlMovieMainWindow::transcodingUpdateUi ( bool  started)
private

Update the UI when transcoding starts or stops.

Parameters
[in]startedTrue if transcoding starts, false if transcoding stops.

◆ startNewJob()

bool QtlMovieMainWindow::startNewJob ( QtlMovieTask task)
private

Create and start a new job.

Parameters
[in]taskThe task to execute in the job.
Returns
True on success, false on error.

Member Data Documentation

◆ _ui

Ui::QtlMovieMainWindow QtlMovieMainWindow::_ui
private

UI from Qt Designer.

◆ _job

QtlMovieJob* QtlMovieMainWindow::_job
private

Current transcoding job.

◆ _batchMode

bool QtlMovieMainWindow::_batchMode
private

The UI is currently in batch mode (ie not single file mode).

◆ _restartRequested

bool QtlMovieMainWindow::_restartRequested
private

A restart of the application is requested.


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