1 /* -*- C++ -*-
2  *
3  *  This file is part of RawTherapee.
4  *
5  *  Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
6  *
7  *  RawTherapee is free software: you can redistribute it and/or modify
8  *  it under the terms of the GNU General Public License as published by
9  *  the Free Software Foundation, either version 3 of the License, or
10  *  (at your option) any later version.
11  *
12  *  RawTherapee is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU General Public License for more details.
16  *
17  *  You should have received a copy of the GNU General Public License
18  *  along with RawTherapee.  If not, see <http://www.gnu.org/licenses/>.
19  */
20 #pragma once
21 
22 #include <gtkmm.h>
23 #include "adjuster.h"
24 #include "toolpanel.h"
25 
26 class ToneEqualizer: public ToolParamBlock, public AdjusterListener, public FoldableToolPanel {
27 public:
28     ToneEqualizer();
29 
30     void read(const rtengine::procparams::ProcParams *pp) override;
31     void write(rtengine::procparams::ProcParams *pp) override;
32     void setDefaults(const rtengine::procparams::ProcParams *defParams) override;
33     void adjusterChanged(Adjuster *a, double newval) override;
34     void adjusterAutoToggled(Adjuster *a, bool newval) override;
35     void enabledChanged() override;
36 
37     void trimValues(rtengine::procparams::ProcParams *pp) override;
38 
39     void toolReset(bool to_initial) override;
40 
41 private:
42     void colormapToggled();
43 
44     std::array<Adjuster *, 5> bands;
45     Adjuster *regularization;
46     Gtk::CheckButton *show_colormap;
47 
48     rtengine::ProcEvent EvEnabled;
49     rtengine::ProcEvent EvBands;
50     rtengine::ProcEvent EvRegularization;
51     rtengine::ProcEvent EvColormap;
52 
53     rtengine::procparams::ToneEqualizerParams inital_params;
54 };
55