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 64 of file ExportFilePanel.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
CustomSampleRateID 

Definition at line 66 of file ExportFilePanel.cpp.

Constructor & Destructor Documentation

◆ CustomSampleRateDialog()

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

Definition at line 70 of file ExportFilePanel.cpp.

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

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 89 of file ExportFilePanel.cpp.

90 {
91 return mSampleRate;
92 }

◆ OnSampleRateChange()

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

Definition at line 96 of file ExportFilePanel.cpp.

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

Member Data Documentation

◆ mSampleRate

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

Definition at line 103 of file ExportFilePanel.cpp.


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