Accessor for ClosedCaptionsDialog.
[dcpomatic.git] / src / wx / audio_panel.h
1 /*
2     Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
3
4     This file is part of DCP-o-matic.
5
6     DCP-o-matic is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     DCP-o-matic is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with DCP-o-matic.  If not, see <http://www.gnu.org/licenses/>.
18
19 */
20
21 #include "lib/audio_mapping.h"
22 #include "content_sub_panel.h"
23 #include "content_widget.h"
24
25 class wxSpinCtrlDouble;
26 class wxButton;
27 class wxChoice;
28 class wxStaticText;
29 class AudioMappingView;
30 class AudioDialog;
31
32 class AudioPanel : public ContentSubPanel
33 {
34 public:
35         explicit AudioPanel (ContentPanel *);
36         ~AudioPanel ();
37
38         void film_changed (Film::Property);
39         void film_content_changed (int);
40         void content_selection_changed ();
41         void set_film (boost::shared_ptr<Film>);
42
43 private:
44         void show_clicked ();
45         void gain_calculate_button_clicked ();
46         void mapping_changed (AudioMapping);
47         void setup_description ();
48         void setup_peak ();
49         void active_jobs_changed (boost::optional<std::string>, boost::optional<std::string>);
50         void setup_sensitivity ();
51         void reference_clicked ();
52         void add_to_grid ();
53
54         wxCheckBox* _reference;
55         wxStaticText* _reference_note;
56         wxButton* _show;
57         wxStaticText* _gain_label;
58         wxStaticText* _gain_db_label;
59         ContentSpinCtrlDouble<AudioContent>* _gain;
60         wxButton* _gain_calculate_button;
61         wxStaticText* _peak;
62         wxStaticText* _delay_label;
63         wxStaticText* _delay_ms_label;
64         ContentSpinCtrl<AudioContent>* _delay;
65         AudioMappingView* _mapping;
66         wxStaticText* _description;
67         AudioDialog* _audio_dialog;
68
69         boost::signals2::scoped_connection _mapping_connection;
70         boost::signals2::scoped_connection _active_jobs_connection;
71 };