Use release territory from Interop/SMPTE metadata instead of ISDCF metadata dialogue.
[dcpomatic.git] / src / wx / metadata_dialog.h
1 /*
2     Copyright (C) 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 #ifndef DCPOMATIC_METADATA_DIALOG_H
23 #define DCPOMATIC_METADATA_DIALOG_H
24
25
26 #include "lib/change_signaller.h"
27 #include "lib/film.h"
28 #include "lib/warnings.h"
29 #include "lib/weak_film.h"
30 DCPOMATIC_DISABLE_WARNINGS
31 #include <wx/wx.h>
32 DCPOMATIC_ENABLE_WARNINGS
33
34
35 class Button;
36
37
38 class MetadataDialog : public wxDialog, public WeakFilm
39 {
40 public:
41         MetadataDialog (wxWindow* parent, std::weak_ptr<Film> film);
42
43         virtual void setup ();
44
45 protected:
46         virtual void setup_standard (wxPanel*, wxSizer*);
47         virtual void setup_advanced (wxPanel*, wxSizer*) {}
48         virtual void film_changed (ChangeType type, Film::Property property);
49         virtual void setup_sensitivity ();
50
51 private:
52         void edit_release_territory ();
53         void enable_release_territory_changed ();
54
55         wxCheckBox* _enable_release_territory;
56         /** The current release territory displayed in the UI; since we can't easily convert
57          *  the string in _release_territory_text to a RegionSubtag we just store the RegionSubtag
58          *  alongside.
59          */
60         boost::optional<dcp::LanguageTag::RegionSubtag> _release_territory;
61         wxStaticText* _release_territory_text;
62         Button* _edit_release_territory;
63
64         boost::signals2::scoped_connection _film_changed_connection;
65 };
66
67
68 #endif
69