Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate Class Reference
Inheritance diagram for anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate:
[legend]
Collaboration diagram for anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate:
[legend]

Public Member Functions

bool IsCancelled () const override
 
bool IsStopped () const override
 
void SetStatusString (const TranslatableString &str) override
 
void OnProgress (double progress) override
 
void UpdateUI ()
 
- Public Member Functions inherited from ExportProcessorDelegate
virtual ~ExportProcessorDelegate ()
 
virtual bool IsCancelled () const =0
 
virtual bool IsStopped () const =0
 
virtual void SetStatusString (const TranslatableString &str)=0
 
virtual void OnProgress (double progress)=0
 

Private Attributes

std::atomic< bool > mCancelled {false}
 
std::atomic< bool > mStopped {false}
 
std::atomic< double > mProgress {}
 
TranslatableString mStatus
 
std::unique_ptr< BasicUI::ProgressDialogmProgressDialog
 

Detailed Description

Definition at line 21 of file ExportProgressUI.cpp.

Member Function Documentation

◆ IsCancelled()

bool anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::IsCancelled ( ) const
inlineoverridevirtual

Implements ExportProcessorDelegate.

Definition at line 32 of file ExportProgressUI.cpp.

◆ IsStopped()

bool anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::IsStopped ( ) const
inlineoverridevirtual

Implements ExportProcessorDelegate.

Definition at line 37 of file ExportProgressUI.cpp.

◆ OnProgress()

void anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::OnProgress ( double  progress)
inlineoverridevirtual

Implements ExportProcessorDelegate.

Definition at line 47 of file ExportProgressUI.cpp.

◆ SetStatusString()

void anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::SetStatusString ( const TranslatableString str)
inlineoverridevirtual

Implements ExportProcessorDelegate.

Definition at line 42 of file ExportProgressUI.cpp.

References str.

◆ UpdateUI()

void anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::UpdateUI ( )
inline

Definition at line 52 of file ExportProgressUI.cpp.

53 {
54 constexpr long long ProgressSteps = 1000ul;
55
58 else
59 mProgressDialog->SetMessage(mStatus);
60
61 const auto result = mProgressDialog->Poll(mProgress * ProgressSteps, ProgressSteps);
62
64 {
65 if(!mStopped)
66 mCancelled = true;
67 }
68 else if(result == BasicUI::ProgressResult::Stopped)
69 {
70 if(!mCancelled)
71 mStopped = true;
72 }
73 }
XO("Cut/Copy/Paste")
std::unique_ptr< ProgressDialog > MakeProgress(const TranslatableString &title, const TranslatableString &message, unsigned flags=(ProgressShowStop|ProgressShowCancel), const TranslatableString &remainingLabelText={})
Create and display a progress dialog.
Definition: BasicUI.h:294

References BasicUI::Cancelled, BasicUI::MakeProgress(), BasicUI::Stopped, and XO().

Here is the call graph for this function:

Member Data Documentation

◆ mCancelled

std::atomic<bool> anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::mCancelled {false}
private

Definition at line 23 of file ExportProgressUI.cpp.

◆ mProgress

std::atomic<double> anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::mProgress {}
private

Definition at line 25 of file ExportProgressUI.cpp.

◆ mProgressDialog

std::unique_ptr<BasicUI::ProgressDialog> anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::mProgressDialog
private

Definition at line 29 of file ExportProgressUI.cpp.

◆ mStatus

TranslatableString anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::mStatus
private

Definition at line 27 of file ExportProgressUI.cpp.

◆ mStopped

std::atomic<bool> anonymous_namespace{ExportProgressUI.cpp}::DialogExportProgressDelegate::mStopped {false}
private

Definition at line 24 of file ExportProgressUI.cpp.


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