2008-09-29 13:01:52 -04:00
|
|
|
/*
|
2019-08-02 17:26:43 -04:00
|
|
|
* Copyright (C) 2008-2012 Sakari Bergen <sakari.bergen@beatwaves.net>
|
|
|
|
* Copyright (C) 2009-2010 Paul Davis <paul@linuxaudiosystems.com>
|
|
|
|
* Copyright (C) 2009 David Robillard <d@drobilla.net>
|
|
|
|
* Copyright (C) 2014 Colin Fletcher <colin.m.fletcher@googlemail.com>
|
|
|
|
* Copyright (C) 2016-2019 Robin Gareus <robin@gareus.org>
|
|
|
|
* Copyright (C) 2016 Tim Mayberry <mojofunk@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
2008-09-29 13:01:52 -04:00
|
|
|
|
|
|
|
#ifndef __export_file_notebook_h__
|
|
|
|
#define __export_file_notebook_h__
|
|
|
|
|
|
|
|
#include <sigc++/signal.h>
|
2017-07-16 21:48:18 -04:00
|
|
|
|
|
|
|
#include <gtkmm/alignment.h>
|
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/checkbutton.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/notebook.h>
|
2008-09-29 13:01:52 -04:00
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/export_profile_manager.h"
|
2009-12-17 13:24:23 -05:00
|
|
|
#include "ardour/session_handle.h"
|
2008-09-29 13:01:52 -04:00
|
|
|
|
|
|
|
#include "export_format_selector.h"
|
|
|
|
#include "export_filename_selector.h"
|
2014-05-31 09:47:11 -04:00
|
|
|
#include "soundcloud_export_selector.h"
|
2008-09-29 13:01:52 -04:00
|
|
|
|
2009-12-17 13:24:23 -05:00
|
|
|
class ExportFileNotebook : public Gtk::Notebook, public ARDOUR::SessionHandlePtr
|
2008-09-29 13:01:52 -04:00
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
ExportFileNotebook ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
void set_session_and_manager (ARDOUR::Session * s, boost::shared_ptr<ARDOUR::ExportProfileManager> manager);
|
|
|
|
void sync_with_manager ();
|
2012-01-29 15:55:44 -05:00
|
|
|
void update_example_filenames();
|
|
|
|
|
2014-05-31 09:47:11 -04:00
|
|
|
boost::shared_ptr<SoundcloudExportSelector> soundcloud_export_selector;
|
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
sigc::signal<void> CriticalSelectionChanged;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2008-09-29 13:01:52 -04:00
|
|
|
|
|
|
|
typedef boost::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
|
|
|
|
typedef boost::shared_ptr<ARDOUR::ExportFormatSpecification> FormatPtr;
|
|
|
|
typedef boost::shared_ptr<ARDOUR::ExportFilename> FilenamePtr;
|
|
|
|
class FilePage;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
ManagerPtr profile_manager;
|
|
|
|
|
|
|
|
void add_new_file_page ();
|
|
|
|
void add_file_page (ARDOUR::ExportProfileManager::FormatStatePtr format_state, ARDOUR::ExportProfileManager::FilenameStatePtr filename_state);
|
|
|
|
void remove_file_page (FilePage * page);
|
|
|
|
void update_remove_file_page_sensitivity ();
|
2014-05-27 06:23:47 -04:00
|
|
|
void update_soundcloud_upload ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
sigc::connection page_change_connection;
|
|
|
|
void handle_page_change (GtkNotebookPage*, uint32_t page);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
Gtk::HBox new_file_hbox;
|
|
|
|
Gtk::Button new_file_button;
|
|
|
|
Gtk::VBox new_file_dummy;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
uint32_t last_visible_page;
|
|
|
|
uint32_t page_counter;
|
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
class FilePage : public Gtk::VBox
|
|
|
|
{
|
|
|
|
public:
|
2009-10-14 12:10:01 -04:00
|
|
|
FilePage (ARDOUR::Session * s, ManagerPtr profile_manager, ExportFileNotebook * parent, uint32_t number,
|
2008-09-29 13:01:52 -04:00
|
|
|
ARDOUR::ExportProfileManager::FormatStatePtr format_state,
|
|
|
|
ARDOUR::ExportProfileManager::FilenameStatePtr filename_state);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
virtual ~FilePage ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
Gtk::Widget & get_tab_widget () { return tab_widget; }
|
|
|
|
void set_remove_sensitive (bool value);
|
2010-09-14 12:51:02 -04:00
|
|
|
std::string get_format_name () const;
|
2014-05-23 13:14:37 -04:00
|
|
|
bool get_soundcloud_upload () const;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2012-01-29 15:55:44 -05:00
|
|
|
void update_example_filename();
|
|
|
|
|
2016-09-14 06:00:29 -04:00
|
|
|
void update_analysis_button ();
|
|
|
|
void update_soundcloud_upload_button ();
|
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
ARDOUR::ExportProfileManager::FormatStatePtr get_format_state () const { return format_state; }
|
|
|
|
ARDOUR::ExportProfileManager::FilenameStatePtr get_filename_state () const { return filename_state; }
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
sigc::signal<void> CriticalSelectionChanged;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2008-09-29 13:01:52 -04:00
|
|
|
void save_format_to_manager (FormatPtr format);
|
|
|
|
void update_tab_label ();
|
2012-01-29 15:55:44 -05:00
|
|
|
void critical_selection_changed ();
|
2016-02-10 15:28:43 -05:00
|
|
|
void analysis_changed ();
|
2016-09-14 06:00:29 -04:00
|
|
|
void soundcloud_upload_changed ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
ARDOUR::ExportProfileManager::FormatStatePtr format_state;
|
|
|
|
ARDOUR::ExportProfileManager::FilenameStatePtr filename_state;
|
|
|
|
ManagerPtr profile_manager;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
/* GUI components */
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
Gtk::Label format_label;
|
|
|
|
Gtk::Alignment format_align;
|
|
|
|
ExportFormatSelector format_selector;
|
2009-12-19 15:26:31 -05:00
|
|
|
PBD::ScopedConnection format_connection;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
Gtk::Label filename_label;
|
|
|
|
Gtk::Alignment filename_align;
|
|
|
|
ExportFilenameSelector filename_selector;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2016-02-10 15:28:43 -05:00
|
|
|
Gtk::CheckButton soundcloud_upload_button;
|
|
|
|
Gtk::CheckButton analysis_button;
|
2008-09-29 13:01:52 -04:00
|
|
|
Gtk::HBox tab_widget;
|
|
|
|
Gtk::Label tab_label;
|
|
|
|
Gtk::Alignment tab_close_alignment;
|
|
|
|
Gtk::Button tab_close_button;
|
2019-02-26 13:57:02 -05:00
|
|
|
|
2008-09-29 13:01:52 -04:00
|
|
|
uint32_t tab_number;
|
2019-02-26 13:57:02 -05:00
|
|
|
|
|
|
|
sigc::connection soundcloud_button_connection;
|
|
|
|
sigc::connection analysis_button_connection;
|
2008-09-29 13:01:52 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|