X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fexport_format_manager.h;h=f82230b8c393b16e7080e6ab84ba7393dabc3b7e;hb=ba0458cf1f6c69366e89631d8fff916ad183d768;hp=4cf68edaa8a984d8cd8ee562b94d2381540ddce7;hpb=e0aaed6d65f160c328cb8b56d7c6552ee15d65e2;p=ardour.git diff --git a/libs/ardour/ardour/export_format_manager.h b/libs/ardour/ardour/export_format_manager.h index 4cf68edaa8..f82230b8c3 100644 --- a/libs/ardour/ardour/export_format_manager.h +++ b/libs/ardour/ardour/export_format_manager.h @@ -26,12 +26,10 @@ #include #include -#include -#include -#include "ardour/export_formats.h" +#include "pbd/signals.h" -using std::string; +#include "ardour/export_formats.h" namespace ARDOUR { @@ -41,46 +39,46 @@ class ExportFormatCompatibility; class ExportFormatSpecification; class AnyTime; -class ExportFormatManager : public sigc::trackable +class ExportFormatManager : public PBD::ScopedConnectionList { public: typedef boost::shared_ptr CompatPtr; typedef boost::weak_ptr WeakCompatPtr; typedef std::list CompatList; - + typedef boost::shared_ptr FormatPtr; typedef boost::weak_ptr WeakFormatPtr; typedef std::list FormatList; - + typedef HasSampleFormat::SampleFormatPtr SampleFormatPtr; typedef HasSampleFormat::SampleFormatList SampleFormatList; typedef HasSampleFormat::WeakSampleFormatPtr WeakSampleFormatPtr; - + typedef HasSampleFormat::DitherTypePtr DitherTypePtr; typedef HasSampleFormat::WeakDitherTypePtr WeakDitherTypePtr; - + typedef boost::shared_ptr SpecPtr; typedef boost::shared_ptr FormatBasePtr; - + /* Quality states */ - + class QualityState : public ExportFormatBase::SelectableCompatible { - public: - QualityState (ExportFormatBase::Quality quality, Glib::ustring name) : - quality (quality) { set_name (name); } + public: + QualityState (ExportFormatBase::Quality quality, std::string name) : + quality (quality) { set_name (name); } ExportFormatBase::Quality quality; }; typedef boost::shared_ptr QualityPtr; typedef boost::weak_ptr WeakQualityPtr; typedef std::list QualityList; - + /* Sample rate states */ - + class SampleRateState : public ExportFormatBase::SelectableCompatible { public: - SampleRateState (ExportFormatBase::SampleRate rate, Glib::ustring name) : - rate (rate) { set_name (name); } + SampleRateState (ExportFormatBase::SampleRate rate, std::string name) + : rate (rate) { set_name (name); } ExportFormatBase::SampleRate rate; }; typedef boost::shared_ptr SampleRatePtr; @@ -94,7 +92,7 @@ class ExportFormatManager : public sigc::trackable /* Signals */ - sigc::signal CompleteChanged; + PBD::Signal1 CompleteChanged; /* Access to lists */ @@ -102,11 +100,11 @@ class ExportFormatManager : public sigc::trackable QualityList const & get_qualities () { return qualities; } FormatList const & get_formats () { return formats; } SampleRateList const & get_sample_rates () { return sample_rates; } - + /* Non interactive selections */ - - void set_name (Glib::ustring name); - + + void set_name (std::string name); + void select_src_quality (ExportFormatBase::SRCQuality value); void select_trim_beginning (bool value); void select_silence_beginning (AnyTime const & time); @@ -129,41 +127,41 @@ class ExportFormatManager : public sigc::trackable void add_sample_rate (SampleRatePtr ptr); /* Connected to signals */ - + void change_compatibility_selection (bool select, WeakCompatPtr const & compat); void change_quality_selection (bool select, WeakQualityPtr const & quality); void change_format_selection (bool select, WeakFormatPtr const & format); void change_sample_rate_selection (bool select, WeakSampleRatePtr const & rate); - + void change_sample_format_selection (bool select, WeakSampleFormatPtr const & format); void change_dither_type_selection (bool select, WeakDitherTypePtr const & type); - + /* Do actual selection */ - + void select_compatibility (WeakCompatPtr const & compat); void select_quality (QualityPtr const & quality); void select_format (FormatPtr const & format); void select_sample_rate (SampleRatePtr const & rate); - + void select_sample_format (SampleFormatPtr const & format); void select_dither_type (DitherTypePtr const & type); - + bool pending_selection_change; void selection_changed (); - + /* Formats and compatibilities */ - + QualityPtr get_selected_quality (); FormatPtr get_selected_format (); SampleRatePtr get_selected_sample_rate (); - + SampleFormatPtr get_selected_sample_format (); - + FormatBasePtr get_compatibility_intersection (); - + FormatBasePtr universal_set; SpecPtr current_selection; - + CompatList compatibilities; QualityList qualities; FormatList formats;