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 ExportAudioDialog(wxWindow* parent,
57 const wxString& defaultName,
58 const wxString& defaultFormat);
60
61 bool Show(bool show = true) override;
62private:
63
65
66 void OnExportRangeChange(wxCommandEvent& event);
67 void OnSplitModeChange(wxCommandEvent& event);
68 void OnSplitNamePolicyChange(wxCommandEvent& event);
69
70 void OnTrimBlankSpaceBeforeFirstClip(wxCommandEvent&);
71
72 void OnIncludeAudioBeforeFirstLabelChange(wxCommandEvent&);
73
74 void OnFileNamePrefixChange(wxCommandEvent&);
75
76 void OnEditMetadata(wxCommandEvent& event);
77
78 void OnHelp(wxCommandEvent& event);
79
80 void OnExport(wxCommandEvent& event);
81
82 void OnFormatChange(wxCommandEvent& event);
83
85 void UpdateLabelExportSettings(const ExportPlugin& plugin, int formatIndex, bool byName, bool addNumber, const wxString& prefix);
86 void UpdateTrackExportSettings(const ExportPlugin& plugin, int formatIndex, bool byName, bool addNumber, const wxString& prefix);
87
89 int formatIndex,
90 const ExportProcessor::Parameters& parameters,
91 FilePaths& exporterFiles);
92
94 int formatIndex,
95 const ExportProcessor::Parameters& parameters,
96 FilePaths& exporterFiles);
97
99 int formatIndex,
100 const ExportProcessor::Parameters& parameters,
101 const wxFileName& filename,
102 int channels,
103 double t0, double t1, bool selectedOnly,
104 const Tags& tags,
105 FilePaths& exportedFiles);
106
108
110
111 wxWindow* mSplitsPanel{};
113 wxTextCtrl* mSplitFileNamePrefix{};
114 wxButton* mEditMetadata{};
115 wxRadioButton* mRangeProject;
116 wxRadioButton* mRangeSelection{};
117 wxRadioButton* mRangeSplit{};
118 wxRadioButton* mSplitByLabels{};
119 wxRadioButton* mSplitByTracks{};
120 wxRadioButton* mExportRangeSelection{};
121 wxRadioButton* mSplitModeTracks{};
122 wxRadioButton* mSplitModeLabels{};
123 wxRadioButton* mSplitUseName{};
124 wxRadioButton* mSplitUseNumAndName{};
125 wxRadioButton* mSplitUseNumAndPrefix{};
126 wxCheckBox* mOverwriteExisting{};
128
129 std::vector<ExportSetting> mExportSettings;
131
132 DECLARE_EVENT_TABLE()
133};
134
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)
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:630
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.