ardour
export_filename_selector.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_filename_selector_h__
22 #define __export_filename_selector_h__
23 
24 #include <gtkmm.h>
25 
27 #include "ardour/export_filename.h"
28 #include "ardour/session_handle.h"
29 
31 class ExportFilenameSelector : public Gtk::VBox, public ARDOUR::SessionHandlePtr
32 {
33  public:
35 
38 
40  void set_example_filename (std::string filename);
41 
42  /* Compatibility with other elements */
43 
44  sigc::signal<void> CriticalSelectionChanged;
45 
46  private:
47 
48  void load_state ();
49 
50  void update_label ();
51  void update_folder ();
52  void check_folder ();
53 
54  void change_date_format ();
55  void change_time_format ();
56 
59  void change_revision_value ();
60 
61  void open_browse_dialog ();
62 
64 
65  Glib::RefPtr<Gtk::SizeGroup> label_sizegroup;
66 
67  Gtk::Label include_label;
68 
69  Gtk::HBox include_hbox;
70 
71  Gtk::Label label_label;
72  Gtk::Entry label_entry;
73 
74  Gtk::CheckButton session_checkbox;
75 
76  Gtk::CheckButton revision_checkbox;
77  Gtk::SpinButton revision_spinbutton;
78 
79  Gtk::HBox path_hbox;
80 
81  Gtk::Label path_label;
82  Gtk::Entry path_entry;
83  Gtk::Button browse_button;
85 
86  /* Date combo */
87 
89 
90  struct DateFormatCols : public Gtk::TreeModelColumnRecord
91  {
92  public:
93  Gtk::TreeModelColumn<DateFormat> format;
94  Gtk::TreeModelColumn<std::string> label;
95 
96  DateFormatCols () { add(format); add(label); }
97  };
99  Glib::RefPtr<Gtk::ListStore> date_format_list;
100  Gtk::ComboBox date_format_combo;
101 
102  /* Time combo */
103 
105 
106  struct TimeFormatCols : public Gtk::TreeModelColumnRecord
107  {
108  public:
109  Gtk::TreeModelColumn<TimeFormat> format;
110  Gtk::TreeModelColumn<std::string> label;
111 
112  TimeFormatCols () { add(format); add(label); }
113  };
115  Glib::RefPtr<Gtk::ListStore> time_format_list;
116  Gtk::ComboBox time_format_combo;
117 
118 };
119 
120 #endif /* __export_filename_selector_h__ */
Glib::RefPtr< Gtk::ListStore > time_format_list
ARDOUR::ExportFilename::TimeFormat TimeFormat
ARDOUR::ExportFilename::DateFormat DateFormat
Gtk::TreeModelColumn< std::string > label
boost::shared_ptr< ARDOUR::ExportFilename > filename
void set_state(ARDOUR::ExportProfileManager::FilenameStatePtr state_, ARDOUR::Session *session_)
Glib::RefPtr< Gtk::ListStore > date_format_list
void set_example_filename(std::string filename)
Glib::RefPtr< Gtk::SizeGroup > label_sizegroup
Gtk::TreeModelColumn< std::string > label
Gtk::TreeModelColumn< TimeFormat > format
boost::shared_ptr< ARDOUR::ExportFilename > FilenamePtr
sigc::signal< void > CriticalSelectionChanged
Gtk::TreeModelColumn< DateFormat > format