QtlMovie 1.12 (A specialized FFmpeg front-end)
QtlMovieMainWindowBase Class Referenceabstract

A subclass of QMainWindow, used as intermediate base for the main UI's in the application. More...

Inheritance diagram for QtlMovieMainWindowBase:
QtlMovieDvdExtractionWindow QtlMovieMainWindow

Public Slots

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

Public Member Functions

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

Protected Types

enum  CancelStatus {
  NothingToCancel,
  CancelInProgress,
  CancelRefused
}
 The type of cancelation. More...
 

Protected Member Functions

virtual void applyUserInterfaceSettings (bool initial)
 Apply the settings which affect the UI. More...
 
virtual void closeEvent (QCloseEvent *event)
 Event handler to handle window close. More...
 
virtual CancelStatus proposeToCancel ()=0
 Check if some work is currently in progress and propose to abort it. More...
 
void setupUserInterface (QtlLogger *log, QAction *aboutQt)
 Finalize the setup of the user interface. More...
 

Private Attributes

bool _closePending
 Close the application as soon as possible. More...
 
QtlStdoutLogger _defaultLog
 Default logger, until set by application. More...
 
QtlMovieHelp _help
 To display help. More...
 
QtlLogger_log
 Application logger, typically a text window. More...
 
QtlMovieSettings_settings
 Global settings. More...
 
QSoundEffect _sound
 Sound player for notification. More...
 

Detailed Description

A subclass of QMainWindow, used as intermediate base for the main UI's in the application.

Member Enumeration Documentation

◆ CancelStatus

The type of cancelation.

Enumerator
NothingToCancel 

Nothing in progress, nothing to cancel.

CancelInProgress 

Cancel accepted and in progress.

CancelRefused 

Something in progress, refuse to cancel it.

Constructor & Destructor Documentation

◆ QtlMovieMainWindowBase()

QtlMovieMainWindowBase::QtlMovieMainWindowBase ( QWidget *  parent = 0,
bool  logDebug = false 
)
explicit

Constructor.

Parameters
[in]parentOptional parent widget.
[in]logDebugIf true, set initial log mode to debug.

◆ ~QtlMovieMainWindowBase()

QtlMovieMainWindowBase::~QtlMovieMainWindowBase ( )
virtual

Destructor.

Member Function Documentation

◆ log()

QtlLogger* QtlMovieMainWindowBase::log ( ) const
inline

Get the global logger of the application.

Returns
The logger, never null.

◆ closePending()

bool QtlMovieMainWindowBase::closePending ( ) const
inline

Check if the application is about to close.

Typically, this is after a close action on the window, the subclass started to abort the processing and we are waiting for the abort processing to complete.

Returns
True if the application is about to close.

◆ settings()

QtlMovieSettings* QtlMovieMainWindowBase::settings ( ) const
inline

Get the global settings of the application.

Returns
The global settings of the application. Return a null pointer before the subclass calls setupUserInterface().

◆ playNotificationSound()

void QtlMovieMainWindowBase::playNotificationSound ( )

Start to play the notification sound.

◆ setIconTaskBarVisible()

void QtlMovieMainWindowBase::setIconTaskBarVisible ( bool  visible)

Set the task bar in the application's icon visible (or not).

Parameters
[in]visibleWhether or not set task bar should be visible.

◆ setIconTaskBarValue()

void QtlMovieMainWindowBase::setIconTaskBarValue ( int  value,
int  maximum 
)

Set the value of the task bar in the application's icon.

Parameters
[in]valueThe value to set, between zero and maximum.
[in]maximumMaximum value.

◆ editSettings

void QtlMovieMainWindowBase::editSettings ( )
slot

Invoked by the "Settings..." button.

◆ aboutMediaTools

void QtlMovieMainWindowBase::aboutMediaTools ( )
slot

Invoked by the "About Media Tools" button.

◆ about

void QtlMovieMainWindowBase::about ( )
slot

Invoked by the "About" button.

◆ showHelp

void QtlMovieMainWindowBase::showHelp ( )
slot

Invoked by the "Help" button.

◆ showReleaseNotes

void QtlMovieMainWindowBase::showReleaseNotes ( )
slot

Invoked by the "Release Notes" button.

◆ searchNewVersion

void QtlMovieMainWindowBase::searchNewVersion ( bool  silent = false)
slot

Invoked by the "Search New Version" button.

Parameters
[in]silentDo not report errors or no new version.

◆ openHomePage

void QtlMovieMainWindowBase::openHomePage ( )
slot

Invoked by the "Home Page" button.

◆ openSupportPage

void QtlMovieMainWindowBase::openSupportPage ( )
slot

Invoked by the "Support & Bug Report" button.

◆ setupUserInterface()

void QtlMovieMainWindowBase::setupUserInterface ( QtlLogger log,
QAction *  aboutQt 
)
protected

Finalize the setup of the user interface.

Should be called by the constructor of a subclass after the UI is created.

Parameters
[in]logOptional log window in the subclass application.
[in]aboutQtOptional menu action "About Qt" in the application.

◆ applyUserInterfaceSettings()

virtual void QtlMovieMainWindowBase::applyUserInterfaceSettings ( bool  initial)
inlineprotectedvirtual

Apply the settings which affect the UI.

Invoked when the settings are loaded or changed. Should be reimplemented by subclasses.

Parameters
[in]initialIf true, the object is being constructed. If false, this is typically following the edition of settings.

Reimplemented in QtlMovieDvdExtractionWindow, and QtlMovieMainWindow.

◆ proposeToCancel()

virtual CancelStatus QtlMovieMainWindowBase::proposeToCancel ( )
protectedpure virtual

Check if some work is currently in progress and propose to abort it.

Must be reimplemented by subclasses.

Returns
Cancel status.

Implemented in QtlMovieDvdExtractionWindow, and QtlMovieMainWindow.

◆ closeEvent()

void QtlMovieMainWindowBase::closeEvent ( QCloseEvent *  event)
protectedvirtual

Event handler to handle window close.

Parameters
eventNotified event.

Reimplemented in QtlMovieDvdExtractionWindow.

Member Data Documentation

◆ _settings

QtlMovieSettings* QtlMovieMainWindowBase::_settings
private

Global settings.

◆ _defaultLog

QtlStdoutLogger QtlMovieMainWindowBase::_defaultLog
private

Default logger, until set by application.

◆ _log

QtlLogger* QtlMovieMainWindowBase::_log
private

Application logger, typically a text window.

◆ _sound

QSoundEffect QtlMovieMainWindowBase::_sound
private

Sound player for notification.

◆ _help

QtlMovieHelp QtlMovieMainWindowBase::_help
private

To display help.

◆ _closePending

bool QtlMovieMainWindowBase::_closePending
private

Close the application as soon as possible.


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