Merge master.
[dcpomatic.git] / src / wx / config_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 /** @file src/config_dialog.h
21  *  @brief A dialogue to edit DCP-o-matic configuration.
22  */
23
24 #include <wx/wx.h>
25 #include <wx/spinctrl.h>
26 #include <wx/listctrl.h>
27 #include <wx/filepicker.h>
28 #include "wx_util.h"
29 #include "editable_list.h"
30
31 class DirPickerCtrl;
32 class wxNotebook;
33 class PresetColourConversion;
34 class PresetColourConversionDialog;
35 class ServerDialog;
36
37 /** @class ConfigDialog
38  *  @brief A dialogue to edit DCP-o-matic configuration.
39  */
40 class ConfigDialog : public wxDialog
41 {
42 public:
43         ConfigDialog (wxWindow *);
44
45 private:
46         void set_language_changed ();
47         void language_changed ();
48         void tms_ip_changed ();
49         void tms_path_changed ();
50         void tms_user_changed ();
51         void tms_password_changed ();
52         void num_local_encoding_threads_changed ();
53         void default_still_length_changed ();
54         void default_directory_changed ();
55         void edit_default_dci_metadata_clicked ();
56         void default_container_changed ();
57         void default_dcp_content_type_changed ();
58         void issuer_changed ();
59         void creator_changed ();
60         void default_j2k_bandwidth_changed ();
61         void default_audio_delay_changed ();
62         void mail_server_changed ();
63         void mail_user_changed ();
64         void mail_password_changed ();
65         void kdm_from_changed ();
66         void kdm_email_changed ();
67         void use_any_servers_changed ();
68
69         void setup_language_sensitivity ();
70
71         void make_misc_panel ();
72         void make_defaults_panel ();
73         void make_servers_panel ();
74         void make_tms_panel ();
75         void make_metadata_panel ();
76         void make_colour_conversions_panel ();
77         void make_kdm_email_panel ();
78
79         void check_for_updates_changed ();
80         void check_for_test_updates_changed ();
81
82         wxNotebook* _notebook;
83         wxPanel* _misc_panel;
84         wxPanel* _defaults_panel;
85         wxPanel* _servers_panel;
86         wxPanel* _tms_panel;
87         EditableList<PresetColourConversion, PresetColourConversionDialog>* _colour_conversions_panel;
88         wxPanel* _metadata_panel;
89         wxCheckBox* _set_language;
90         wxChoice* _language;
91         wxChoice* _default_container;
92         wxChoice* _default_dcp_content_type;
93         wxTextCtrl* _tms_ip;
94         wxTextCtrl* _tms_path;
95         wxTextCtrl* _tms_user;
96         wxTextCtrl* _tms_password;
97         wxSpinCtrl* _num_local_encoding_threads;
98         wxTextCtrl* _mail_server;
99         wxTextCtrl* _mail_user;
100         wxTextCtrl* _mail_password;
101         wxTextCtrl* _kdm_from;
102         wxSpinCtrl* _default_still_length;
103 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
104         DirPickerCtrl* _default_directory;
105 #else
106         wxDirPickerCtrl* _default_directory;
107 #endif
108         wxButton* _default_dci_metadata_button;
109         wxTextCtrl* _issuer;
110         wxTextCtrl* _creator;
111         wxSpinCtrl* _default_j2k_bandwidth;
112         wxSpinCtrl* _default_audio_delay;
113         wxPanel* _kdm_email_panel;
114         wxTextCtrl* _kdm_email;
115         wxCheckBox* _use_any_servers;
116         wxCheckBox* _check_for_updates;
117         wxCheckBox* _check_for_test_updates;
118         EditableList<std::string, ServerDialog>* _servers_list;
119 };
120