Audacity  2.2.0
ExportMultiple Class Referencefinal

Presents a dialog box allowing the user to export multiple files either by exporting each track as a separate file, or by exporting each label as a separate file. More...

#include <ExportMultiple.h>

Inheritance diagram for ExportMultiple:
wxTabTraversalWrapper< Base >

Public Member Functions

 ExportMultiple (AudacityProject *parent)
 
virtual ~ExportMultiple ()
 
int ShowModal ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< Base >
template<typename... Args>
 wxTabTraversalWrapper (Args &&...args)
 
 ~wxTabTraversalWrapper ()
 

Private Member Functions

void CanExport ()
 
void CountTracksAndLabels ()
 
bool DirOk ()
 
ProgressResult ExportMultipleByLabel (bool byName, const wxString &prefix, bool addNumber)
 Export multiple labeled regions of the project to separate files. More...
 
ProgressResult ExportMultipleByTrack (bool byName, const wxString &prefix, bool addNumber)
 Export each track in the project to a separate file. More...
 
ProgressResult DoExport (unsigned channels, const wxFileName &name, bool selectedOnly, double t0, double t1, const Tags &tags)
 
wxString MakeFileName (const wxString &input)
 Takes an arbitrary text string and converts it to a form that can be used as a file name, if necessary prompting the user to edit the file name produced. More...
 
void PopulateOrExchange (ShuttleGui &S)
 
void EnableControls ()
 
void OnFormat (wxCommandEvent &event)
 
void OnOptions (wxCommandEvent &event)
 
void OnCreate (wxCommandEvent &event)
 
void OnChoose (wxCommandEvent &event)
 
void OnLabel (wxCommandEvent &event)
 
void OnFirst (wxCommandEvent &event)
 
void OnFirstFileName (wxCommandEvent &event)
 
void OnTrack (wxCommandEvent &event)
 
void OnByName (wxCommandEvent &event)
 
void OnByNumber (wxCommandEvent &event)
 
void OnPrefix (wxCommandEvent &event)
 
void OnCancel (wxCommandEvent &event)
 
void OnExport (wxCommandEvent &event)
 

Private Attributes

Exporter mExporter
 
std::vector< ExportPlugin * > mPlugins
 
AudacityProjectmProject
 
TrackListmTracks
 
LabelTrackmLabels
 
int mNumLabels
 
int mNumWaveTracks
 
int mFilterIndex
 
int mPluginIndex
 
int mSubFormatIndex
 
bool mInitialized
 
wxArrayString mExported
 
wxChoice * mFormat
 
wxButton * mOptions
 
wxTextCtrl * mDir
 
wxButton * mCreate
 
wxButton * mChoose
 
wxRadioButton * mLabel
 
wxStaticText * mLabelLabel
 
wxCheckBox * mFirst
 
wxStaticText * mFirstFileLabel
 
wxTextCtrl * mFirstFileName
 
wxRadioButton * mTrack
 
wxStaticText * mTrackLabel
 
wxRadioButton * mByNumberAndName
 
wxRadioButton * mByName
 
wxRadioButton * mByNumber
 
wxStaticText * mPrefixLabel
 
wxTextCtrl * mPrefix
 
wxCheckBox * mOverwrite
 
wxButton * mCancel
 
wxButton * mExport
 
wxSimplebook * mBook
 
SelectionStatemSelectionState
 

Detailed Description

Presents a dialog box allowing the user to export multiple files either by exporting each track as a separate file, or by exporting each label as a separate file.

Constructor & Destructor Documentation

ExportMultiple::ExportMultiple ( AudacityProject parent)
ExportMultiple::~ExportMultiple ( )
virtual

Member Function Documentation

void ExportMultiple::CanExport ( )
private
bool ExportMultiple::DirOk ( )
private

References _(), and mDir.

Referenced by OnExport().

ProgressResult ExportMultiple::DoExport ( unsigned  channels,
const wxFileName &  name,
bool  selectedOnly,
double  t0,
double  t1,
const Tags tags 
)
private

