Fix alignment.
[dcpomatic.git] / src / wx / audio_panel.h
1 /*
2     Copyright (C) 2012-2021 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
22 #include "lib/audio_mapping.h"
23 #include "content_sub_panel.h"
24 #include "content_widget.h"
25
26
27 class wxSpinCtrlDouble;
28 class wxButton;
29 class wxChoice;
30 class wxStaticText;
31 class AudioMappingView;
32 class AudioDialog;
33 class LanguageTagWidget;
34
35
36 class AudioPanel : public ContentSubPanel
37 {
38 public:
39         explicit AudioPanel (ContentPanel *);
40         ~AudioPanel ();
41
42         void film_changed (Film::Property);
43         void film_content_changed (int);
44         void content_selection_changed ();
45         void set_film (std::shared_ptr<Film>);
46
47 private:
48         void show_clicked ();
49         void gain_calculate_button_clicked ();
50         void mapping_changed (AudioMapping);
51         void setup_description ();
52         void setup_peak ();
53         void active_jobs_changed (boost::optional<std::string>, boost::optional<std::string>);
54         void setup_sensitivity ();
55         void reference_clicked ();
56         void add_to_grid ();
57         boost::optional<float> peak () const;
58
59         wxCheckBox* _reference;
60         wxStaticText* _reference_note;
61         wxButton* _show;
62         wxStaticText* _gain_label;
63         wxStaticText* _gain_db_label;
64         ContentSpinCtrlDouble<AudioContent>* _gain;
65         wxButton* _gain_calculate_button;
66         wxStaticText* _peak;
67         wxStaticText* _delay_label;
68         wxStaticText* _delay_ms_label;
69         ContentSpinCtrl<AudioContent>* _delay;
70         AudioMappingView* _mapping;
71         wxStaticText* _description;
72         AudioDialog* _audio_dialog;
73
74         boost::signals2::scoped_connection _mapping_connection;
75         boost::signals2::scoped_connection _active_jobs_connection;
76 };