Audacity 3.2.0
SpectrumPrefs.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 SpectrumPrefs.h
6
7 Dominic Mazzoni
8 James Crook
9
10**********************************************************************/
11/*
12 Salvo Ventura
13 November 2006
14
15 Added selection box for windowType
16
17 All params are saved in config file.
18*/
19
20
21#ifndef __AUDACITY_SPECTRUM_PREFS__
22#define __AUDACITY_SPECTRUM_PREFS__
23
24#include <vector>
25#include <wx/defs.h>
26
27#include "PrefsPanel.h"
28#include "SpectrogramSettings.h"
29
30class wxChoice;
31class wxCheckBox;
32class wxTextCtrl;
33struct FFTParam;
34class ShuttleGui;
36class WaveTrack;
38
39#define SPECTRUM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Spectrum") }
40
41class SpectrumPrefs final : public PrefsPanel
42{
43 public:
44 SpectrumPrefs(wxWindow * parent, wxWindowID winid,
45 AudacityProject *pProject, WaveTrack *wt);
46 virtual ~SpectrumPrefs();
47 ComponentInterfaceSymbol GetSymbol() const override;
48 TranslatableString GetDescription() const override;
49
50 void Preview() override;
51 bool Commit() override;
52 void PopulateOrExchange(ShuttleGui & S) override;
53 void Rollback();
54 bool ShowsPreviewButton() override;
55 bool Validate() override;
56 ManualPageID HelpPageName() override;
57
58 private:
59 void Populate(size_t windowSize);
60 void PopulatePaddingChoices(size_t windowSize);
61
62 void OnControl(wxCommandEvent &event);
63 void OnWindowSize(wxCommandEvent &event);
64 void OnDefaults(wxCommandEvent&);
65 void OnAlgorithm(wxCommandEvent &);
66 DECLARE_EVENT_TABLE()
67
69
71
72 WaveTrack *const mWt;
74
75 wxTextCtrl *mMinFreq;
76 wxTextCtrl *mMaxFreq;
77 wxTextCtrl *mGain;
78 wxTextCtrl *mRange;
79 wxTextCtrl *mFrequencyGain;
80
81 /*
82 Zero-padding factor for spectrograms can smooth the display of
83 spectrograms by interpolating in frequency domain. */
87
89
91
92
93#ifdef EXPERIMENTAL_FIND_NOTES
94 wxTextCtrl *mFindNotesMinA;
95 wxTextCtrl *mFindNotesN;
96#endif
97
98 wxCheckBox *mDefaultsCheckbox;
99
101
102 std::vector<WaveChannelSubViewPlacement> mOrigPlacements;
104
107};
108
113#endif
PrefsPanel::Factory SpectrumPrefsFactory(WaveTrack *wt=0)
#define S(N)
Definition: ToChars.cpp:64
std::vector< TranslatableString > TranslatableStrings
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) > Factory
Definition: PrefsPanel.h:82
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:630
Spectrogram settings, either for one track or as defaults.
A PrefsPanel for spectrum settings.
Definition: SpectrumPrefs.h:42
ComponentInterfaceSymbol GetSymbol() const override
AudacityProject * mProject
Definition: SpectrumPrefs.h:70
TranslatableStrings mZeroPaddingChoices
Definition: SpectrumPrefs.h:86
void Populate(size_t windowSize)
void Preview() override
WaveTrack *const mWt
Definition: SpectrumPrefs.h:72
void OnWindowSize(wxCommandEvent &event)
virtual ~SpectrumPrefs()
void OnDefaults(wxCommandEvent &)
bool Commit() override
void OnAlgorithm(wxCommandEvent &)
wxCheckBox * mDefaultsCheckbox
Definition: SpectrumPrefs.h:98
void PopulatePaddingChoices(size_t windowSize)
std::vector< WaveChannelSubViewPlacement > mOrigPlacements
void EnableDisableSTFTOnlyControls()
void PopulateOrExchange(ShuttleGui &S) override
void OnControl(wxCommandEvent &event)
TranslatableStrings mTypeChoices
Definition: SpectrumPrefs.h:88
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
bool Validate() override
wxTextCtrl * mFrequencyGain
Definition: SpectrumPrefs.h:79
SpectrumPrefs(wxWindow *parent, wxWindowID winid, AudacityProject *pProject, WaveTrack *wt)
wxTextCtrl * mMaxFreq
Definition: SpectrumPrefs.h:76
wxTextCtrl * mRange
Definition: SpectrumPrefs.h:78
SpectrogramSettings mOrigSettings
wxTextCtrl * mGain
Definition: SpectrumPrefs.h:77
SpectrogramSettings mTempSettings
wxChoice * mZeroPaddingChoiceCtrl
Definition: SpectrumPrefs.h:85
bool ShowsPreviewButton() override
int mZeroPaddingChoice
Definition: SpectrumPrefs.h:84
TranslatableString GetDescription() const override
wxChoice * mAlgorithmChoice
Definition: SpectrumPrefs.h:90
wxTextCtrl * mMinFreq
Definition: SpectrumPrefs.h:75
Holds a msgid for the translation catalog; may also bind format arguments.
A Track that contains audio waveform data.
Definition: WaveTrack.h:227