Ardour  8.12
export_preset_selector.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2011 Sakari Bergen <sakari.bergen@beatwaves.net>
3  * Copyright (C) 2009 David Robillard <d@drobilla.net>
4  * Copyright (C) 2017 Robin Gareus <robin@gareus.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this program; if not, write to the Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19  */
20 
21 #ifndef __export_preset_selector_h__
22 #define __export_preset_selector_h__
23 
24 #include <sigc++/signal.h>
25 
26 #include <gtkmm/box.h>
27 #include <gtkmm/button.h>
28 #include <gtkmm/comboboxtext.h>
29 #include <gtkmm/label.h>
30 #include <gtkmm/liststore.h>
31 #include <gtkmm/treemodel.h>
32 
34 
36 {
37 public:
38  ExportPresetSelector (bool readonly = false);
39 
40  void set_manager (std::shared_ptr<ARDOUR::ExportProfileManager> manager);
41 
42  sigc::signal<void> CriticalSelectionChanged;
43 
44  Gtk::ComboBox& the_combo () { return combo; }
45 
46 private:
47  typedef std::shared_ptr<ARDOUR::ExportProfileManager> ManagerPtr;
50 
53  void create_new ();
54  void save_current ();
55  void remove_current ();
57 
59 
61  public:
64 
66  {
67  add (label);
68  add (preset);
69  }
70  };
71 
73  Glib::RefPtr<Gtk::ListStore> list;
76 
79 
83 
84  sigc::connection select_connection;
85 };
86 
87 #endif
std::list< ExportPresetPtr > PresetList
Glib::RefPtr< Gtk::ListStore > list
ARDOUR::ExportProfileManager::PresetList PresetList
ARDOUR::ExportPresetPtr PresetPtr
void set_manager(std::shared_ptr< ARDOUR::ExportProfileManager > manager)
ExportPresetSelector(bool readonly=false)
std::shared_ptr< ARDOUR::ExportProfileManager > ManagerPtr
sigc::signal< void > CriticalSelectionChanged
sigc::connection select_connection
Gtk::ComboBox & the_combo()
void add(TreeModelColumnBase &column)
std::shared_ptr< ExportPreset > ExportPresetPtr
Gtk::TreeModelColumn< PresetPtr > preset
Gtk::TreeModelColumn< std::string > label