2006-03-05 14:45:12 -05:00
|
|
|
/*
|
|
|
|
Copyright (C) 2006 Andre Raue
|
|
|
|
|
|
|
|
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_range_markers_dialog_h__
|
|
|
|
#define __export_range_markers_dialog_h__
|
|
|
|
|
2009-02-25 13:26:51 -05:00
|
|
|
#include "ardour/location.h"
|
2006-03-05 14:45:12 -05:00
|
|
|
|
|
|
|
#include "export_dialog.h"
|
|
|
|
|
|
|
|
|
2009-10-14 12:10:01 -04:00
|
|
|
class ExportRangeMarkersDialog : public ExportDialog
|
2006-03-05 14:45:12 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
ExportRangeMarkersDialog (PublicEditor&);
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2007-03-05 10:34:56 -05:00
|
|
|
Gtk::FileChooserAction browse_action() const;
|
|
|
|
|
2006-03-05 14:45:12 -05:00
|
|
|
protected:
|
|
|
|
virtual bool is_filepath_valid(string &filepath);
|
|
|
|
|
2008-02-19 17:10:27 -05:00
|
|
|
void export_data();
|
2007-01-31 13:51:33 -05:00
|
|
|
|
|
|
|
bool wants_dir() { return true; }
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-05 14:45:12 -05:00
|
|
|
private:
|
|
|
|
// keeps the duration of all range_markers before the current
|
2006-09-28 13:23:52 -04:00
|
|
|
vector<nframes_t> range_markers_durations_aggregated;
|
|
|
|
vector<nframes_t> range_markers_durations;
|
2006-03-05 14:45:12 -05:00
|
|
|
// duration of all range markers
|
2006-09-28 13:23:52 -04:00
|
|
|
nframes_t total_duration;
|
2006-03-05 14:45:12 -05:00
|
|
|
// index of range marker, that get's exported right now
|
|
|
|
unsigned int current_range_marker_index;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-05 14:45:12 -05:00
|
|
|
// sets value of progress bar
|
|
|
|
virtual gint progress_timeout ();
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2006-03-05 14:45:12 -05:00
|
|
|
// initializes range_markers_durations_aggregated, range_markers_durations
|
|
|
|
// and total_duration
|
|
|
|
void init_progress_computing(ARDOUR::Locations::LocationList& locations);
|
|
|
|
|
2009-10-14 12:10:01 -04:00
|
|
|
// searches for a filename like "<filename><nr>.<postfix>" in path, that
|
2006-03-05 14:45:12 -05:00
|
|
|
// does not exist
|
|
|
|
string get_target_filepath(string path, string filename, string postfix);
|
|
|
|
|
|
|
|
void process_range_markers_export(ARDOUR::Locations::LocationList&);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // __export_range_markers_dialog_h__
|