Audacity  3.0.3
Public Member Functions | Private Member Functions | List of all members
SoundActivatedRecordDialog Class Referencefinal

Configures sound activated recording. More...

#include <SoundActivatedRecord.h>

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

Public Member Functions

 SoundActivatedRecordDialog (wxWindow *parent)
 
 ~SoundActivatedRecordDialog ()
 
- 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 Member Functions

void OnOK (wxCommandEvent &event)
 
void PopulateOrExchange (ShuttleGui &S)
 

Detailed Description

Configures sound activated recording.

Definition at line 23 of file SoundActivatedRecord.h.

Constructor & Destructor Documentation

◆ SoundActivatedRecordDialog()

SoundActivatedRecordDialog::SoundActivatedRecordDialog ( wxWindow *  parent)

Definition at line 32 of file SoundActivatedRecord.cpp.

33 : wxDialogWrapper(parent, -1, XO("Sound Activated Record"), wxDefaultPosition,
34  wxDefaultSize, wxCAPTION )
35 // wxDefaultSize, wxCAPTION | wxTHICK_FRAME)
36 {
37  SetName();
40  Fit();
41  Center();
42 }

References eIsCreatingFromPrefs.

◆ ~SoundActivatedRecordDialog()

SoundActivatedRecordDialog::~SoundActivatedRecordDialog ( )

Definition at line 44 of file SoundActivatedRecord.cpp.

45 {
46 }

Member Function Documentation

◆ OnOK()

void SoundActivatedRecordDialog::OnOK ( wxCommandEvent &  event)
private

Definition at line 67 of file SoundActivatedRecord.cpp.

68 {
69  ShuttleGui S( this, eIsSavingToPrefs );
70  PopulateOrExchange( S );
71 
72  gPrefs->Flush();
73 
74  EndModal(0);
75 }

References eIsSavingToPrefs, FileConfig::Flush(), gPrefs, and PopulateOrExchange().

Here is the call graph for this function:

◆ PopulateOrExchange()

void SoundActivatedRecordDialog::PopulateOrExchange ( ShuttleGui S)
private

Definition at line 48 of file SoundActivatedRecord.cpp.

49 {
50  S.SetBorder(5);
51 
52  S.StartVerticalLay();
53  {
54  S.StartMultiColumn(2, wxEXPAND);
55  S.SetStretchyCol(1);
56  S.TieSlider(
57  XXO("Activation level (dB):"),
58  {wxT("/AudioIO/SilenceLevel"), -50},
60  )->SetMinSize(wxSize(300, wxDefaultCoord));
61  S.EndMultiColumn();
62  }
63  S.EndVerticalLay();
65 }

References ShuttleGui::AddStandardButtons(), DecibelScaleCutoff, ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndVerticalLay(), Setting< T >::Read(), ShuttleGuiBase::SetBorder(), ShuttleGuiBase::SetStretchyCol(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartVerticalLay(), ShuttleGuiBase::TieSlider(), and XXO.

Referenced by OnOK().

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

The documentation for this class was generated from the following files:
ShuttleGuiBase::StartVerticalLay
void StartVerticalLay(int iProp=1)
Definition: ShuttleGui.cpp:1184
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:70
ShuttleGuiBase::TieSlider
wxSlider * TieSlider(const TranslatableString &Prompt, int &pos, const int max, const int min=0)
Definition: ShuttleGui.cpp:1687
XO
#define XO(s)
Definition: Internat.h:31
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
SoundActivatedRecordDialog::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S)
Definition: SoundActivatedRecord.cpp:48
Setting::Read
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined *‍/
Definition: Prefs.h:128
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
ShuttleGuiBase::EndVerticalLay
void EndVerticalLay()
Definition: ShuttleGui.cpp:1203
DecibelScaleCutoff
IntSetting DecibelScaleCutoff
Negation of this value is the lowest dB level that should be shown in dB scales.
Definition: Decibels.cpp:12
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:48
FileConfig::Flush
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
wxDialogWrapper::wxDialogWrapper
wxDialogWrapper()
Definition: wxPanelWrapper.h:84
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2444
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
wxDialogWrapper::SetName
void SetName()
Definition: wxPanelWrapper.cpp:81
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
ShuttleGuiBase::SetStretchyCol
void SetStretchyCol(int i)
Used to modify an already placed FlexGridSizer to make a column stretchy.
Definition: ShuttleGui.cpp:202
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631