2 Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 /** @file src/film_editor.h
21 * @brief A wx widget to edit a film's metadata, and perform various functions.
25 #include <boost/signals2.hpp>
35 * @brief A wx widget to edit a film's metadata, and perform various functions.
37 class FilmEditor : public wxPanel
40 FilmEditor (boost::shared_ptr<Film>, wxWindow *);
42 void set_film (boost::shared_ptr<Film>);
44 boost::signals2::signal<void (boost::filesystem::path)> FileChanged;
46 /* Stuff for panels */
48 ContentPanel* content_panel () const {
49 return _content_panel;
52 boost::shared_ptr<Film> film () const {
57 void make_dcp_panel ();
58 void connect_to_widgets ();
60 /* Handle changes to the view */
62 void use_isdcf_name_toggled ();
63 void edit_isdcf_button_clicked ();
64 void container_changed ();
65 void dcp_content_type_changed ();
66 void scaler_changed ();
67 void j2k_bandwidth_changed ();
68 void frame_rate_choice_changed ();
69 void frame_rate_spin_changed ();
70 void best_frame_rate_clicked ();
71 void content_timeline_clicked ();
72 void audio_channels_changed ();
73 void resolution_changed ();
74 void three_d_changed ();
75 void standard_changed ();
76 void signed_toggled ();
77 void burn_subtitles_toggled ();
78 void encrypted_toggled ();
80 /* Handle changes to the model */
81 void film_changed (Film::Property);
82 void film_content_changed (int);
84 void set_general_sensitivity (bool);
85 void setup_dcp_name ();
86 void setup_container ();
87 void setup_frame_rate_widget ();
89 void active_jobs_changed (bool);
90 void config_changed ();
92 wxNotebook* _main_notebook;
95 ContentPanel* _content_panel;
97 /** The film we are editing */
98 boost::shared_ptr<Film> _film;
100 wxStaticText* _dcp_name;
101 wxCheckBox* _use_isdcf_name;
102 wxChoice* _container;
103 wxButton* _edit_isdcf_button;
105 wxSpinCtrl* _j2k_bandwidth;
106 wxChoice* _dcp_content_type;
107 wxChoice* _frame_rate_choice;
108 wxSpinCtrl* _frame_rate_spin;
109 wxSizer* _frame_rate_sizer;
110 wxSpinCtrl* _audio_channels;
111 wxButton* _best_frame_rate;
112 wxCheckBox* _three_d;
113 wxChoice* _resolution;
116 wxCheckBox* _burn_subtitles;
117 wxCheckBox* _encrypted;
119 std::vector<Ratio const *> _ratios;
121 bool _generally_sensitive;