Export one file of an export multiple set

Called once for each file in the list to do a (non-interactive) export

Parameters
channelsNumber of channels to export
nameThe file name (and path) to export to
selectedOnlyShould we export the selected tracks only?
t0Start time for export
t1End time for export
tagsMetadata to include in the file (if possible).

References Cancelled, AudacityProject::GetDirManager(), mExported, mOverwrite, mPluginIndex, mPlugins, mProject, mSubFormatIndex, name, Stopped, and Success.

Referenced by ExportMultipleByLabel(), and ExportMultipleByTrack().

ProgressResult ExportMultiple::ExportMultipleByLabel ( bool  byName,
const wxString &  prefix,
bool  addNumber 
)
private

Export multiple labeled regions of the project to separate files.

Uses a single label track in the project to split up the audio into a series of sections, each of which is exported to a separate file.

Parameters
byNameControls whether files are named after the text in the labels that define them (true), or just numbered (false).
prefixThe string used to prefix the file number if files are being numbered rather than named

References _(), Cancelled, ExportKit::destfile, DoExport(), ExportKit::filetags, TrackList::GetEndTime(), LabelTrack::GetLabel(), TrackList::GetNumExportChannels(), AudacityProject::GetShowId3Dialog(), AudacityProject::GetTags(), SelectedRegion::isPoint(), MakeFileName(), FileNames::MakeNameUnique(), mDir, mFirst, mFirstFileName, mLabels, mNumLabels, mPluginIndex, mPlugins, mProject, mSubFormatIndex, mTracks, name, LabelStruct::selectedRegion, Tags::SetTag(), Tags::ShowEditDialog(), Stopped, Success, SelectedRegion::t0(), ExportKit::t0, SelectedRegion::t1(), ExportKit::t1, TAG_TITLE, TAG_TRACK, and LabelStruct::title.

Referenced by OnExport().

ProgressResult ExportMultiple::ExportMultipleByTrack ( bool  byName,
const wxString &  prefix,
bool  addNumber 
)
private
wxString ExportMultiple::MakeFileName ( const wxString &  input)
private

Takes an arbitrary text string and converts it to a form that can be used as a file name, if necessary prompting the user to edit the file name produced.

References _(), Internat::GetExcludedCharacters(), and Internat::SanitiseFilename().

Referenced by ExportMultipleByLabel(), and ExportMultipleByTrack().

void ExportMultiple::OnByName ( wxCommandEvent &  event)
private

References EnableControls().

void ExportMultiple::OnByNumber ( wxCommandEvent &  event)
private

References EnableControls().

void ExportMultiple::OnCancel ( wxCommandEvent &  event)
private
void ExportMultiple::OnChoose ( wxCommandEvent &  event)
private

References _(), and mDir.

void ExportMultiple::OnCreate ( wxCommandEvent &  event)
private

References _(), and mDir.

void ExportMultiple::OnFirst ( wxCommandEvent &  event)
private

References EnableControls().

void ExportMultiple::OnFirstFileName ( wxCommandEvent &  event)
private

References EnableControls().

void ExportMultiple::OnFormat ( wxCommandEvent &  event)
private

References EnableControls(), mBook, and mFormat.

void ExportMultiple::OnLabel ( wxCommandEvent &  event)
private

References EnableControls().

void ExportMultiple::OnOptions ( wxCommandEvent &  event)
private
void ExportMultiple::OnPrefix ( wxCommandEvent &  event)
private

References EnableControls().

void ExportMultiple::OnTrack ( wxCommandEvent &  event)
private

References EnableControls().

int ExportMultiple::ShowModal ( )

Member Data Documentation

wxSimplebook* ExportMultiple::mBook
private
wxRadioButton* ExportMultiple::mByName
private

button to choose naming exported file from label text

Referenced by EnableControls(), OnExport(), and PopulateOrExchange().

wxRadioButton* ExportMultiple::mByNumber
private

button to choose numbering exported files

