fix up file renaming code a little bit
[ArdourMidi.git] / gtk2_ardour / export_range_markers_dialog.h
blobb0a29b5dc291e737acde9a06fd1756e756ed7ec5
1 /*
2 Copyright (C) 2006 Andre Raue
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __export_range_markers_dialog_h__
21 #define __export_range_markers_dialog_h__
23 #include "ardour/location.h"
25 #include "export_dialog.h"
28 class ExportRangeMarkersDialog : public ExportDialog
30 public:
31 ExportRangeMarkersDialog (PublicEditor&);
33 Gtk::FileChooserAction browse_action() const;
35 protected:
36 virtual bool is_filepath_valid(string &filepath);
38 void export_data();
40 bool wants_dir() { return true; }
42 private:
43 // keeps the duration of all range_markers before the current
44 vector<nframes_t> range_markers_durations_aggregated;
45 vector<nframes_t> range_markers_durations;
46 // duration of all range markers
47 nframes_t total_duration;
48 // index of range marker, that get's exported right now
49 unsigned int current_range_marker_index;
51 // sets value of progress bar
52 virtual gint progress_timeout ();
54 // initializes range_markers_durations_aggregated, range_markers_durations
55 // and total_duration
56 void init_progress_computing(ARDOUR::Locations::LocationList& locations);
58 // searches for a filename like "<filename><nr>.<postfix>" in path, that
59 // does not exist
60 string get_target_filepath(string path, string filename, string postfix);
62 void process_range_markers_export(ARDOUR::Locations::LocationList&);
66 #endif // __export_range_markers_dialog_h__