2008-09-17 08:56:00 -04:00
|
|
|
/*
|
|
|
|
Copyright (C) 2008 Paul Davis
|
|
|
|
Author: Sakari Bergen
|
|
|
|
|
|
|
|
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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __export_filename_selector_h__
|
|
|
|
#define __export_filename_selector_h__
|
|
|
|
|
2017-07-16 21:48:18 -04:00
|
|
|
#include <gtkmm/box.h>
|
|
|
|
#include <gtkmm/button.h>
|
|
|
|
#include <gtkmm/checkbutton.h>
|
|
|
|
#include <gtkmm/combobox.h>
|
|
|
|
#include <gtkmm/comboboxtext.h>
|
|
|
|
#include <gtkmm/entry.h>
|
|
|
|
#include <gtkmm/label.h>
|
|
|
|
#include <gtkmm/liststore.h>
|
|
|
|
#include <gtkmm/sizegroup.h>
|
|
|
|
#include <gtkmm/spinbutton.h>
|
|
|
|
#include <gtkmm/treemodel.h>
|
2008-09-17 08:56:00 -04:00
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/export_profile_manager.h"
|
|
|
|
#include "ardour/export_filename.h"
|
2009-12-17 13:24:23 -05:00
|
|
|
#include "ardour/session_handle.h"
|
2008-09-17 08:56:00 -04:00
|
|
|
|
2011-06-01 13:00:29 -04:00
|
|
|
class ExportFilenameSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr
|
2009-12-17 13:24:23 -05:00
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2008-09-17 08:56:00 -04:00
|
|
|
typedef boost::shared_ptr<ARDOUR::ExportFilename> FilenamePtr;
|
|
|
|
|
|
|
|
ExportFilenameSelector ();
|
|
|
|
~ExportFilenameSelector ();
|
|
|
|
|
|
|
|
void set_state (ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session * session_);
|
2012-01-29 15:55:44 -05:00
|
|
|
void set_example_filename (std::string filename);
|
2016-02-11 14:53:32 -05:00
|
|
|
void require_timespan (bool);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
/* Compatibility with other elements */
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
sigc::signal<void> CriticalSelectionChanged;
|
|
|
|
|
2017-07-01 15:11:14 -04:00
|
|
|
private:
|
2008-09-17 08:56:00 -04:00
|
|
|
|
|
|
|
void load_state ();
|
|
|
|
|
|
|
|
void update_label ();
|
|
|
|
void update_folder ();
|
2011-12-06 22:22:35 -05:00
|
|
|
void check_folder ();
|
2008-09-17 08:56:00 -04:00
|
|
|
|
|
|
|
void change_date_format ();
|
|
|
|
void change_time_format ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
void change_session_selection ();
|
2016-02-11 14:53:32 -05:00
|
|
|
void change_timespan_selection ();
|
2008-09-17 08:56:00 -04:00
|
|
|
void change_revision_selection ();
|
|
|
|
void change_revision_value ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
void open_browse_dialog ();
|
2016-06-01 17:54:54 -04:00
|
|
|
void open_folder ();
|
2008-09-17 08:56:00 -04:00
|
|
|
|
|
|
|
boost::shared_ptr<ARDOUR::ExportFilename> filename;
|
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::SizeGroup> label_sizegroup;
|
|
|
|
|
|
|
|
Gtk::Label include_label;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
Gtk::HBox include_hbox;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
Gtk::Label label_label;
|
|
|
|
Gtk::Entry label_entry;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2017-02-02 06:44:08 -05:00
|
|
|
Gtk::ComboBoxText session_snap_name;
|
2016-02-11 14:53:32 -05:00
|
|
|
Gtk::CheckButton timespan_checkbox;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
Gtk::CheckButton revision_checkbox;
|
|
|
|
Gtk::SpinButton revision_spinbutton;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
Gtk::HBox path_hbox;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
Gtk::Label path_label;
|
|
|
|
Gtk::Entry path_entry;
|
|
|
|
Gtk::Button browse_button;
|
2016-06-01 17:54:54 -04:00
|
|
|
Gtk::Button open_button;
|
2016-06-02 17:50:16 -04:00
|
|
|
Gtk::Label example_filename_label;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
/* Date combo */
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
typedef ARDOUR::ExportFilename::DateFormat DateFormat;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
struct DateFormatCols : public Gtk::TreeModelColumnRecord
|
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2008-09-17 08:56:00 -04:00
|
|
|
Gtk::TreeModelColumn<DateFormat> format;
|
2010-09-14 12:51:02 -04:00
|
|
|
Gtk::TreeModelColumn<std::string> label;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
DateFormatCols () { add(format); add(label); }
|
|
|
|
};
|
|
|
|
DateFormatCols date_format_cols;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> date_format_list;
|
|
|
|
Gtk::ComboBox date_format_combo;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
/* Time combo */
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
typedef ARDOUR::ExportFilename::TimeFormat TimeFormat;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
struct TimeFormatCols : public Gtk::TreeModelColumnRecord
|
|
|
|
{
|
2017-07-01 15:11:14 -04:00
|
|
|
public:
|
2008-09-17 08:56:00 -04:00
|
|
|
Gtk::TreeModelColumn<TimeFormat> format;
|
2010-09-14 12:51:02 -04:00
|
|
|
Gtk::TreeModelColumn<std::string> label;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2008-09-17 08:56:00 -04:00
|
|
|
TimeFormatCols () { add(format); add(label); }
|
|
|
|
};
|
|
|
|
TimeFormatCols time_format_cols;
|
|
|
|
Glib::RefPtr<Gtk::ListStore> time_format_list;
|
|
|
|
Gtk::ComboBox time_format_combo;
|
|
|
|
|
2016-02-11 14:53:32 -05:00
|
|
|
/* timespan logic */
|
|
|
|
void update_timespan_sensitivity ();
|
|
|
|
bool _require_timespan;
|
2008-09-17 08:56:00 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* __export_filename_selector_h__ */
|