Audacity  2.2.2
QualityPrefs.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  QualityPrefs.h
6 
7  Joshua Haberman
8  James Crook
9 
10 **********************************************************************/
11 
12 #ifndef __AUDACITY_QUALITY_PREFS__
13 #define __AUDACITY_QUALITY_PREFS__
14 
15 #include <vector>
16 #include <wx/defs.h>
17 
18 #include <wx/arrstr.h>
19 #include <wx/choice.h>
20 #include <wx/textctrl.h>
21 
22 #include "PrefsPanel.h"
23 
24 class ShuttleGui;
25 enum sampleFormat : unsigned;
26 enum DitherType : unsigned;
27 
28 class QualityPrefs final : public PrefsPanel
29 {
30  public:
31  QualityPrefs(wxWindow * parent, wxWindowID winid);
32  virtual ~QualityPrefs();
33 
34  bool Commit() override;
35  wxString HelpPageName() override;
36  void PopulateOrExchange(ShuttleGui & S) override;
37 
39 
42 
43  private:
44  void Populate();
45  void GetNamesAndLabels();
46  void OnSampleRateChoice(wxCommandEvent & e);
47 
48  wxArrayString mSampleRateNames;
49  std::vector<int> mSampleRateLabels;
50 
51  wxChoice *mSampleRates;
52  wxTextCtrl *mOtherSampleRate;
54 
55  DECLARE_EVENT_TABLE()
56 };
57 
59 {
60 public:
61  PrefsPanel *operator () (wxWindow *parent, wxWindowID winid) override;
62 };
63 #endif
wxArrayString mSampleRateNames
Definition: QualityPrefs.h:48
std::vector< int > mSampleRateLabels
Definition: QualityPrefs.h:49
void PopulateOrExchange(ShuttleGui &S) override
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
static DitherType BestDitherChoice()
void GetNamesAndLabels()
static DitherType FastDitherChoice()
virtual ~QualityPrefs()
wxString HelpPageName() override
wxChoice * mSampleRates
Definition: QualityPrefs.h:51
PrefsPanel * operator()(wxWindow *parent, wxWindowID winid) override
QualityPrefs(wxWindow *parent, wxWindowID winid)
A PrefsPanel used for setting audio quality.
Definition: QualityPrefs.h:28
sampleFormat
Definition: Types.h:188
bool Commit() override
int mOtherSampleRateValue
Definition: QualityPrefs.h:53
wxTextCtrl * mOtherSampleRate
Definition: QualityPrefs.h:52
Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.
Definition: PrefsPanel.h:45
void OnSampleRateChoice(wxCommandEvent &e)
DitherType
These ditherers are currently available:
Definition: Dither.h:17
static sampleFormat SampleFormatChoice()