Audacity 3.2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
anonymous_namespace{ExportFilePanel.cpp}::CustomSampleRateDialog Class Referencefinal
Inheritance diagram for anonymous_namespace{ExportFilePanel.cpp}::CustomSampleRateDialog:
[legend]
Collaboration diagram for anonymous_namespace{ExportFilePanel.cpp}::CustomSampleRateDialog:
[legend]

Public Member Functions

 CustomSampleRateDialog (wxWindow *parent, int defaultSampleRate=44100)
 
int GetSampleRate () const noexcept
 
- 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  { CustomSampleRateID = wxID_HIGHEST }
 

Private Member Functions

void OnSampleRateChange (wxCommandEvent &event)
 
 DECLARE_EVENT_TABLE ()
 

Private Attributes

int mSampleRate
 

Detailed Description

Definition at line 65 of file ExportFilePanel.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
CustomSampleRateID 

Definition at line 67 of file ExportFilePanel.cpp.

Constructor & Destructor Documentation

◆ CustomSampleRateDialog()

anonymous_namespace{ExportFilePanel.cpp}::CustomSampleRateDialog::CustomSampleRateDialog ( wxWindow *  parent,
int  defaultSampleRate = 44100 
)
inline

Definition at line 71 of file ExportFilePanel.cpp.

72 : wxDialogWrapper(parent, wxID_ANY, XO("Custom Sample Rate"), wxDefaultPosition, {-1, 160})
73 , mSampleRate(defaultSampleRate)
74 {
76 S.SetBorder(5);
77 S.StartHorizontalLay(wxEXPAND);
78 {
79 S.StartMultiColumn(2, wxALIGN_CENTER_VERTICAL);
80 {
81 S.Id(CustomSampleRateID).AddNumericTextBox(XO("New sample rate (Hz):"), wxString::Format("%d", mSampleRate), 0);
82 }
83 S.EndMultiColumn();
84 }
85 S.EndHorizontalLay();
86
87 S.AddStandardButtons();
88 }
XO("Cut/Copy/Paste")
@ eIsCreating
Definition: ShuttleGui.h:37
#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

Member Function Documentation

◆ DECLARE_EVENT_TABLE()

anonymous_namespace{ExportFilePanel.cpp}::CustomSampleRateDialog::DECLARE_EVENT_TABLE ( )
private

◆ GetSampleRate()

int anonymous_namespace{ExportFilePanel.cpp}::CustomSampleRateDialog::GetSampleRate ( ) const
inlinenoexcept

Definition at line 90 of file ExportFilePanel.cpp.

91 {
92 return mSampleRate;
93 }

◆ OnSampleRateChange()

void anonymous_namespace{ExportFilePanel.cpp}::CustomSampleRateDialog::OnSampleRateChange ( wxCommandEvent &  event)
inlineprivate

Definition at line 97 of file ExportFilePanel.cpp.

98 {
99 long rate;
100 if(event.GetString().ToLong(&rate))
101 mSampleRate = static_cast<int>(rate);
102 }

Member Data Documentation

◆ mSampleRate

int anonymous_namespace{ExportFilePanel.cpp}::CustomSampleRateDialog::mSampleRate
private

Definition at line 104 of file ExportFilePanel.cpp.


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