Audacity  2.2.2
ImportExportPrefs.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  ImportExportPrefs.cpp
6 
7  Joshua Haberman
8  Dominic Mazzoni
9  James Crook
10 
11 *******************************************************************//*******************************************************************/
17 
18 #include "../Audacity.h"
19 
20 #include <wx/defs.h>
21 
22 #include "../Prefs.h"
23 #include "../ShuttleGui.h"
24 
25 #include "ImportExportPrefs.h"
26 #include "../Internat.h"
27 
28 ImportExportPrefs::ImportExportPrefs(wxWindow * parent, wxWindowID winid)
29 : PrefsPanel(parent, winid, _("Import / Export"))
30 {
31  Populate();
32 }
33 
35 {
36 }
37 
40 {
41  //------------------------- Main section --------------------
42  // Now construct the GUI itself.
43  // Use 'eIsCreatingFromPrefs' so that the GUI is
44  // initialised with values from gPrefs.
47  // ----------------------- End of main section --------------
48 }
49 
51 {
52  S.SetBorder(2);
53  S.StartScroller();
54 
55  S.StartStatic(_("When importing audio files"));
56  {
57  S.StartRadioButtonGroup(wxT("/FileFormats/CopyOrEditUncompressedData"), wxT("copy"));
58  {
59  S.TieRadioButton(_("&Copy uncompressed files into the project (safer)"),
60  wxT("copy"));
61  S.TieRadioButton(_("&Read uncompressed files from original location (faster)"),
62  wxT("edit"));
63  }
65 
66  S.TieCheckBox(_("&Normalize all tracks in project"),
67  wxT("/AudioFiles/NormalizeOnLoad"),
68  false);
69  }
70  S.EndStatic();
71 
72  S.StartStatic(_("When exporting tracks to an audio file"));
73  {
74  S.StartRadioButtonGroup(wxT("/FileFormats/ExportDownMix"), true);
75  {
76  S.TieRadioButton(_("&Mix down to Stereo or Mono"),
77  true);
78  S.TieRadioButton(_("&Use custom mix"),
79  false);
80  }
82 
83  S.TieCheckBox(_("S&how Metadata Tags editor before export"),
84  wxT("/AudioFiles/ShowId3Dialog"),
85  true);
86  // This documentation is unlikely to help somebody who cannot figure it out by discovering the Options button in the dialog.
87  // It's only clutter in this Prefs tab, so removed.
88  // S.AddFixedText(_("Note: Export quality options can be chosen by clicking the Options\nbutton in the Export dialog."));
89  }
90  S.EndStatic();
91 #ifdef USE_MIDI
92  S.StartStatic(_("Exported Allegro (.gro) files save time as:"));
93  {
94  S.StartRadioButtonGroup(wxT("/FileFormats/AllegroStyle"), true);
95  {
96  S.TieRadioButton(_("&Seconds"),
97  true);
98  S.TieRadioButton(_("&Beats"),
99  false);
100  }
102  }
103  S.EndStatic();
104 #endif
105  S.EndScroller();
106 }
107 
109 {
110  ShuttleGui S(this, eIsSavingToPrefs);
112 
113  return true;
114 }
115 
117 {
118  return "Import_-_Export_Preferences";
119 }
120 
121 PrefsPanel *ImportExportPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
122 {
123  wxASSERT(parent); // to justify safenew
124  return safenew ImportExportPrefs(parent, winid);
125 }
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
void EndRadioButtonGroup()
bool Commit() override
PrefsPanel * operator()(wxWindow *parent, wxWindowID winid) override
void EndScroller()
Definition: ShuttleGui.cpp:828
#define safenew
Definition: Audacity.h:230
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:795
wxString HelpPageName() override
wxRadioButton * TieRadioButton(const wxString &Prompt, WrappedType &WrappedRef)
ImportExportPrefs(wxWindow *parent, wxWindowID winid)
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
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxCheckBox * TieCheckBox(const wxString &Prompt, WrappedType &WrappedRef)
wxStaticBox * StartStatic(const wxString &Str, int iProp=0)
Definition: ShuttleGui.cpp:763
A PrefsPanel used to select import and export options.
void PopulateOrExchange(ShuttleGui &S) override
void SetBorder(int Border)
Definition: ShuttleGui.h:286
void StartRadioButtonGroup(const wxString &SettingName)
void Populate()
Creates the dialog and its contents.