37cca30de06af3f5b3bf173b0e1527179cef9e8b
[dcpomatic.git] / src / wx / kdm_output_panel.h
1 /*
2     Copyright (C) 2015-2022 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 #include "lib/kdm_with_metadata.h"
23 #include "wx_util.h"
24 #include <dcp/types.h>
25 #include <wx/wx.h>
26 #include <boost/filesystem.hpp>
27
28
29 class DirPickerCtrl;
30 class Job;
31 class KDMChoice;
32 class NameFormatEditor;
33 class wxDirPickerCtrl;
34 class wxRadioButton;
35
36
37 class KDMOutputPanel : public wxPanel
38 {
39 public:
40         KDMOutputPanel (wxWindow* parent);
41
42         void setup_sensitivity ();
43
44         boost::filesystem::path directory () const;
45         dcp::Formulation formulation () const;
46         bool forensic_mark_video () const {
47                 return _forensic_mark_video;
48         }
49         bool forensic_mark_audio () const {
50                 return _forensic_mark_audio;
51         }
52         boost::optional<int> forensic_mark_audio_up_to () const {
53                 return _forensic_mark_audio_up_to;
54         }
55
56         std::pair<std::shared_ptr<Job>, int> make (
57                 std::list<KDMWithMetadataPtr> screen_kdms,
58                 std::string name,
59                 std::function<bool (boost::filesystem::path)> confirm_overwrite
60                 );
61
62 private:
63         void kdm_write_type_changed ();
64         void advanced_clicked ();
65         void write_to_changed ();
66         void email_changed ();
67
68         KDMChoice* _type;
69         NameFormatEditor* _container_name_format;
70         NameFormatEditor* _filename_format;
71         wxCheckBox* _write_to;
72 #ifdef DCPOMATIC_USE_OWN_PICKER
73         DirPickerCtrl* _folder;
74 #else
75         wxDirPickerCtrl* _folder;
76 #endif
77         wxRadioButton* _write_flat;
78         wxRadioButton* _write_folder;
79         wxRadioButton* _write_zip;
80         wxCheckBox* _email;
81         bool _forensic_mark_video;
82         bool _forensic_mark_audio;
83         boost::optional<int> _forensic_mark_audio_up_to;
84 };