![]() |
Audacity 3.2.0
|
ProgressDialog Class. More...
#include <ProgressDialog.h>
Public Types | |
using | MessageColumn = std::vector< TranslatableString > |
using | MessageTable = std::vector< MessageColumn > |
Public Member Functions | |
ProgressDialog () | |
Methods for ProgressDialog. More... | |
ProgressDialog (const TranslatableString &title, const TranslatableString &message={}, int flags=pdlgDefaultFlags, const TranslatableString &sRemainingLabelText={}) | |
virtual | ~ProgressDialog () |
bool | Create (const TranslatableString &title, const TranslatableString &message={}, int flags=pdlgDefaultFlags, const TranslatableString &sRemainingLabelText={}) |
void | Reinit () |
ProgressResult | Update (int value, const TranslatableString &message={}) |
ProgressResult | Update (double current, const TranslatableString &message={}) |
ProgressResult | Update (double current, double total, const TranslatableString &message={}) |
ProgressResult | Update (wxULongLong_t current, wxULongLong_t total, const TranslatableString &message={}) |
ProgressResult | Update (wxLongLong current, wxLongLong total, const TranslatableString &message={}) |
ProgressResult | Update (wxLongLong_t current, wxLongLong_t total, const TranslatableString &message={}) |
ProgressResult | Update (int current, int total, const TranslatableString &message={}) |
void | SetMessage (const TranslatableString &message) |
![]() | |
wxDialogWrapper () | |
wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog")) | |
bool | Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog")) |
void | SetTitle (const TranslatableString &title) |
void | SetLabel (const TranslatableString &title) |
void | SetName (const TranslatableString &title) |
void | SetName () |
![]() | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Protected Member Functions | |
ProgressDialog (const TranslatableString &title, const MessageTable &columns, int flags=pdlgDefaultFlags, const TranslatableString &sRemainingLabelText={}) | |
bool | Create (const TranslatableString &title, const MessageTable &columns, int flags=pdlgDefaultFlags, const TranslatableString &sRemainingLabelText={}) |
Protected Attributes | |
wxWindowRef | mHadFocus |
wxStaticText * | mElapsed |
wxStaticText * | mRemaining |
wxGauge * | mGauge |
wxLongLong_t | mStartTime |
wxLongLong_t | mLastUpdate |
wxLongLong_t | mYieldTimer |
int | mLastValue |
bool | mCancel |
bool | mStop |
bool | mIsTransparent |
bool | m_bShowElapsedTime = true |
bool | m_bConfirmAction = false |
Private Member Functions | |
void | Init () |
bool | SearchForWindow (const wxWindowList &list, const wxWindow *searchfor) const |
void | OnCancel (wxCommandEvent &e) |
void | OnStop (wxCommandEvent &e) |
void | OnCloseWindow (wxCloseEvent &e) |
void | Beep () const |
bool | ConfirmAction (const TranslatableString &sPrompt, const TranslatableString &sTitle, int iButtonID=-1) |
void | AddMessageAsColumn (wxBoxSizer *pSizer, const MessageColumn &column, bool bFirstColumn) |
Private Attributes | |
wxEventLoopGuarantor | mLoop |
std::unique_ptr< wxWindowDisabler > | mDisable |
wxStaticText * | mMessage {} |
int | mLastW { 0 } |
int | mLastH { 0 } |
ProgressDialog Class.
Custom progress dialog with Audacity specific semantics.
Definition at line 50 of file ProgressDialog.h.
using ProgressDialog::MessageColumn = std::vector< TranslatableString > |
Definition at line 61 of file ProgressDialog.h.
using ProgressDialog::MessageTable = std::vector< MessageColumn > |
Definition at line 62 of file ProgressDialog.h.
ProgressDialog::ProgressDialog | ( | ) |
Methods for ProgressDialog.
Definition at line 996 of file ProgressDialog.cpp.
ProgressDialog::ProgressDialog | ( | const TranslatableString & | title, |
const TranslatableString & | message = {} , |
||
int | flags = pdlgDefaultFlags , |
||
const TranslatableString & | sRemainingLabelText = {} |
||
) |
Definition at line 1001 of file ProgressDialog.cpp.
References Create(), and title.
|
protected |
Definition at line 1010 of file ProgressDialog.cpp.
References Create(), and title.
|
virtual |
Definition at line 1022 of file ProgressDialog.cpp.
References Beep(), mDisable, mHadFocus, and SearchForWindow().
|
private |
Definition at line 1102 of file ProgressDialog.cpp.
References mMessage, safenew, and anonymous_namespace{LogWindow.cpp}::sText.
Referenced by Create().
|
private |
Definition at line 1603 of file ProgressDialog.cpp.
References beep, TranslatableString::empty(), gPrefs, mStartTime, and name.
Referenced by ~ProgressDialog().
|
private |
Definition at line 1636 of file ProgressDialog.cpp.
References m_bConfirmAction.
Referenced by OnCancel(), OnCloseWindow(), and OnStop().
|
protected |
Definition at line 1153 of file ProgressDialog.cpp.
References _, AddMessageAsColumn(), wxDialogWrapper::Create(), Init(), m_bConfirmAction, m_bShowElapsedTime, mDisable, mElapsed, mGauge, mHadFocus, mRemaining, pdlgConfirmStopCancel, pdlgHideCancelButton, pdlgHideElapsedTime, pdlgHideStopButton, Reinit(), safenew, wxDialogWrapper::SetName(), title, and XO.
bool ProgressDialog::Create | ( | const TranslatableString & | title, |
const TranslatableString & | message = {} , |
||
int | flags = pdlgDefaultFlags , |
||
const TranslatableString & | sRemainingLabelText = {} |
||
) |
Definition at line 1134 of file ProgressDialog.cpp.
References Create(), mLastH, mLastW, title, and TranslatableString::Translation().
Referenced by Create(), and ProgressDialog().
|
private |
Definition at line 1052 of file ProgressDialog.cpp.
References mHadFocus.
Referenced by Create().
|
private |
Definition at line 1571 of file ProgressDialog.cpp.
References ConfirmAction(), mCancel, and XO.
|
private |
Definition at line 1594 of file ProgressDialog.cpp.
References ConfirmAction(), mCancel, and XO.
|
private |
Definition at line 1582 of file ProgressDialog.cpp.
References ConfirmAction(), mCancel, mStop, and XO.
void ProgressDialog::Reinit | ( | ) |
Definition at line 1073 of file ProgressDialog.cpp.
References mCancel, mIsTransparent, mLastUpdate, mLastValue, mStartTime, mStop, and mYieldTimer.
Referenced by Create().
|
private |
Definition at line 1558 of file ProgressDialog.cpp.
References SearchForWindow().
Referenced by SearchForWindow(), and ~ProgressDialog().
void ProgressDialog::SetMessage | ( | const TranslatableString & | message | ) |
Definition at line 1510 of file ProgressDialog.cpp.
References TranslatableString::empty(), mLastH, mLastW, mMessage, and TranslatableString::Translation().
Referenced by anonymous_namespace{wxWidgetsBasicUI.cpp}::MyProgressDialog::SetMessage(), and Update().
ProgressResult ProgressDialog::Update | ( | double | current, |
const TranslatableString & | message = {} |
||
) |
Definition at line 1421 of file ProgressDialog.cpp.
References Update().
ProgressResult ProgressDialog::Update | ( | double | current, |
double | total, | ||
const TranslatableString & | message = {} |
||
) |
Definition at line 1494 of file ProgressDialog.cpp.
References Update().
ProgressResult ProgressDialog::Update | ( | int | current, |
int | total, | ||
const TranslatableString & | message = {} |
||
) |
Definition at line 1478 of file ProgressDialog.cpp.
References Update().
ProgressResult ProgressDialog::Update | ( | int | value, |
const TranslatableString & | message = {} |
||
) |
Definition at line 1327 of file ProgressDialog.cpp.
References RefreshCode::Cancelled, m_bShowElapsedTime, mCancel, mElapsed, mGauge, mIsTransparent, mLastUpdate, mLastValue, mRemaining, mStartTime, mStop, mYieldTimer, SetMessage(), and BasicUI::Success.
Referenced by ProjectFileIO::CopyTo(), ImportRaw(), TransportUtilities::PlayCurrentRegionAndWait(), TransportUtilities::PlayPlayRegionAndWait(), TransportUtilities::RecordAndWait(), RemoveDependencies(), and Update().
ProgressResult ProgressDialog::Update | ( | wxLongLong | current, |
wxLongLong | total, | ||
const TranslatableString & | message = {} |
||
) |
Definition at line 1446 of file ProgressDialog.cpp.
References Update().
ProgressResult ProgressDialog::Update | ( | wxLongLong_t | current, |
wxLongLong_t | total, | ||
const TranslatableString & | message = {} |
||
) |
Definition at line 1462 of file ProgressDialog.cpp.
References Update().
ProgressResult ProgressDialog::Update | ( | wxULongLong_t | current, |
wxULongLong_t | total, | ||
const TranslatableString & | message = {} |
||
) |
Definition at line 1430 of file ProgressDialog.cpp.
References Update().
|
protected |
Definition at line 121 of file ProgressDialog.h.
Referenced by ConfirmAction(), and Create().
|
protected |
Definition at line 120 of file ProgressDialog.h.
Referenced by Create(), Update(), and TimerProgressDialog::UpdateProgress().
|
protected |
Definition at line 114 of file ProgressDialog.h.
Referenced by OnCancel(), OnCloseWindow(), OnStop(), Reinit(), Update(), and TimerProgressDialog::UpdateProgress().
|
private |
Definition at line 142 of file ProgressDialog.h.
Referenced by Create(), and ~ProgressDialog().
|
protected |
Definition at line 105 of file ProgressDialog.h.
Referenced by Create(), Update(), and TimerProgressDialog::UpdateProgress().
|
protected |
Definition at line 107 of file ProgressDialog.h.
Referenced by Create(), Update(), and TimerProgressDialog::UpdateProgress().
|
protected |
Definition at line 103 of file ProgressDialog.h.
Referenced by Create(), Init(), and ~ProgressDialog().
|
protected |
Definition at line 117 of file ProgressDialog.h.
Referenced by Reinit(), Update(), and TimerProgressDialog::UpdateProgress().
|
private |
Definition at line 146 of file ProgressDialog.h.
Referenced by Create(), and SetMessage().
|
protected |
Definition at line 110 of file ProgressDialog.h.
Referenced by Reinit(), Update(), and TimerProgressDialog::UpdateProgress().
|
protected |
Definition at line 112 of file ProgressDialog.h.
Referenced by Reinit(), Update(), and TimerProgressDialog::UpdateProgress().
|
private |
Definition at line 145 of file ProgressDialog.h.
Referenced by Create(), and SetMessage().
|
private |
Definition at line 140 of file ProgressDialog.h.
|
private |
Definition at line 144 of file ProgressDialog.h.
Referenced by AddMessageAsColumn(), and SetMessage().
|
protected |
Definition at line 106 of file ProgressDialog.h.
Referenced by Create(), Update(), and TimerProgressDialog::UpdateProgress().
|
protected |
Definition at line 109 of file ProgressDialog.h.
Referenced by Beep(), Reinit(), Update(), and TimerProgressDialog::UpdateProgress().
|
protected |
Definition at line 115 of file ProgressDialog.h.
Referenced by OnStop(), Reinit(), Update(), and TimerProgressDialog::UpdateProgress().
|
protected |
Definition at line 111 of file ProgressDialog.h.