Audacity 3.2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TimerRecordExportDialog Class Referencefinal

#include <TimerRecordExportDialog.h>

Inheritance diagram for TimerRecordExportDialog:
[legend]
Collaboration diagram for TimerRecordExportDialog:
[legend]

Public Member Functions

 TimerRecordExportDialog (AudacityProject &project, wxWindow *parent=nullptr, wxWindowID=wxID_ANY)
 
void Bind (wxFileName &filename, wxString &format, int &sampleRate, int &channels, ExportProcessor::Parameters &paramters)
 
- Public Member Functions inherited from wxDialogWrapper
 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 ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Types

enum  { ExportFilePanelID = wxID_HIGHEST , EditMetadataID }
 

Private Member Functions

void PopulateOrExchange (ShuttleGui &S)
 
void OnOK (wxCommandEvent &)
 
void OnEditMetadata (wxCommandEvent &)
 
void OnFormatChanged (wxCommandEvent &)
 

Private Attributes

AudacityProjectmProject
 
wxButton * mEditMetadata {}
 
ExportFilePanelmExportFilePanel {nullptr}
 
wxFileName * mFileName {}
 
wxString * mFormat {}
 
int * mSampleRate {}
 
int * mChannels {}
 
ExportProcessor::ParametersmParameters {}
 

Detailed Description

Definition at line 10 of file TimerRecordExportDialog.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
ExportFilePanelID 
EditMetadataID 

Definition at line 12 of file TimerRecordExportDialog.h.

Constructor & Destructor Documentation

◆ TimerRecordExportDialog()

TimerRecordExportDialog::TimerRecordExportDialog ( AudacityProject project,
wxWindow *  parent = nullptr,
wxWindowID  winid = wxID_ANY 
)

Definition at line 16 of file TimerRecordExportDialog.cpp.

19 : wxDialogWrapper(parent, winid, XO("Export Audio"))
21{
22 SetMinSize({450, -1});
25}
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
const auto project
#define S(N)
Definition: ToChars.cpp:64
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
void PopulateOrExchange(ShuttleGui &S)

References eIsCreating, and S.

Member Function Documentation

◆ Bind()

void TimerRecordExportDialog::Bind ( wxFileName &  filename,
wxString &  format,
int &  sampleRate,
int &  channels,
ExportProcessor::Parameters paramters 
)

Definition at line 27 of file TimerRecordExportDialog.cpp.

32{
33 mFileName = &filename;
34 mFormat = &format;
36 mChannels = &channels;
37 mParameters = &parameters;
38 mExportFilePanel->Init(filename, sampleRate, format, channels, parameters);
39}
void Init(const wxFileName &filename, int sampleRate, const wxString &format=wxEmptyString, int channels=0, const ExportProcessor::Parameters &parameters={}, const MixerOptions::Downmix *mixerSpec=nullptr)
Initializes panel with export settings provided as arguments. Call is required.
ExportFilePanel * mExportFilePanel
ExportProcessor::Parameters * mParameters

References anonymous_namespace{ExportPCM.cpp}::format, ExportFilePanel::Init(), mChannels, mExportFilePanel, mFileName, mFormat, mParameters, mSampleRate, and anonymous_namespace{ClipSegmentTest.cpp}::sampleRate.

Referenced by TimerRecordDialog::OnAutoExportPathButton_Click().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnEditMetadata()

void TimerRecordExportDialog::OnEditMetadata ( wxCommandEvent &  )
private

Definition at line 79 of file TimerRecordExportDialog.cpp.

80{
82 XO("Edit Metadata Tags"),
83 XO("Exported Tags"));
84}
static AUDACITY_DLL_API bool EditProjectMetadata(AudacityProject &project, const TranslatableString &title, const TranslatableString &shortUndoDescription)

References TagsEditorDialog::EditProjectMetadata(), mProject, and XO().

Here is the call graph for this function:

◆ OnFormatChanged()

void TimerRecordExportDialog::OnFormatChanged ( wxCommandEvent &  )
private

Definition at line 86 of file TimerRecordExportDialog.cpp.

87{
88 Fit();
89 Layout();
90
91 auto enableMeta = false;
92 if(auto plugin = mExportFilePanel->GetPlugin())
93 enableMeta = plugin->GetFormatInfo(mExportFilePanel->GetFormat()).canMetaData;
94 mEditMetadata->Enable(enableMeta);
95}
const ExportPlugin * GetPlugin() const
int GetFormat() const

