Move things round a bit.
[dcpomatic.git] / src / gtk / 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 DVD-o-matic configuration.
22  */
23
24 #include <gtkmm.h>
25
26 class Screen;
27 class Server;
28
29 /** @class ConfigDialog
30  *  @brief A dialogue to edit DVD-o-matic configuration.
31  */
32 class ConfigDialog : public Gtk::Dialog
33 {
34 public:
35         ConfigDialog ();
36
37 private:
38         void on_response (int);
39
40         void tms_ip_changed ();
41         void tms_path_changed ();
42         void tms_user_changed ();
43         void tms_password_changed ();
44         void num_local_encoding_threads_changed ();
45         void colour_lut_changed ();
46         void j2k_bandwidth_changed ();
47         void add_server_clicked ();
48         void remove_server_clicked ();
49         void server_selection_changed ();
50         void add_screen_clicked ();
51         void remove_screen_clicked ();
52         void screen_selection_changed ();
53         void reference_scaler_changed ();
54         void edit_reference_filters_clicked ();
55         void reference_filters_changed (std::vector<Filter const *>);
56
57         void add_screen_to_store (boost::shared_ptr<Screen>);
58         void add_server_to_store (Server *);
59
60         struct ServersModelColumns : public Gtk::TreeModelColumnRecord
61         {
62                 ServersModelColumns () {
63                         add (_host_name);
64                         add (_threads);
65                 }
66
67                 Gtk::TreeModelColumn<std::string> _host_name;
68                 Gtk::TreeModelColumn<int> _threads;
69         };
70
71         struct ScreensModelColumns : public Gtk::TreeModelColumnRecord
72         {
73                 ScreensModelColumns () {
74                         add (_name);
75                         add (_format_name);
76                         add (_format_nickname);
77                         add (_x);
78                         add (_y);
79                         add (_width);
80                         add (_height);
81                 }
82
83                 Gtk::TreeModelColumn<std::string> _name;
84                 Gtk::TreeModelColumn<std::string> _format_name;
85                 Gtk::TreeModelColumn<std::string> _format_nickname;
86                 Gtk::TreeModelColumn<std::string> _x;
87                 Gtk::TreeModelColumn<std::string> _y;
88                 Gtk::TreeModelColumn<std::string> _width;
89                 Gtk::TreeModelColumn<std::string> _height;
90         };
91
92         Gtk::Entry _tms_ip;
93         Gtk::Entry _tms_path;
94         Gtk::Entry _tms_user;
95         Gtk::Entry _tms_password;
96         Gtk::SpinButton _num_local_encoding_threads;
97         Gtk::ComboBoxText _colour_lut;
98         Gtk::SpinButton _j2k_bandwidth;
99         Gtk::ComboBoxText _reference_scaler;
100         Gtk::Label _reference_filters;
101         Gtk::Button _reference_filters_button;
102         ServersModelColumns _servers_columns;
103         Glib::RefPtr<Gtk::ListStore> _servers_store;
104         Gtk::TreeView _servers_view;
105         Gtk::Button _add_server;
106         Gtk::Button _remove_server;
107         ScreensModelColumns _screens_columns;
108         Glib::RefPtr<Gtk::TreeStore> _screens_store;
109         Gtk::TreeView _screens_view;
110         Gtk::Button _add_screen;
111         Gtk::Button _remove_screen;
112 };
113