2 Copyright (C) 2019-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 #include "editable_list.h"
23 #include "full_language_tag_dialog.h"
24 #include "metadata_dialog.h"
26 #include "lib/weak_film.h"
27 #include <dcp/language_tag.h>
28 #include <dcp/types.h>
35 class ContentVersionDialog;
36 class LanguageTagWidget;
37 class LanguageTagDialog;
40 class SMPTEMetadataDialog : public MetadataDialog
43 SMPTEMetadataDialog (wxWindow* parent, std::weak_ptr<Film> film);
45 void setup () override;
48 void setup_standard (wxPanel* parent, wxSizer* sizer) override;
49 void setup_advanced (wxPanel* parent, wxSizer* sizer) override;
51 std::vector<dcp::Rating> ratings () const;
52 void set_ratings (std::vector<dcp::Rating> r);
53 std::vector<std::string> content_versions () const;
54 void set_content_versions (std::vector<std::string> v);
55 void name_language_changed (dcp::LanguageTag tag);
56 void edit_release_territory ();
57 void version_number_changed ();
58 void status_changed ();
59 void chain_changed ();
60 void distributor_changed ();
61 void facility_changed ();
62 void luminance_changed ();
63 void film_changed (ChangeType type, Film::Property property);
64 void setup_sensitivity ();
65 void enable_release_territory_changed ();
66 void enable_chain_changed ();
67 void enable_distributor_changed ();
68 void enable_facility_changed ();
70 LanguageTagWidget* _name_language;
71 wxCheckBox* _enable_release_territory;
72 /** The current release territory displayed in the UI; since we can't easily convert
73 * the string in _release_territory_text to a RegionSubtag we just store the RegionSubtag
76 boost::optional<dcp::LanguageTag::RegionSubtag> _release_territory;
77 wxStaticText* _release_territory_text;
78 Button* _edit_release_territory;
79 wxSpinCtrl* _version_number;
81 wxCheckBox* _enable_chain;
83 wxCheckBox* _enable_distributor;
84 wxTextCtrl* _distributor;
85 wxCheckBox* _enable_facility;
86 wxTextCtrl* _facility;
87 wxSpinCtrlDouble* _luminance_value;
88 wxChoice* _luminance_unit;
89 EditableList<dcp::Rating, RatingDialog>* _ratings;
90 EditableList<std::string, ContentVersionDialog>* _content_versions;
92 boost::signals2::scoped_connection _film_changed_connection;