References ExportFilePanel::GetFormat(), ExportFilePanel::GetPlugin(), mEditMetadata, and mExportFilePanel.

Here is the call graph for this function:

◆ OnOK()

void TimerRecordExportDialog::OnOK ( wxCommandEvent &  event)
private

Definition at line 64 of file TimerRecordExportDialog.cpp.

65{
66 if(const auto parameters = mExportFilePanel->GetParameters())
67 *mParameters = std::move(*parameters);
68 else
69 return;
70
75
76 event.Skip();
77}
int GetSampleRate() const
wxString GetPath() const
wxString GetFullName()
int GetChannels() const
std::optional< ExportProcessor::Parameters > GetParameters() const
virtual FormatInfo GetFormatInfo(int index) const =0
Returns FormatInfo structure for given index if it's valid, or a default one. FormatInfo::format isn'...
wxString format
Definition: ExportPlugin.h:35

References FormatInfo::format, ExportFilePanel::GetChannels(), ExportFilePanel::GetFormat(), ExportPlugin::GetFormatInfo(), ExportFilePanel::GetFullName(), ExportFilePanel::GetParameters(), ExportFilePanel::GetPath(), ExportFilePanel::GetPlugin(), ExportFilePanel::GetSampleRate(), mChannels, mExportFilePanel, mFileName, mFormat, mParameters, and mSampleRate.

Here is the call graph for this function:

◆ PopulateOrExchange()

void TimerRecordExportDialog::PopulateOrExchange ( ShuttleGui S)
private

Definition at line 41 of file TimerRecordExportDialog.cpp.

42{
43 S.SetBorder(5);
44 S.StartVerticalLay();
45 {
46 if(S.GetMode() == eIsCreating)
47 {
49 S.AddWindow(mExportFilePanel, wxEXPAND);
50 }
51
52 S.StartHorizontalLay(wxEXPAND);
53 {
54 mEditMetadata = S.Id(EditMetadataID).AddButton(XO("Edit &Metadata..."), wxLEFT | wxBOTTOM);
55 S.AddSpace(1, 1, wxEXPAND);
56 S.Id(wxID_CANCEL).AddButton(XO("&Cancel"), wxBOTTOM);
57 S.Id(wxID_OK).AddButton(XO("O&K"), wxRIGHT | wxBOTTOM, true);
58 }
59 S.EndHorizontalLay();
60 }
61 S.EndVerticalLay();
62}
#define safenew
Definition: MemoryX.h:10

References EditMetadataID, eIsCreating, ExportFilePanelID, mEditMetadata, mExportFilePanel, mProject, S, safenew, and XO().

Here is the call graph for this function:

Member Data Documentation

◆ mChannels

int* TimerRecordExportDialog::mChannels {}
private

Definition at line 43 of file TimerRecordExportDialog.h.

Referenced by Bind(), and OnOK().

◆ mEditMetadata

wxButton* TimerRecordExportDialog::mEditMetadata {}
private

Definition at line 37 of file TimerRecordExportDialog.h.

Referenced by OnFormatChanged(), and PopulateOrExchange().

◆ mExportFilePanel

ExportFilePanel* TimerRecordExportDialog::mExportFilePanel {nullptr}
private

Definition at line 38 of file TimerRecordExportDialog.h.

Referenced by Bind(), OnFormatChanged(), OnOK(), and PopulateOrExchange().

◆ mFileName

wxFileName* TimerRecordExportDialog::mFileName {}
private

Definition at line 40 of file TimerRecordExportDialog.h.

Referenced by Bind(), and OnOK().

◆ mFormat

wxString* TimerRecordExportDialog::mFormat {}
private

Definition at line 41 of file TimerRecordExportDialog.h.

Referenced by Bind(), and OnOK().

◆ mParameters

ExportProcessor::Parameters* TimerRecordExportDialog::mParameters {}
private

Definition at line 44 of file TimerRecordExportDialog.h.

Referenced by Bind(), and OnOK().

◆ mProject

AudacityProject& TimerRecordExportDialog::mProject
private

Definition at line 35 of file TimerRecordExportDialog.h.

Referenced by OnEditMetadata(), and PopulateOrExchange().

◆ mSampleRate

int* TimerRecordExportDialog::mSampleRate {}
private

Definition at line 42 of file TimerRecordExportDialog.h.

Referenced by Bind(), and OnOK().


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