Audacity  3.0.3
Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
ImportExportPrefs Class Referencefinal

A PrefsPanel used to select import and export options. More...

#include <ImportExportPrefs.h>

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

Public Member Functions

 ImportExportPrefs (wxWindow *parent, wxWindowID winid)
 
 ~ImportExportPrefs ()
 
ComponentInterfaceSymbol GetSymbol () override
 
TranslatableString GetDescription () override
 
bool Commit () override
 
ManualPageID HelpPageName () override
 If not empty string, the Help button is added below the panel. More...
 
void PopulateOrExchange (ShuttleGui &S) override
 
- Public Member Functions inherited from PrefsPanel
 PrefsPanel (wxWindow *parent, wxWindowID winid, const TranslatableString &title)
 
virtual ~PrefsPanel ()
 
virtual void Preview ()
 
virtual PluginPath GetPath ()
 
virtual VendorSymbol GetVendor ()
 
virtual wxString GetVersion ()
 
virtual bool ShowsPreviewButton ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
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
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Static Public Attributes

static EnumSetting< bool > ExportDownMixSetting
 
static EnumSetting< bool > LabelStyleSetting
 
static EnumSetting< bool > AllegroStyleSetting
 

Private Member Functions

void Populate ()
 Creates the dialog and its contents. More...
 

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 FactoriesDefaultFactories ()
 

Detailed Description

A PrefsPanel used to select import and export options.

Definition at line 26 of file ImportExportPrefs.h.

Constructor & Destructor Documentation

◆ ImportExportPrefs()

ImportExportPrefs::ImportExportPrefs ( wxWindow *  parent,
wxWindowID  winid 
)

Definition at line 26 of file ImportExportPrefs.cpp.

27 : PrefsPanel(parent, winid, XO("Import / Export"))
28 {
29  Populate();
30 }

References Populate().

Here is the call graph for this function:

◆ ~ImportExportPrefs()

ImportExportPrefs::~ImportExportPrefs ( )

Definition at line 32 of file ImportExportPrefs.cpp.

33 {
34 }

Member Function Documentation

◆ Commit()

bool ImportExportPrefs::Commit ( )
overridevirtual

Implements PrefsPanel.

Definition at line 174 of file ImportExportPrefs.cpp.

175 {
176  ShuttleGui S(this, eIsSavingToPrefs);
178 
179  return true;
180 }

References eIsSavingToPrefs, and PopulateOrExchange().

Here is the call graph for this function:

◆ GetDescription()

TranslatableString ImportExportPrefs::GetDescription ( )
overridevirtual

Implements ComponentInterface.

Definition at line 41 of file ImportExportPrefs.cpp.

42 {
43  return XO("Preferences for ImportExport");
44 }

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol ImportExportPrefs::GetSymbol ( )
overridevirtual

Implements ComponentInterface.

Definition at line 36 of file ImportExportPrefs.cpp.

37 {
39 }

References IMPORT_EXPORT_PREFS_PLUGIN_SYMBOL.

◆ HelpPageName()

ManualPageID ImportExportPrefs::HelpPageName ( )
overridevirtual

If not empty string, the Help button is added below the panel.

Default returns empty string.

Reimplemented from PrefsPanel.

Definition at line 46 of file ImportExportPrefs.cpp.

47 {
48  return "Import_-_Export_Preferences";
49 }

◆ Populate()

void ImportExportPrefs::Populate ( )
private

Creates the dialog and its contents.

Definition at line 52 of file ImportExportPrefs.cpp.

53 {
54  //------------------------- Main section --------------------
55  // Now construct the GUI itself.
56  // Use 'eIsCreatingFromPrefs' so that the GUI is
57  // initialised with values from gPrefs.
60  // ----------------------- End of main section --------------
61 }

References eIsCreatingFromPrefs, and PopulateOrExchange().

Referenced by ImportExportPrefs().

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

◆ PopulateOrExchange()

void ImportExportPrefs::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 106 of file ImportExportPrefs.cpp.

107 {
108  S.SetBorder(2);
109  S.StartScroller();
110 
111  S.StartStatic(XO("When exporting tracks to an audio file"));
112  {
113  // Bug 2692: Place button group in panel so tabbing will work and,
114  // on the Mac, VoiceOver will announce as radio buttons.
115  S.StartPanel();
116  {
118  {
119  S.TieRadioButton();
120  S.TieRadioButton();
121  }
123  }
124  S.EndPanel();
125 
126  S.TieCheckBox(XXO("S&how Metadata Tags editor before export"),
127  {wxT("/AudioFiles/ShowId3Dialog"),
128  true});
129  /* i18n-hint 'blank space' is space on the tracks with no audio in it*/
130  S.TieCheckBox(XXO("&Ignore blank space at the beginning"),
131  {wxT("/AudioFiles/SkipSilenceAtBeginning"),
132  false});
133  }
134  S.EndStatic();
135 
136  S.StartStatic(XO("Exported Label Style:"));
137  {
138  // Bug 2692: Place button group in panel so tabbing will work and,
139  // on the Mac, VoiceOver will announce as radio buttons.
140  S.StartPanel();
141  {
143  {
144  S.TieRadioButton();
145  S.TieRadioButton();
146  }
148  }
149  S.EndPanel();
150  }
151  S.EndStatic();
152 
153 #ifdef USE_MIDI
154  S.StartStatic(XO("Exported Allegro (.gro) files save time as:"));
155  {
156  // Bug 2692: Place button group in panel so tabbing will work and,
157  // on the Mac, VoiceOver will announce as radio buttons.
158  S.StartPanel();
159  {
161  {
162  S.TieRadioButton();
163  S.TieRadioButton();
164  }
166  }
167  S.EndPanel();
168  }
169  S.EndStatic();
170 #endif
171  S.EndScroller();
172 }

