13
0
livetrax/gtk2_ardour/simple_export_dialog.h

97 lines
2.5 KiB
C
Raw Normal View History

2022-10-18 10:53:04 -04:00
/*
* Copyright (C) 2022 Robin Gareus <robin@gareus.org>
*
* 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.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef _gtkardour_simple_export_dialog_h_
#define _gtkardour_simple_export_dialog_h_
#include <gtkmm/button.h>
#include <gtkmm/combobox.h>
#include <gtkmm/label.h>
#include <gtkmm/progressbar.h>
#include "ardour/simple_export.h"
2022-10-18 10:53:04 -04:00
#include "ardour_dialog.h"
#include "export_preset_selector.h"
#include "public_editor.h"
namespace ARDOUR {
class ExportHandler;
class ExportStatus;
class ExportProfileManager;
}
/* Quick Export Dialog */
class SimpleExportDialog : public ArdourDialog, virtual public ARDOUR::SimpleExport
2022-10-18 10:53:04 -04:00
{
public:
2023-12-07 11:43:26 -05:00
SimpleExportDialog (PublicEditor&, bool vapor_export = false);
2022-10-18 10:53:04 -04:00
void set_session (ARDOUR::Session*);
protected:
void on_response (int response_id)
{
Gtk::Dialog::on_response (response_id);
}
XMLNode& get_state () const;
void set_state (XMLNode const&);
private:
void start_export ();
void close_dialog ();
void show_progress ();
void check_manager ();
2022-10-18 10:53:04 -04:00
void set_error (std::string const&);
bool progress_timeout ();
class ExportRangeCols : public Gtk::TreeModelColumnRecord
{
public:
ExportRangeCols ()
{
add (label);
add (name);
add (start);
add (end);
}
Gtk::TreeModelColumn<std::string> label;
Gtk::TreeModelColumn<std::string> name;
Gtk::TreeModelColumn<samplepos_t> start;
Gtk::TreeModelColumn<samplepos_t> end;
};
PublicEditor& _editor;
2022-10-18 10:53:04 -04:00
ExportPresetSelector _eps;
Gtk::Button* _cancel_button;
Gtk::Button* _export_button;
Gtk::ComboBox _range_combo;
2022-10-18 10:53:04 -04:00
Gtk::ComboBoxText _post_export_combo;
Gtk::Label _error_label;
Gtk::ProgressBar _progress_bar;
2023-12-07 11:43:26 -05:00
bool _vapor_export;
2022-10-18 10:53:04 -04:00
ExportRangeCols _range_cols;
Glib::RefPtr<Gtk::ListStore> _range_list;
2022-10-18 10:53:04 -04:00
sigc::connection _progress_connection;
sigc::connection _preset_cfg_connection;
2022-10-18 10:53:04 -04:00
};
#endif