Referenced by EnableControls(), and PopulateOrExchange().

wxRadioButton* ExportMultiple::mByNumberAndName
private

button to choose number AND name for exported files

Referenced by EnableControls(), OnExport(), and PopulateOrExchange().

wxButton* ExportMultiple::mCancel
private
wxButton* ExportMultiple::mChoose
private
wxButton* ExportMultiple::mCreate
private
wxTextCtrl* ExportMultiple::mDir
private

The directory all the exported files will end up in

Referenced by DirOk(), ExportMultipleByLabel(), ExportMultipleByTrack(), OnChoose(), OnCreate(), and PopulateOrExchange().

wxButton* ExportMultiple::mExport
private
wxArrayString ExportMultiple::mExported
private

Referenced by DoExport(), and OnExport().

Exporter ExportMultiple::mExporter
private
int ExportMultiple::mFilterIndex
private

The index in the drop-down list of export formats (mFormat) of the selected export format. This list includes all possible plug-in - subformat combinations.

Referenced by OnExport(), and PopulateOrExchange().

wxCheckBox* ExportMultiple::mFirst
private

Check box to export audio before first label

Referenced by EnableControls(), ExportMultipleByLabel(), and PopulateOrExchange().

wxStaticText* ExportMultiple::mFirstFileLabel
private

description text for mFirstFileName

Referenced by EnableControls(), and PopulateOrExchange().

wxTextCtrl* ExportMultiple::mFirstFileName
private

Name to use for exporting audio before the first label in the file

Referenced by EnableControls(), ExportMultipleByLabel(), and PopulateOrExchange().

wxChoice* ExportMultiple::mFormat
private

Drop-down list of export formats (combinations of plug-in and subformat)

Referenced by OnExport(), OnFormat(), OnOptions(), and PopulateOrExchange().

bool ExportMultiple::mInitialized
private

Referenced by EnableControls().

wxRadioButton* ExportMultiple::mLabel
private

button to choose export based on Labels

Referenced by EnableControls(), OnExport(), PopulateOrExchange(), and ShowModal().

wxStaticText* ExportMultiple::mLabelLabel
private

description text for mLabel

LabelTrack* ExportMultiple::mLabels
private
int ExportMultiple::mNumLabels
private
int ExportMultiple::mNumWaveTracks
private
wxButton* ExportMultiple::mOptions
private
wxCheckBox* ExportMultiple::mOverwrite
private

Referenced by DoExport(), and PopulateOrExchange().

int ExportMultiple::mPluginIndex
private

The index in mPlugins of the selected export plug-in

Referenced by DoExport(), ExportMultipleByLabel(), ExportMultipleByTrack(), OnExport(), OnOptions(), and PopulateOrExchange().

std::vector<ExportPlugin*> ExportMultiple::mPlugins
private

Array of references to available exporter plug-ins

Referenced by DoExport(), ExportMultipleByLabel(), ExportMultipleByTrack(), OnExport(), OnOptions(), and PopulateOrExchange().

wxTextCtrl* ExportMultiple::mPrefix
private
wxStaticText* ExportMultiple::mPrefixLabel
private
AudacityProject* ExportMultiple::mProject
private
SelectionState& ExportMultiple::mSelectionState
private

Referenced by ExportMultipleByTrack().

int ExportMultiple::mSubFormatIndex
private

The selected subformat number within the selected export plug-in set by mPluginIndex

Referenced by DoExport(), ExportMultipleByLabel(), ExportMultipleByTrack(), OnExport(), OnOptions(), and PopulateOrExchange().

wxRadioButton* ExportMultiple::mTrack
private

button to choose export based on tracks

Referenced by PopulateOrExchange(), and ShowModal().

wxStaticText* ExportMultiple::mTrackLabel
private
TrackList* ExportMultiple::mTracks
private

The list of tracks in the project that is being exported

Referenced by CountTracksAndLabels(), ExportMultipleByLabel(), and ExportMultipleByTrack().


The documentation for this class was generated from the following files: