Ardour  8.12
export_dialog.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2015 Paul Davis <paul@linuxaudiosystems.com>
3  * Copyright (C) 2005 Taybin Rutkin <taybin@taybin.com>
4  * Copyright (C) 2007-2011 David Robillard <d@drobilla.net>
5  * Copyright (C) 2008-2013 Sakari Bergen <sakari.bergen@beatwaves.net>
6  * Copyright (C) 2010-2012 Carl Hetherington <carl@carlh.net>
7  * Copyright (C) 2013-2014 Colin Fletcher <colin.m.fletcher@googlemail.com>
8  * Copyright (C) 2016-2017 Robin Gareus <robin@gareus.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License along
21  * with this program; if not, write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23  */
24 
25 #ifndef __export_dialog_h__
26 #define __export_dialog_h__
27 
28 #include <string>
29 #include <boost/scoped_ptr.hpp>
30 
31 #include <gtkmm/box.h>
32 #include <gtkmm/button.h>
33 #include <gtkmm/label.h>
34 #include <gtkmm/notebook.h>
35 #include <gtkmm/progressbar.h>
36 
38 
39 #include "public_editor.h"
42 #include "export_file_notebook.h"
43 #include "export_preset_selector.h"
44 #include "ardour_dialog.h"
46 
47 namespace ARDOUR {
48  class ExportStatus;
49  class ExportHandler;
50 }
51 
54 
56 {
57 public:
58 
61 
63 
64  /* Responses */
65 
66  enum Responses {
71  };
72 
73 protected:
74 
75  void on_response (int response_id) {
76  Gtk::Dialog::on_response (response_id);
77  }
78 
79  typedef std::shared_ptr<ARDOUR::ExportHandler> HandlerPtr;
80  typedef std::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
81 
85 
86  // initializes GUI layout
87  virtual void init_gui ();
88 
89  // Must initialize all the shared_ptrs below
90  virtual void init_components ();
91 
92  boost::scoped_ptr<ExportPresetSelector> preset_selector;
93  boost::scoped_ptr<ExportTimespanSelector> timespan_selector;
94  boost::scoped_ptr<ExportChannelSelector> channel_selector;
95  boost::scoped_ptr<ExportFileNotebook> file_notebook;
96 
97  std::shared_ptr<SoundcloudExportSelector> soundcloud_selector;
98 
101 
102  /*** GUI components ***/
104 
105 private:
106 
107  void init ();
108 
109  void notify_errors (bool force = false);
110  void close_dialog ();
111 
115 
116  void do_export (bool analysis_only);
117 
119 
121  void parameter_changed (std::string const&);
122 
123  void show_progress ();
125 
126  typedef std::shared_ptr<ARDOUR::ExportStatus> StatusPtr;
127 
130 
131  typedef std::map<samplepos_t, std::vector<std::string>> ReImportMap;
133 
134  /* Warning area */
135 
138  std::string warn_string;
139 
143  std::string list_files_string;
144 
145  void add_error (std::string const & text);
146  void add_warning (std::string const & text);
147 
148  /* Progress bar */
149 
151  sigc::connection progress_connection;
152 
153  float previous_progress; // Needed for gtk bug workaround
154 
157 
158  void soundcloud_upload_progress(double total, double now, std::string title);
159 
160  /* Buttons */
161 
165 
166 };
167 
169 {
170  public:
172 
173  private:
175 
176  std::string range_id;
177 };
178 
180 {
181  public:
183 
184  private:
186 };
187 
189 {
190  public:
192 
193  private:
194  void init_gui ();
196 
199 };
200 
202 {
203  public:
205 
206  private:
208 };
209 
210 #endif /* __ardour_export_dialog_h__ */
Gtk::Label list_files_label
void do_export(bool analysis_only)
sigc::connection progress_connection
std::string list_files_string
void on_response(int response_id)
This is a default handler for the signal signal_response().
Definition: export_dialog.h:75
Gtk::VBox warning_widget
Definition: export_dialog.h:99
std::string warn_string
ARDOUR::ExportProfileManager::ExportType type
Definition: export_dialog.h:82
Gtk::Button * cancel_button
Gtk::Notebook export_notebook
ReImportMap _files_to_reimport
gint progress_timeout()
void notify_errors(bool force=false)
HandlerPtr handler
Definition: export_dialog.h:83
void show_conflicting_files()
void show_progress()
void update_warnings_and_example_filename()
boost::scoped_ptr< ExportPresetSelector > preset_selector
Definition: export_dialog.h:92
Gtk::Label warn_label
Gtk::Button list_files_button
void set_session(ARDOUR::Session *s)
float previous_progress
void close_dialog()
PublicEditor & editor
void parameter_changed(std::string const &)
void add_error(std::string const &text)
Gtk::ProgressBar progress_bar
virtual void init_gui()
Gtk::Button * export_button
std::shared_ptr< ARDOUR::ExportHandler > HandlerPtr
Definition: export_dialog.h:79
Gtk::VBox progress_widget
boost::scoped_ptr< ExportTimespanSelector > timespan_selector
Definition: export_dialog.h:93
ManagerPtr profile_manager
Definition: export_dialog.h:84
boost::scoped_ptr< ExportFileNotebook > file_notebook
Definition: export_dialog.h:95
void sync_with_manager()
StatusPtr status
void add_warning(std::string const &text)
Gtk::HBox warn_hbox
ExportDialog(PublicEditor &editor, std::string title, ARDOUR::ExportProfileManager::ExportType type)
void update_realtime_selection()
void soundcloud_upload_progress(double total, double now, std::string title)
Gtk::Button * analyze_button
std::map< samplepos_t, std::vector< std::string > > ReImportMap
virtual void init_components()
boost::scoped_ptr< ExportChannelSelector > channel_selector
Definition: export_dialog.h:94
void maybe_set_session_dirty()
std::shared_ptr< ARDOUR::ExportProfileManager > ManagerPtr
Definition: export_dialog.h:80
std::shared_ptr< SoundcloudExportSelector > soundcloud_selector
Definition: export_dialog.h:97
Gtk::HBox list_files_hbox
std::shared_ptr< ARDOUR::ExportStatus > StatusPtr
ExportRangeDialog(PublicEditor &editor, std::string range_id)
std::string range_id
ARDOUR::AudioTrack & track
ExportRegionDialog(PublicEditor &editor, ARDOUR::AudioRegion const &region, ARDOUR::AudioTrack &track)
ARDOUR::AudioRegion const & region
ExportSelectionDialog(PublicEditor &editor)
Timespan Selector base.
virtual void on_response(int response_id)
This is a default handler for the signal signal_response().
Representation of the interface of the Editor class.
void init_components()
StemExportDialog(PublicEditor &editor)