Definition at line 1280 of file ProjectFileManager.cpp.
◆ ImportProgress()
anonymous_namespace{ProjectFileManager.cpp}::ImportProgress::ImportProgress |
( |
AudacityProject & |
project | ) |
|
|
inline |
◆ OnImportFileOpened()
bool anonymous_namespace{ProjectFileManager.cpp}::ImportProgress::OnImportFileOpened |
( |
ImportFileHandle & |
importFileHandle | ) |
|
|
inlineoverridevirtual |
Called by Importer when it attempts to import file using registered ImportPlugin instance Could be called more than once, but for each call there will be a complementary call to OnImportResult
- Parameters
-
importFileHandle | file handle created by ImportPlugin instance |
- Returns
- Implementation may return false to abort import process
Implements ImportProgressListener.
Definition at line 1292 of file ProjectFileManager.cpp.
1293 {
1295
1297 {
1299
1300 if (ImportDlg.ShowModal() == wxID_CANCEL)
1301 return false;
1302 }
1303
1304 else
1306 return true;
1307 }
virtual wxInt32 GetStreamCount()=0
virtual void SetStreamUsage(wxInt32 StreamID, bool Use)=0
ImportFileHandle * mImportFileHandle
References ImportFileHandle::GetStreamCount(), ImportFileHandle::SetStreamUsage(), and XO().
◆ OnImportProgress()
void anonymous_namespace{ProjectFileManager.cpp}::ImportProgress::OnImportProgress |
( |
double |
progress | ) |
|
|
inlineoverridevirtual |
Used to report on import progress [optional]
- Parameters
-
progress | import progress in range [0, 1] |
Implements ImportProgressListener.
Definition at line 1309 of file ProjectFileManager.cpp.
1310 {
1311 constexpr double ProgressSteps { 1000.0 };
1313 {
1317 }
1318 auto result =
mProgressDialog->Poll(progress * ProgressSteps, ProgressSteps);
1323 }
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
virtual TranslatableString GetFileDescription()=0
virtual FilePath GetFilename() const =0
std::unique_ptr< BasicUI::ProgressDialog > mProgressDialog
std::unique_ptr< ProgressDialog > MakeProgress(const TranslatableString &title, const TranslatableString &message, unsigned flags=(ProgressShowStop|ProgressShowCancel), const TranslatableString &remainingLabelText={})
Create and display a progress dialog.
References BasicUI::Cancelled, BasicUI::MakeProgress(), BasicUI::Stopped, title, Verbatim(), and XO().
◆ OnImportResult()
void anonymous_namespace{ProjectFileManager.cpp}::ImportProgress::OnImportResult |
( |
ImportResult |
result | ) |
|
|
inlineoverridevirtual |
Used to report on import result for file handle passed as argument to OnImportFileOpened.
Implements ImportProgressListener.
Definition at line 1325 of file ProjectFileManager.cpp.
1326 {
1329 {
1331 if(!message.empty())
1332 {
1335 }
1336 }
1337 }
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
virtual TranslatableString GetErrorMessage() const
References AudacityMessageBox(), GetProjectFrame(), and XO().
◆ mImportFileHandle
ImportFileHandle* anonymous_namespace{ProjectFileManager.cpp}::ImportProgress::mImportFileHandle {nullptr} |
|
private |
◆ mProgressDialog
std::unique_ptr<BasicUI::ProgressDialog> anonymous_namespace{ProjectFileManager.cpp}::ImportProgress::mProgressDialog |
|
private |
◆ mProject
wxWeakRef<AudacityProject> anonymous_namespace{ProjectFileManager.cpp}::ImportProgress::mProject |
|
private |
The documentation for this class was generated from the following file: