Audacity 3.2.0
ExportAudioDialog.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ExportAudioDialog.h
6
7 Vitaly Sverchinsky
8
9**********************************************************************/
10
11#pragma once
12
13#include "wxPanelWrapper.h"
14#include "ExportTypes.h"
15#include <wx/filename.h>
16
17#include "ExportPlugin.h"
18#include "Tags.h"
19
20class ExportFilePanel;
21class AudacityProject;
22class ShuttleGui;
23
24class Exporter;
25class ExportPlugin;
27
30
31class wxTextCtrl;
32class wxButton;
33class wxChoice;
34class wxRadioButton;
35class wxCheckBox;
36
37namespace MixerOptions
38{
39class Downmix;
40}
41
43{
46 {
47 double t0;
48 double t1;
49 wxFileName filename;
50 unsigned channels;
52 };
53
54public:
55 enum class ExportMode
56 {
57 Auto,
58 SelectedOnly
59 };
60
61 ExportAudioDialog(wxWindow* parent,
63 const wxString& defaultName,
64 const wxString& defaultFormat,
67
68 bool Show(bool show = true) override;
69private:
70
72
73 void OnExportRangeChange(wxCommandEvent& event);
74 void OnSplitModeChange(wxCommandEvent& event);
75 void OnSplitNamePolicyChange(wxCommandEvent& event);
76
77 void OnTrimBlankSpaceBeforeFirstClip(wxCommandEvent&);
78
79 void OnIncludeAudioBeforeFirstLabelChange(wxCommandEvent&);
80
81 void OnFileNamePrefixChange(wxCommandEvent&);
82
83 void OnEditMetadata(wxCommandEvent& event);
84
85 void OnHelp(wxCommandEvent& event);
86
87 void OnExport(wxCommandEvent& event);
88
89 void OnFormatChange(wxCommandEvent& event);
90
92 void UpdateLabelExportSettings(const ExportPlugin& plugin, int formatIndex, bool byName, bool addNumber, const wxString& prefix);
93 void UpdateTrackExportSettings(const ExportPlugin& plugin, int formatIndex, bool byName, bool addNumber, const wxString& prefix);
94
96 int formatIndex,
97 const ExportProcessor::Parameters& parameters,
98 FilePaths& exporterFiles);
99
101 int formatIndex,
102 const ExportProcessor::Parameters& parameters,
103 FilePaths& exporterFiles);
104
105 ExportResult DoExport(const ExportPlugin& plugin,
106 int formatIndex,
107 const ExportProcessor::Parameters& parameters,
108 const wxFileName& filename,
109 int channels,
110 double t0, double t1, bool selectedOnly,
111 const Tags& tags,
112 FilePaths& exportedFiles);
113
115
117
118 wxWindow* mSplitsPanel{};
120 wxTextCtrl* mSplitFileNamePrefix{};
121 wxButton* mEditMetadata{};
122 wxRadioButton* mRangeProject;
123 wxRadioButton* mRangeSelection{};
124 wxRadioButton* mRangeSplit{};
125 wxRadioButton* mSplitByLabels{};
126 wxRadioButton* mSplitByTracks{};
127 wxRadioButton* mExportRangeSelection{};
128 wxRadioButton* mSplitModeTracks{};
129 wxRadioButton* mSplitModeLabels{};
130 wxRadioButton* mSplitUseName{};
131 wxRadioButton* mSplitUseNumAndName{};
132 wxRadioButton* mSplitUseNumAndPrefix{};
133 wxCheckBox* mOverwriteExisting{};
135
136 std::vector<ExportSetting> mExportSettings;
138
139 DECLARE_EVENT_TABLE()
140};
141
ExportResult
Definition: ExportTypes.h:24
const auto project
#define S(N)
Definition: ToChars.cpp:64
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
ExportResult DoExportSplitByTracks(const ExportPlugin &plugin, int formatIndex, const ExportProcessor::Parameters &parameters, FilePaths &exporterFiles)
void OnEditMetadata(wxCommandEvent &event)
void OnIncludeAudioBeforeFirstLabelChange(wxCommandEvent &)
wxRadioButton * mRangeSplit
wxCheckBox * mSkipSilenceAtBeginning
wxRadioButton * mSplitModeTracks
wxCheckBox * mOverwriteExisting
void UpdateLabelExportSettings(const ExportPlugin &plugin, int formatIndex, bool byName, bool addNumber, const wxString &prefix)
void OnHelp(wxCommandEvent &event)
wxRadioButton * mRangeSelection
void OnExport(wxCommandEvent &event)
void OnTrimBlankSpaceBeforeFirstClip(wxCommandEvent &)
void PopulateOrExchange(ShuttleGui &S)
ExportResult DoExport(const ExportPlugin &plugin, int formatIndex, const ExportProcessor::Parameters &parameters, const wxFileName &filename, int channels, double t0, double t1, bool selectedOnly, const Tags &tags, FilePaths &exportedFiles)
void OnSplitNamePolicyChange(wxCommandEvent &event)
void OnExportRangeChange(wxCommandEvent &event)
void OnFileNamePrefixChange(wxCommandEvent &)
wxRadioButton * mSplitUseName
bool Show(bool show=true) override
ExportResult DoExportSplitByLabels(const ExportPlugin &plugin, int formatIndex, const ExportProcessor::Parameters &parameters, FilePaths &exporterFiles)
wxRadioButton * mSplitUseNumAndName
wxRadioButton * mSplitByTracks
ExportFilePanel * mExportOptionsPanel
~ExportAudioDialog() override
wxRadioButton * mSplitByLabels
void UpdateTrackExportSettings(const ExportPlugin &plugin, int formatIndex, bool byName, bool addNumber, const wxString &prefix)
wxTextCtrl * mSplitFileNamePrefix
void OnFormatChange(wxCommandEvent &event)
AudacityProject & mProject
void OnSplitModeChange(wxCommandEvent &event)
wxRadioButton * mSplitModeLabels
wxCheckBox * mIncludeAudioBeforeFirstLabel
wxRadioButton * mExportRangeSelection
std::vector< ExportSetting > mExportSettings
wxRadioButton * mRangeProject
wxRadioButton * mSplitUseNumAndPrefix
ExportAudioDialog(wxWindow *parent, AudacityProject &project, const wxString &defaultName, const wxString &defaultFormat, ExportMode mode=ExportMode::Auto)
std::vector< std::tuple< ExportOptionID, ExportValue > > Parameters
Definition: ExportPlugin.h:93
A matrix of booleans, one row per input channel, column per output.
Definition: MixerOptions.h:32
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
ID3 Tags (for MP3)
Definition: Tags.h:73
Extend wxArrayString with move operations and construction and insertion fromstd::initializer_list.
A private class used to store the information needed to do an export.