46 time_format_label (
_(
"Show Times as:"),
Gtk::ALIGN_LEFT)
53 Gtk::Button* b = Gtk::manage (
new Gtk::Button (
_(
"Select All")));
54 b->signal_clicked().connect (
61 b = Gtk::manage (
new Gtk::Button (
_(
"Deselect All")));
62 b->signal_clicked().connect (
76 Gtk::TreeModel::iterator iter;
77 Gtk::TreeModel::Row row;
142 if (loc ==
state->selection_range.
get()) {
148 span->set_range (loc->
start(), loc->
end());
149 span->set_name (loc->
name());
150 span->set_range_id (
id);
151 state->timespans->push_back (span);
157 Gtk::TreeModel::Children::iterator tree_it;
178 for (Gtk::ListStore::Children::iterator it =
range_list->children().begin(); it !=
range_list->children().end(); ++it) {
195 switch (
state->time_format) {
207 start =
ms_str (start_frame);
212 start =
to_string (start_frame, std::dec);
235 if (location->
length() == 0) {
241 switch (
state->time_format) {
274 std::ostringstream oss;
275 Timecode::BBT_Time time;
278 print_padded (oss, time);
289 std::ostringstream oss;
294 oss << std::setfill(
'0') << std::right <<
298 time.minutes <<
":" <<
300 time.seconds <<
":" <<
314 std::ostringstream oss;
330 oss << std::setfill(
'0') << std::right <<
346 Gtk::TreeStore::iterator it =
range_list->get_iter (path);
355 for (Gtk::ListStore::Children::iterator it =
range_list->children().begin(); it !=
range_list->children().end(); ++it) {
369 if (Gtk::CellRendererText * renderer = dynamic_cast<Gtk::CellRendererText *> (
range_view.get_column_cell_renderer (0))) {
373 Gtk::CellRendererText * label_render = Gtk::manage (
new Gtk::CellRendererText());
374 Gtk::TreeView::Column * label_col = Gtk::manage (
new Gtk::TreeView::Column (
_(
"Time Span"), *label_render));
375 label_col->add_attribute (label_render->property_markup(),
range_cols.
label);
384 if (!
state) {
return; }
388 id =
state->selection_range->id().to_s();
394 state->timespans->clear();
396 Gtk::TreeModel::iterator iter;
397 Gtk::TreeModel::Row row;
398 for (LocationList::const_iterator it =
state->ranges->begin(); it !=
state->ranges->end(); ++it) {
400 if (!(*it)->id().to_s().compare (
id)) {
424 range_scroller.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
428 if (Gtk::CellRendererToggle * renderer = dynamic_cast<Gtk::CellRendererToggle *> (
range_view.get_column_cell_renderer (0))) {
431 if (Gtk::CellRendererText * renderer = dynamic_cast<Gtk::CellRendererText *> (
range_view.get_column_cell_renderer (1))) {
435 Gtk::CellRendererText * label_render = Gtk::manage (
new Gtk::CellRendererText());
436 Gtk::TreeView::Column * label_col = Gtk::manage (
new Gtk::TreeView::Column (
_(
"Time Span"), *label_render));
437 label_col->add_attribute (label_render->property_markup(),
range_cols.
label);
446 if (!
state) {
return; }
450 Gtk::TreeModel::iterator iter;
451 Gtk::TreeModel::Row row;
452 for (LocationList::const_iterator it =
state->ranges->begin(); it !=
state->ranges->end(); ++it) {
470 Gtk::TreeModel::Children::iterator tree_it;
472 for (TimespanList::iterator it =
state->timespans->begin(); it !=
state->timespans->end(); ++it) {
473 string id = (*it)->range_id();
474 for (tree_it =
range_list->children().begin(); tree_it !=
range_list->children().end(); ++tree_it) {
477 if ((
id ==
"selection" && loc ==
state->selection_range.
get()) ||
478 (
id == loc->
id().
to_s())) {
497 state->timespans->clear();
499 for (Gtk::TreeStore::Children::iterator it =
range_list->children().begin(); it !=
range_list->children().end(); ++it) {
std::string to_string(T t, std::ios_base &(*f)(std::ios_base &))
void timecode_duration(framecnt_t, Timecode::Time &) const
Gtk::ScrolledWindow range_scroller
virtual ~ExportTimespanSelector()
std::string ms_str(framecnt_t frames) const
ExportTimespanPtr add_timespan()
Gtk::Label time_format_label
Gtk::TreeModelColumn< std::string > length
Gtk::TreeModelColumn< std::string > label
Gtk::TreeModelColumn< std::string > name
LIBARDOUR_API PBD::PropertyDescriptor< framepos_t > start
std::string bbt_str(framepos_t frames) const
framecnt_t frame_rate() const
ExportTimespanSelector(ARDOUR::Session *session, ProfileManagerPtr manager)
Location * session_range_location() const
boost::shared_ptr< ExportHandler > get_export_handler()
virtual void fill_range_list()
void set_selection_state_of_all_timespans(bool)
TimespanStateList const & get_timespans()
void update_range_name(std::string const &path, std::string const &new_text)
void add_range_to_selection(ARDOUR::Location const *loc)
void set_selection_from_state()
const PBD::ID & id() const
ProfileManagerPtr manager
std::string construct_label(ARDOUR::Location const *location) const
Glib::RefPtr< Gtk::ListStore > time_format_list
int location_sorter(Gtk::TreeModel::iterator a, Gtk::TreeModel::iterator b)
virtual void fill_range_list()=0
ExportTimespanSelectorMultiple(ARDOUR::Session *session, ProfileManagerPtr manager)
Gtk::ComboBox time_format_combo
std::string timecode_str(framecnt_t frames) const
void change_time_format()
ExportTimespanSelectorSingle(ARDOUR::Session *session, ProfileManagerPtr manager, std::string range_id)
TimeFormatCols time_format_cols
const std::string & name() const
void set_time_format_from_state()
Gtk::TreeModelColumn< bool > selected
framecnt_t length() const
Glib::RefPtr< Gtk::ListStore > range_list
Gtk::TreeModelColumn< ARDOUR::Location * > location
virtual void set_session(ARDOUR::Session *)
void timecode_time(Timecode::Time &)
std::string construct_length(ARDOUR::Location const *location) const
sigc::signal< void > CriticalSelectionChanged
void bbt_time(framepos_t when, Timecode::BBT_Time &)
ARDOUR::Session * _session
virtual void fill_range_list()