References AllegroStyleSetting, ShuttleGuiBase::EndPanel(), ShuttleGuiBase::EndRadioButtonGroup(), ShuttleGuiBase::EndScroller(), ShuttleGuiBase::EndStatic(), ExportDownMixSetting, LabelStyleSetting, ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartPanel(), ShuttleGuiBase::StartRadioButtonGroup(), ShuttleGuiBase::StartScroller(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::TieCheckBox(), ShuttleGuiBase::TieRadioButton(), XO, and XXO.

Referenced by Commit(), and Populate().

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

Member Data Documentation

◆ AllegroStyleSetting

EnumSetting< bool > ImportExportPrefs::AllegroStyleSetting
static
Initial value:
{
wxT("/FileFormats/AllegroStyleChoice"),
{
EnumValueSymbol{ wxT("Seconds"), XXO("&Seconds") },
EnumValueSymbol{ wxT("Beats"), XXO("&Beats") },
},
0,
{
true, false,
},
wxT("/FileFormats/AllegroStyle"),
}

Definition at line 31 of file ImportExportPrefs.h.

Referenced by NoteTrack::ExportAllegro(), and PopulateOrExchange().

◆ ExportDownMixSetting

EnumSetting< bool > ImportExportPrefs::ExportDownMixSetting
static
Initial value:
{
wxT("/FileFormats/ExportDownMixChoice"),
{
EnumValueSymbol{ wxT("MixDown"), XXO("&Mix down to Stereo or Mono") },
EnumValueSymbol{ wxT("Custom"), XXO("&Use Advanced Mixing Options") },
},
0,
{
true, false,
},
wxT("/FileFormats/ExportDownMix"),
}

Definition at line 29 of file ImportExportPrefs.h.

Referenced by Exporter::CheckMix(), and PopulateOrExchange().

◆ LabelStyleSetting

EnumSetting< bool > ImportExportPrefs::LabelStyleSetting
static
Initial value:
{
wxT("/FileFormats/LabelStyleChoice"),
{
EnumValueSymbol{ wxT("Standard"), XXO("S&tandard") },
EnumValueSymbol{ wxT("Extended"), XXO("E&xtended (with frequency ranges)") },
},
0,
{
true, false,
},
}

Definition at line 30 of file ImportExportPrefs.h.

Referenced by LabelStruct::Export(), and PopulateOrExchange().


The documentation for this class was generated from the following files:
ShuttleGuiBase::StartRadioButtonGroup
void StartRadioButtonGroup(const ChoiceSetting &Setting)
Call this before any TieRadioButton calls.
Definition: ShuttleGui.cpp:1595
ShuttleGuiBase::EndRadioButtonGroup
void EndRadioButtonGroup()
Definition: ShuttleGui.cpp:1612
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1629
ImportExportPrefs::ExportDownMixSetting
static EnumSetting< bool > ExportDownMixSetting
Definition: ImportExportPrefs.h:29
XO
#define XO(s)
Definition: Internat.h:31
ShuttleGuiBase::StartPanel
wxPanel * StartPanel(int iStyle=0)
Definition: ShuttleGui.cpp:990
ShuttleGuiBase::EndPanel
void EndPanel()
Definition: ShuttleGui.cpp:1018
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterfaceSymbol.h:27
ShuttleGuiBase::EndScroller
void EndScroller()
Definition: ShuttleGui.cpp:971
ImportExportPrefs::AllegroStyleSetting
static EnumSetting< bool > AllegroStyleSetting
Definition: ImportExportPrefs.h:31
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::StartScroller
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:938
ImportExportPrefs::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: ImportExportPrefs.cpp:106
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:893
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:48
IMPORT_EXPORT_PREFS_PLUGIN_SYMBOL
#define IMPORT_EXPORT_PREFS_PLUGIN_SYMBOL
Definition: ImportExportPrefs.h:22
ShuttleGuiBase::TieRadioButton
wxRadioButton * TieRadioButton()
This function must be within a StartRadioButtonGroup - EndRadioButtonGroup pair.
Definition: ShuttleGui.cpp:1536
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
ImportExportPrefs::LabelStyleSetting
static EnumSetting< bool > LabelStyleSetting
Definition: ImportExportPrefs.h:30
ImportExportPrefs::Populate
void Populate()
Creates the dialog and its contents.
Definition: ImportExportPrefs.cpp:52
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631
PrefsPanel::PrefsPanel
PrefsPanel(wxWindow *parent, wxWindowID winid, const TranslatableString &title)
Definition: PrefsPanel.h:90