Audacity 3.2.0
|
A PrefsPanel for spectrum settings. More...
#include <SpectrumPrefs.h>
Public Member Functions | |
SpectrumPrefs (wxWindow *parent, wxWindowID winid, AudacityProject *pProject, WaveChannel *wc) | |
virtual | ~SpectrumPrefs () |
ComponentInterfaceSymbol | GetSymbol () const override |
TranslatableString | GetDescription () const override |
void | Preview () override |
bool | Commit () override |
void | PopulateOrExchange (ShuttleGui &S) override |
void | Rollback () |
bool | ShowsPreviewButton () override |
bool | Validate () override |
ManualPageID | HelpPageName () override |
If not empty string, the Help button is added below the panel. More... | |
Public Member Functions inherited from PrefsPanel | |
PrefsPanel (wxWindow *parent, wxWindowID winid, const TranslatableString &title) | |
virtual | ~PrefsPanel () |
virtual void | Preview () |
virtual bool | Commit ()=0 |
virtual PluginPath | GetPath () const override |
virtual VendorSymbol | GetVendor () const override |
virtual wxString | GetVersion () const override |
virtual bool | ShowsPreviewButton () |
virtual void | PopulateOrExchange (ShuttleGui &WXUNUSED(S)) |
virtual ManualPageID | HelpPageName () |
If not empty string, the Help button is added below the panel. More... | |
virtual void | Cancel () |
Public Member Functions inherited from wxPanelWrapper | |
wxPanelWrapper () | |
wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) | |
bool | Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) |
void | SetLabel (const TranslatableString &label) |
void | SetName (const TranslatableString &name) |
void | SetToolTip (const TranslatableString &toolTip) |
void | SetName () |
Public Member Functions inherited from wxTabTraversalWrapper< wxPanel > | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Private Member Functions | |
void | Populate (size_t windowSize) |
void | PopulatePaddingChoices (size_t windowSize) |
void | OnControl (wxCommandEvent &event) |
void | OnWindowSize (wxCommandEvent &event) |
void | OnDefaults (wxCommandEvent &) |
void | OnAlgorithm (wxCommandEvent &) |
void | EnableDisableSTFTOnlyControls () |
Private Attributes | |
AudacityProject * | mProject {} |
WaveChannel *const | mWc |
bool | mDefaulted |
bool | mOrigDefaulted |
wxTextCtrl * | mMinFreq |
wxTextCtrl * | mMaxFreq |
wxTextCtrl * | mGain |
wxTextCtrl * | mRange |
wxTextCtrl * | mFrequencyGain |
int | mZeroPaddingChoice |
wxChoice * | mZeroPaddingChoiceCtrl |
TranslatableStrings | mZeroPaddingChoices |
TranslatableStrings | mTypeChoices |
wxChoice * | mAlgorithmChoice |
wxCheckBox * | mDefaultsCheckbox |
SpectrogramSettings | mTempSettings |
SpectrogramSettings | mOrigSettings |
std::vector< WaveChannelSubViewPlacement > | mOrigPlacements |
float | mOrigMin |
float | mOrigMax |
bool | mPopulating |
bool | mCommitted {} |
Additional Inherited Members | |
Public Types inherited from PrefsPanel | |
using | Factories = std::vector< PrefsPanel::PrefsNode > |
using | Factory = std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) > |
Static Public Member Functions inherited from PrefsPanel | |
static Factories & | DefaultFactories () |
A PrefsPanel for spectrum settings.
Definition at line 41 of file SpectrumPrefs.h.
SpectrumPrefs::SpectrumPrefs | ( | wxWindow * | parent, |
wxWindowID | winid, | ||
AudacityProject * | pProject, | ||
WaveChannel * | wc | ||
) |
Definition at line 37 of file SpectrumPrefs.cpp.
References SpectrogramSettings::ConvertToEnumeratedWindowSizes(), SpectrogramSettings::defaults(), SpectrogramSettings::Get(), WaveChannelView::Get(), SpectrogramBounds::Get(), SpectrogramBounds::GetBounds(), SpectrogramSettings::maxFreq, mDefaulted, SpectrogramSettings::minFreq, mOrigDefaulted, mOrigMax, mOrigMin, mOrigPlacements, mOrigSettings, mTempSettings, mWc, Populate(), WaveChannelView::SavePlacements(), settings(), and SpectrogramSettings::WindowSize().
|
virtual |
Definition at line 63 of file SpectrumPrefs.cpp.
References mCommitted, and Rollback().
|
overridevirtual |
Implements PrefsPanel.
Definition at line 481 of file SpectrumPrefs.cpp.
References SpectrogramSettings::defaults(), SpectrogramSettings::Globals::Get(), SpectrogramSettings::LoadPrefs(), mCommitted, mDefaulted, mWc, SpectrogramSettings::Globals::SavePrefs(), SpectrogramSettings::SavePrefs(), and Validate().
|
private |
Definition at line 546 of file SpectrumPrefs.cpp.
References SpectrogramSettings::algPitchEAC, mAlgorithmChoice, mFrequencyGain, mGain, mRange, and mZeroPaddingChoiceCtrl.
Referenced by OnAlgorithm(), and PopulateOrExchange().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 74 of file SpectrumPrefs.cpp.
References XO().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 69 of file SpectrumPrefs.cpp.
References SPECTRUM_PREFS_PLUGIN_SYMBOL.
|
overridevirtual |
If not empty string, the Help button is added below the panel.
Default returns empty string.
Reimplemented from PrefsPanel.
Definition at line 79 of file SpectrumPrefs.cpp.
References mWc.
|
private |
Definition at line 540 of file SpectrumPrefs.cpp.
References EnableDisableSTFTOnlyControls(), and OnControl().
|
private |
Definition at line 502 of file SpectrumPrefs.cpp.
References mDefaulted, mDefaultsCheckbox, and mPopulating.
Referenced by OnAlgorithm(), and OnWindowSize().
|
private |
Definition at line 529 of file SpectrumPrefs.cpp.
References SpectrogramSettings::ConvertToEnumeratedWindowSizes(), SpectrogramSettings::defaults(), eIsSettingToDialog, mDefaulted, mDefaultsCheckbox, mTempSettings, PopulateOrExchange(), and S.
|
private |
Definition at line 515 of file SpectrumPrefs.cpp.
References ID_WINDOW_SIZE, SpectrogramSettings::LogMinWindowSize, OnControl(), and PopulatePaddingChoices().
|
private |
Definition at line 107 of file SpectrumPrefs.cpp.
References eIsCreatingFromPrefs, mTypeChoices, NumWindowFuncs(), PopulateOrExchange(), PopulatePaddingChoices(), S, and WindowFuncName().
Referenced by SpectrumPrefs().
|
override |
Definition at line 160 of file SpectrumPrefs.cpp.
References SpectrogramSettings::algorithm, SpectrogramSettings::colorScheme, eIsGettingMetadata, EnableDisableSTFTOnlyControls(), SpectrogramSettings::frequencyGain, SpectrogramSettings::gain, SpectrogramSettings::Globals::Get(), SpectrogramSettings::GetAlgorithmNames(), SpectrogramSettings::GetColorSchemeNames(), SpectrogramSettings::GetScaleNames(), ID_ALGORITHM, ID_COLOR_SCHEME, ID_DEFAULTS, ID_FREQUENCY_GAIN, ID_GAIN, ID_MAXIMUM, ID_MINIMUM, ID_PADDING_SIZE, ID_RANGE, ID_SCALE, ID_SPECTRAL_SELECTION, ID_WINDOW_SIZE, ID_WINDOW_TYPE, mAlgorithmChoice, SpectrogramSettings::maxFreq, mDefaulted, mDefaultsCheckbox, mFrequencyGain, mGain, SpectrogramSettings::minFreq, mMaxFreq, mMinFreq, mPopulating, mRange, Msgids(), mTempSettings, mTypeChoices, mWc, mZeroPaddingChoiceCtrl, mZeroPaddingChoices, SpectrogramSettings::range, S, SpectrogramSettings::scaleType, SpectrogramSettings::spectralSelection, SpectrogramSettings::windowSize, SpectrogramSettings::windowType, XC, XO(), XXO(), and SpectrogramSettings::zeroPaddingFactor.
Referenced by OnDefaults(), Populate(), Preview(), and Validate().
|
private |
Definition at line 122 of file SpectrumPrefs.cpp.
References ID_PADDING_SIZE, SpectrogramSettings::LogMaxWindowSize, min(), mZeroPaddingChoice, mZeroPaddingChoices, Verbatim(), and wxT().
Referenced by OnWindowSize(), and Populate().
|
overridevirtual |
Reimplemented from PrefsPanel.
Definition at line 428 of file SpectrumPrefs.cpp.
References SpectrogramSettings::ConvertToActualWindowSizes(), SpectrogramSettings::ConvertToEnumeratedWindowSizes(), SpectrogramSettings::defaults(), eIsSavingToPrefs, TrackPanel::Get(), SpectrogramBounds::Get(), SpectrogramSettings::maxFreq, mDefaulted, SpectrogramSettings::minFreq, mProject, mTempSettings, mWc, SpectrogramSettings::Own(), PopulateOrExchange(), SpectrogramSettings::Reset(), S, SpectrogramBounds::SetBounds(), settings(), and Validate().
void SpectrumPrefs::Rollback | ( | ) |
Definition at line 395 of file SpectrumPrefs.cpp.
References SpectrogramSettings::defaults(), TrackPanel::Get(), WaveChannelView::Get(), SpectrogramBounds::Get(), mOrigDefaulted, mOrigMax, mOrigMin, mOrigPlacements, mOrigSettings, mProject, mWc, SpectrogramSettings::Own(), SpectrogramSettings::Reset(), WaveChannelView::RestorePlacements(), SpectrogramBounds::SetBounds(), and settings().
Referenced by ~SpectrumPrefs().
|
overridevirtual |
Reimplemented from PrefsPanel.
Definition at line 497 of file SpectrumPrefs.cpp.
References mProject.
|
override |
Definition at line 330 of file SpectrumPrefs.cpp.
References AudacityMessageBox(), SpectrogramSettings::ConvertToActualWindowSizes(), SpectrogramSettings::ConvertToEnumeratedWindowSizes(), eIsSavingToPrefs, mFrequencyGain, mGain, mMaxFreq, mMinFreq, mRange, mTempSettings, PopulateOrExchange(), S, SpectrogramSettings::Validate(), and XO().
Referenced by Commit(), and Preview().
|
private |
Definition at line 90 of file SpectrumPrefs.h.
Referenced by EnableDisableSTFTOnlyControls(), and PopulateOrExchange().
|
private |
Definition at line 106 of file SpectrumPrefs.h.
Referenced by Commit(), and ~SpectrumPrefs().
|
private |
Definition at line 73 of file SpectrumPrefs.h.
Referenced by Commit(), OnControl(), OnDefaults(), PopulateOrExchange(), Preview(), and SpectrumPrefs().
|
private |
Definition at line 98 of file SpectrumPrefs.h.
Referenced by OnControl(), OnDefaults(), and PopulateOrExchange().
|
private |
Definition at line 79 of file SpectrumPrefs.h.
Referenced by EnableDisableSTFTOnlyControls(), PopulateOrExchange(), and Validate().
|
private |
Definition at line 77 of file SpectrumPrefs.h.
Referenced by EnableDisableSTFTOnlyControls(), PopulateOrExchange(), and Validate().
|
private |
Definition at line 76 of file SpectrumPrefs.h.
Referenced by PopulateOrExchange(), and Validate().
|
private |
Definition at line 75 of file SpectrumPrefs.h.
Referenced by PopulateOrExchange(), and Validate().
|
private |
Definition at line 73 of file SpectrumPrefs.h.
Referenced by Rollback(), and SpectrumPrefs().
|
private |
Definition at line 103 of file SpectrumPrefs.h.
Referenced by Rollback(), and SpectrumPrefs().
|
private |
Definition at line 103 of file SpectrumPrefs.h.
Referenced by Rollback(), and SpectrumPrefs().
|
private |
Definition at line 102 of file SpectrumPrefs.h.
Referenced by Rollback(), and SpectrumPrefs().
|
private |
Definition at line 100 of file SpectrumPrefs.h.
Referenced by Rollback(), and SpectrumPrefs().
|
private |
Definition at line 105 of file SpectrumPrefs.h.
Referenced by OnControl(), and PopulateOrExchange().
|
private |
Definition at line 70 of file SpectrumPrefs.h.
Referenced by Preview(), Rollback(), and ShowsPreviewButton().
|
private |
Definition at line 78 of file SpectrumPrefs.h.
Referenced by EnableDisableSTFTOnlyControls(), PopulateOrExchange(), and Validate().
|
private |
Definition at line 100 of file SpectrumPrefs.h.
Referenced by OnDefaults(), PopulateOrExchange(), Preview(), SpectrumPrefs(), and Validate().
|
private |
Definition at line 88 of file SpectrumPrefs.h.
Referenced by Populate(), and PopulateOrExchange().
|
private |
Definition at line 72 of file SpectrumPrefs.h.
Referenced by Commit(), HelpPageName(), PopulateOrExchange(), Preview(), Rollback(), and SpectrumPrefs().
|
private |
Definition at line 84 of file SpectrumPrefs.h.
Referenced by PopulatePaddingChoices().
|
private |
Definition at line 85 of file SpectrumPrefs.h.
Referenced by EnableDisableSTFTOnlyControls(), and PopulateOrExchange().
|
private |
Definition at line 86 of file SpectrumPrefs.h.
Referenced by PopulateOrExchange(), and PopulatePaddingChoices().