1 /** -*- C++ -*- 2 * 3 * This file is part of RawTherapee. 4 * 5 * Copyright (c) 2017 Alberto Griggio <alberto.griggio@gmail.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 LogEncoding: public ToolParamBlock, public AdjusterListener, public rtengine::AutoLogListener, public FoldableToolPanel 27 { 28 protected: 29 Gtk::ToggleButton *autocompute; 30 Adjuster *gain; 31 Adjuster *targetGray; 32 Adjuster *blackEv; 33 Adjuster *whiteEv; 34 Adjuster *regularization; 35 36 rtengine::ProcEvent EvEnabled; 37 rtengine::ProcEvent EvAuto; 38 rtengine::ProcEvent EvAutoGainOn; 39 rtengine::ProcEvent EvAutoGainOff; 40 rtengine::ProcEvent EvAutoBatch; 41 rtengine::ProcEvent EvGain; 42 rtengine::ProcEvent EvGainAuto; 43 rtengine::ProcEvent EvTargetGray; 44 rtengine::ProcEvent EvBlackEv; 45 rtengine::ProcEvent EvWhiteEv; 46 rtengine::ProcEvent EvRegularization; 47 48 sigc::connection autoconn; 49 50 rtengine::procparams::LogEncodingParams initial_params; 51 52 public: 53 LogEncoding(); 54 55 void read(const rtengine::procparams::ProcParams *pp) override; 56 void write(rtengine::procparams::ProcParams *pp) override; 57 void setDefaults(const rtengine::procparams::ProcParams *defParams) override; 58 59 void adjusterChanged(Adjuster* a, double newval) override; 60 void adjusterAutoToggled(Adjuster* a, bool newval) override; 61 void enabledChanged() override; 62 63 void logEncodingChanged(const rtengine::procparams::LogEncodingParams ¶ms) override; 64 void autocomputeToggled(); 65 66 void toolReset(bool to_initial) override; 67 }; 68 69