Split KDM output stuff into a separate panel.
[dcpomatic.git] / src / wx / kdm_dialog.h
1 /*
2     Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
3
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.
8
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.
13
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.
17
18 */
19
20 #include "wx_util.h"
21 #include <dcp/types.h>
22 #include <wx/wx.h>
23 #include <wx/treectrl.h>
24 #include <boost/shared_ptr.hpp>
25 #include <boost/date_time/posix_time/posix_time.hpp>
26 #include <map>
27
28 class wxTreeCtrl;
29
30 class Cinema;
31 class Screen;
32 class Film;
33 class ScreensPanel;
34 class KDMTimingPanel;
35 class KDMOutputPanel;
36 struct CPLSummary;
37
38 class KDMDialog : public wxDialog
39 {
40 public:
41         KDMDialog (wxWindow *, boost::shared_ptr<const Film>);
42
43         std::list<boost::shared_ptr<Screen> > screens () const;
44         /** @return KDM from time in local time */
45         boost::posix_time::ptime from () const;
46         /** @return KDM until time in local time */
47         boost::posix_time::ptime until () const;
48
49         boost::filesystem::path cpl () const;
50
51         boost::filesystem::path directory () const;
52         bool write_to () const;
53         dcp::Formulation formulation () const;
54
55 private:
56         void setup_sensitivity ();
57         void update_cpl_choice ();
58         void update_cpl_summary ();
59         void cpl_browse_clicked ();
60
61         ScreensPanel* _screens;
62         KDMTimingPanel* _timing;
63         KDMOutputPanel* _output;
64         wxChoice* _cpl;
65         wxButton* _cpl_browse;
66         wxStaticText* _dcp_directory;
67         wxStaticText* _cpl_id;
68         wxStaticText* _cpl_annotation_text;
69
70         std::vector<CPLSummary> _cpls;
71 };