Allow specifying and writing sign language video language metadata (#2062).
[dcpomatic.git] / src / wx / metadata_dialog.h
index 892aa89dfb3ccd14dddc81c0a05a4d22ab40e415..a6f5cefda10d0449d0070450c1c052e841b433cd 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2019 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
-#include "editable_list.h"
-#include <dcp/types.h>
+
+#ifndef DCPOMATIC_METADATA_DIALOG_H
+#define DCPOMATIC_METADATA_DIALOG_H
+
+
+#include "lib/change_signaller.h"
+#include "lib/film.h"
+#include "lib/warnings.h"
+#include "lib/weak_film.h"
+DCPOMATIC_DISABLE_WARNINGS
 #include <wx/wx.h>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
-#include <vector>
+DCPOMATIC_ENABLE_WARNINGS
 
-class Film;
-class RatingDialog;
 
-class MetadataDialog : public wxDialog
+class Button;
+class wxSpinCtrlDouble;
+class LanguageTagWidget;
+
+
+class MetadataDialog : public wxDialog, public WeakFilm
 {
 public:
-       MetadataDialog (wxWindow* parent, boost::weak_ptr<Film> film);
+       MetadataDialog (wxWindow* parent, std::weak_ptr<Film> film);
+
+       virtual void setup ();
+
+protected:
+       virtual void setup_standard (wxPanel*, wxSizer*);
+       virtual void setup_advanced (wxPanel*, wxSizer*);
+       virtual void film_changed (ChangeType type, Film::Property property);
+       virtual void setup_sensitivity ();
 
 private:
-       std::vector<dcp::Rating> ratings () const;
-       void set_ratings (std::vector<dcp::Rating> r);
-       void content_version_changed ();
+       void sign_language_video_language_changed ();
+       void edit_release_territory ();
+       void enable_release_territory_changed ();
+       void facility_changed ();
+       void enable_facility_changed ();
+       void studio_changed ();
+       void enable_studio_changed ();
+       void temp_version_changed ();
+       void pre_release_changed ();
+       void red_band_changed ();
+       void two_d_version_of_three_d_changed ();
+       void chain_changed ();
+       void enable_chain_changed ();
+       void enable_luminance_changed ();
+       void luminance_changed ();
+
+       wxCheckBox* _enable_release_territory;
+       /** The current release territory displayed in the UI; since we can't easily convert
+        *  the string in _release_territory_text to a RegionSubtag we just store the RegionSubtag
+        *  alongside.
+        */
+       boost::optional<dcp::LanguageTag::RegionSubtag> _release_territory;
+       wxStaticText* _release_territory_text;
+       Button* _edit_release_territory;
+       LanguageTagWidget* _sign_language_video_language = nullptr;
+       wxCheckBox* _enable_facility;
+       wxTextCtrl* _facility;
+       wxCheckBox* _enable_chain;
+       wxTextCtrl* _chain;
+       wxCheckBox* _enable_studio;
+       wxTextCtrl* _studio;
+       wxCheckBox* _temp_version;
+       wxCheckBox* _pre_release;
+       wxCheckBox* _red_band;
+       wxCheckBox* _two_d_version_of_three_d;
+       wxCheckBox* _enable_luminance;
+       wxSpinCtrlDouble* _luminance_value;
+       wxChoice* _luminance_unit;
 
-       boost::weak_ptr<Film> _film;
-       EditableList<dcp::Rating, RatingDialog>* _ratings;
-       wxTextCtrl* _content_version;
+       boost::signals2::scoped_connection _film_changed_connection;
 };
+
+
+#endif
+