2 Copyright (C) 2021 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
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.
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.
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/>.
22 #ifndef DCPOMATIC_METADATA_DIALOG_H
23 #define DCPOMATIC_METADATA_DIALOG_H
26 #include "lib/change_signaller.h"
28 #include "lib/weak_film.h"
29 #include <dcp/warnings.h>
30 LIBDCP_DISABLE_WARNINGS
32 LIBDCP_ENABLE_WARNINGS
36 class wxSpinCtrlDouble;
37 class LanguageTagWidget;
40 class MetadataDialog : public wxDialog, public WeakFilm
43 MetadataDialog (wxWindow* parent, std::weak_ptr<Film> film);
45 virtual void setup ();
48 virtual void setup_standard (wxPanel*, wxSizer*);
49 virtual void setup_advanced (wxPanel*, wxSizer*);
50 virtual void film_changed (ChangeType type, Film::Property property);
51 virtual void setup_sensitivity ();
54 void sign_language_video_language_changed ();
55 void edit_release_territory ();
56 void enable_release_territory_changed ();
57 void facility_changed ();
58 void enable_facility_changed ();
59 void studio_changed ();
60 void enable_studio_changed ();
61 void temp_version_changed ();
62 void pre_release_changed ();
63 void red_band_changed ();
64 void two_d_version_of_three_d_changed ();
65 void chain_changed ();
66 void enable_chain_changed ();
67 void enable_luminance_changed ();
68 void luminance_changed ();
70 wxCheckBox* _enable_release_territory;
71 /** The current release territory displayed in the UI; since we can't easily convert
72 * the string in _release_territory_text to a RegionSubtag we just store the RegionSubtag
75 boost::optional<dcp::LanguageTag::RegionSubtag> _release_territory;
76 wxStaticText* _release_territory_text;
77 Button* _edit_release_territory;
78 LanguageTagWidget* _sign_language_video_language = nullptr;
79 wxCheckBox* _enable_facility;
80 wxTextCtrl* _facility;
81 wxCheckBox* _enable_chain;
83 wxCheckBox* _enable_studio;
85 wxCheckBox* _temp_version;
86 wxCheckBox* _pre_release;
87 wxCheckBox* _red_band;
88 wxCheckBox* _two_d_version_of_three_d;
89 wxCheckBox* _enable_luminance;
90 wxSpinCtrlDouble* _luminance_value;
91 wxChoice* _luminance_unit;
93 boost::signals2::scoped_connection _film_changed_connection;