2 Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
4 This file is part of DCP-o-matic.
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.
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.
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/>.
21 #ifndef DCPOMATIC_COLOUR_CONVERSION_EDITOR_H
22 #define DCPOMATIC_COLOUR_CONVERSION_EDITOR_H
24 #include <boost/signals2.hpp>
27 class wxSpinCtrlDouble;
28 class ColourConversion;
30 class ColourConversionEditor : public wxPanel
33 ColourConversionEditor (wxWindow *, bool yuv);
35 void set (ColourConversion);
36 ColourConversion get () const;
38 boost::signals2::signal<void ()> Changed;
42 void changed (wxSpinCtrlDouble *);
43 void chromaticity_changed ();
44 void adjusted_white_changed ();
45 void update_rgb_to_xyz ();
46 void update_bradford ();
47 wxStaticText* subhead (wxGridBagSizer* sizer, wxWindow* parent, wxString text, int& row) const;
49 void set_text_ctrl (wxTextCtrl *, double);
50 void set_spin_ctrl (wxSpinCtrlDouble *, double);
52 static int const INPUT_GAMMA;
53 static int const INPUT_GAMMA_LINEARISED;
54 static int const INPUT_SGAMUT3;
56 std::map<wxSpinCtrlDouble*, double> _last_spin_ctrl_value;
57 bool _ignore_chromaticity_changed;
60 wxSpinCtrlDouble* _input_gamma;
61 wxSpinCtrlDouble* _input_power;
62 wxTextCtrl* _input_threshold;
65 wxChoice* _yuv_to_rgb;
74 wxCheckBox* _adjust_white;
75 wxTextCtrl* _adjusted_white_x;
76 wxTextCtrl* _adjusted_white_y;
78 wxStaticText* _rgb_to_xyz[3][3];
79 wxStaticText* _bradford[3][3];