ardour
export_file_notebook.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 Paul Davis
3  Author: Sakari Bergen
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 
19 */
20 
21 #ifndef __export_file_notebook_h__
22 #define __export_file_notebook_h__
23 
24 #include <sigc++/signal.h>
25 #include <gtkmm.h>
26 
28 #include "ardour/session_handle.h"
29 
30 #include "export_format_selector.h"
33 
34 class ExportFileNotebook : public Gtk::Notebook, public ARDOUR::SessionHandlePtr
35 {
36  public:
37 
39 
41  void sync_with_manager ();
43 
45 
46  sigc::signal<void> CriticalSelectionChanged;
47 
48  private:
49 
53  class FilePage;
54 
55  ManagerPtr profile_manager;
56 
57  void add_new_file_page ();
59  void remove_file_page (FilePage * page);
62 
63  sigc::connection page_change_connection;
64  void handle_page_change (GtkNotebookPage*, uint32_t page);
65 
66  Gtk::HBox new_file_hbox;
67  Gtk::Button new_file_button;
68  Gtk::VBox new_file_dummy;
69 
71  uint32_t page_counter;
72 
73  class FilePage : public Gtk::VBox {
74  public:
75  FilePage (ARDOUR::Session * s, ManagerPtr profile_manager, ExportFileNotebook * parent, uint32_t number,
78 
79  virtual ~FilePage ();
80 
81  Gtk::Widget & get_tab_widget () { return tab_widget; }
82  void set_remove_sensitive (bool value);
83  std::string get_format_name () const;
84  bool get_soundcloud_upload () const;
85 
87 
90 
91  sigc::signal<void> CriticalSelectionChanged;
92 
93  private:
94  void save_format_to_manager (FormatPtr format);
95  void update_tab_label ();
97 
100  ManagerPtr profile_manager;
101 
102  /* GUI components */
103 
104  Gtk::Label format_label;
105  Gtk::Alignment format_align;
108 
109  Gtk::Label filename_label;
110  Gtk::Alignment filename_align;
112 
113  Gtk::CheckButton soundcloud_upload_button;
114  Gtk::HBox tab_widget;
115  Gtk::Label tab_label;
116  Gtk::Alignment tab_close_alignment;
117  Gtk::Button tab_close_button;
118  uint32_t tab_number;
119  };
120 };
121 
122 #endif
FilePage(ARDOUR::Session *s, ManagerPtr profile_manager, ExportFileNotebook *parent, uint32_t number, ARDOUR::ExportProfileManager::FormatStatePtr format_state, ARDOUR::ExportProfileManager::FilenameStatePtr filename_state)
void remove_file_page(FilePage *page)
ARDOUR::ExportProfileManager::FilenameStatePtr get_filename_state() const
sigc::signal< void > CriticalSelectionChanged
void save_format_to_manager(FormatPtr format)
void set_session_and_manager(ARDOUR::Session *s, boost::shared_ptr< ARDOUR::ExportProfileManager > manager)
ARDOUR::ExportProfileManager::FormatStatePtr get_format_state() const
ARDOUR::ExportProfileManager::FormatStatePtr format_state
boost::shared_ptr< SoundcloudExportSelector > soundcloud_export_selector
std::string get_format_name() const
ARDOUR::ExportProfileManager::FilenameStatePtr filename_state
void handle_page_change(GtkNotebookPage *, uint32_t page)
void add_file_page(ARDOUR::ExportProfileManager::FormatStatePtr format_state, ARDOUR::ExportProfileManager::FilenameStatePtr filename_state)
boost::shared_ptr< ARDOUR::ExportFilename > FilenamePtr
sigc::connection page_change_connection
boost::shared_ptr< ARDOUR::ExportFormatSpecification > FormatPtr
ExportFormatSelector format_selector
sigc::signal< void > CriticalSelectionChanged
boost::shared_ptr< ARDOUR::ExportProfileManager > ManagerPtr
PBD::ScopedConnection format_connection
ExportFilenameSelector filename_selector