Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* RawTherapee is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@@ -26,170 +26,173 @@
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LABEL")) {
|
||||
ToneCurve::ToneCurve () : FoldableToolPanel(this, "tonecurve", M("TP_EXPOSURE_LABEL"))
|
||||
{
|
||||
|
||||
CurveListener::setMulti(true);
|
||||
CurveListener::setMulti(true);
|
||||
|
||||
std::vector<GradientMilestone> bottomMilestones;
|
||||
bottomMilestones.push_back( GradientMilestone(0., 0., 0., 0.) );
|
||||
bottomMilestones.push_back( GradientMilestone(1., 1., 1., 1.) );
|
||||
std::vector<GradientMilestone> bottomMilestones;
|
||||
bottomMilestones.push_back( GradientMilestone(0., 0., 0., 0.) );
|
||||
bottomMilestones.push_back( GradientMilestone(1., 1., 1., 1.) );
|
||||
|
||||
//----------- Auto Levels ----------------------------------
|
||||
abox = Gtk::manage (new Gtk::HBox ());
|
||||
abox->set_border_width (2);
|
||||
abox->set_spacing (10);
|
||||
abox = Gtk::manage (new Gtk::HBox ());
|
||||
abox->set_border_width (2);
|
||||
abox->set_spacing (10);
|
||||
|
||||
autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
||||
autolevels->set_tooltip_markup (M("TP_EXPOSURE_AUTOLEVELS_TIP"));
|
||||
autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) );
|
||||
autolevels = Gtk::manage (new Gtk::ToggleButton (M("TP_EXPOSURE_AUTOLEVELS")));
|
||||
autolevels->set_tooltip_markup (M("TP_EXPOSURE_AUTOLEVELS_TIP"));
|
||||
autoconn = autolevels->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::autolevels_toggled) );
|
||||
|
||||
lclip = Gtk::manage (new Gtk::Label (M("TP_EXPOSURE_CLIP")));
|
||||
lclip->set_tooltip_text (M("TP_EXPOSURE_CLIP_TIP"));
|
||||
lclip = Gtk::manage (new Gtk::Label (M("TP_EXPOSURE_CLIP")));
|
||||
lclip->set_tooltip_text (M("TP_EXPOSURE_CLIP_TIP"));
|
||||
|
||||
sclip = Gtk::manage (new MySpinButton ());
|
||||
sclip->set_range (0.0, 0.99);
|
||||
sclip->set_increments (0.01, 0.10);
|
||||
sclip->set_value (0.02);
|
||||
sclip->set_digits (2);
|
||||
sclip->signal_value_changed().connect( sigc::mem_fun(*this, &ToneCurve::clip_changed) );
|
||||
sclip = Gtk::manage (new MySpinButton ());
|
||||
sclip->set_range (0.0, 0.99);
|
||||
sclip->set_increments (0.01, 0.10);
|
||||
sclip->set_value (0.02);
|
||||
sclip->set_digits (2);
|
||||
sclip->signal_value_changed().connect( sigc::mem_fun(*this, &ToneCurve::clip_changed) );
|
||||
|
||||
neutral = Gtk::manage (new Gtk::Button (M("TP_NEUTRAL")));
|
||||
neutral->set_tooltip_text (M("TP_NEUTRAL_TIP"));
|
||||
neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &ToneCurve::neutral_pressed) );
|
||||
neutral->show();
|
||||
neutral = Gtk::manage (new Gtk::Button (M("TP_NEUTRAL")));
|
||||
neutral->set_tooltip_text (M("TP_NEUTRAL_TIP"));
|
||||
neutralconn = neutral->signal_pressed().connect( sigc::mem_fun(*this, &ToneCurve::neutral_pressed) );
|
||||
neutral->show();
|
||||
|
||||
abox->pack_start (*autolevels, true, true, 0);
|
||||
// pack_end is used for these controls as autolevels is replaceable using pack_start in batchmode
|
||||
abox->pack_end (*neutral, true, true, 0);
|
||||
abox->pack_end (*sclip, false, false, 0);
|
||||
abox->pack_end (*lclip, false, false, 0);
|
||||
pack_start (*abox);
|
||||
abox->pack_start (*autolevels, true, true, 0);
|
||||
// pack_end is used for these controls as autolevels is replaceable using pack_start in batchmode
|
||||
abox->pack_end (*neutral, true, true, 0);
|
||||
abox->pack_end (*sclip, false, false, 0);
|
||||
abox->pack_end (*lclip, false, false, 0);
|
||||
pack_start (*abox);
|
||||
|
||||
//-------------- Highlight Reconstruction -----------------
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
hrenabled = Gtk::manage (new Gtk::CheckButton (M("TP_HLREC_LABEL")));
|
||||
hrenabled->set_active (false);
|
||||
hrenabled->set_tooltip_markup (M("TP_HLREC_ENA_TOOLTIP"));
|
||||
pack_start (*hrenabled);
|
||||
hrenabled = Gtk::manage (new Gtk::CheckButton (M("TP_HLREC_LABEL")));
|
||||
hrenabled->set_active (false);
|
||||
hrenabled->set_tooltip_markup (M("TP_HLREC_ENA_TOOLTIP"));
|
||||
pack_start (*hrenabled);
|
||||
|
||||
method = Gtk::manage (new MyComboBoxText ());
|
||||
method->append_text (M("TP_HLREC_LUMINANCE"));
|
||||
method->append_text (M("TP_HLREC_CIELAB"));
|
||||
method->append_text (M("TP_HLREC_COLOR"));
|
||||
method->append_text (M("TP_HLREC_BLEND"));
|
||||
method = Gtk::manage (new MyComboBoxText ());
|
||||
method->append_text (M("TP_HLREC_LUMINANCE"));
|
||||
method->append_text (M("TP_HLREC_CIELAB"));
|
||||
method->append_text (M("TP_HLREC_COLOR"));
|
||||
method->append_text (M("TP_HLREC_BLEND"));
|
||||
|
||||
method->set_active (0);
|
||||
hlrbox = Gtk::manage (new Gtk::HBox ());
|
||||
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_HLREC_METHOD")));
|
||||
hlrbox->pack_start (*lab, Gtk::PACK_SHRINK, 4);
|
||||
hlrbox->pack_start (*method);
|
||||
pack_start (*hlrbox);
|
||||
method->set_active (0);
|
||||
hlrbox = Gtk::manage (new Gtk::HBox ());
|
||||
Gtk::Label* lab = Gtk::manage (new Gtk::Label (M("TP_HLREC_METHOD")));
|
||||
hlrbox->pack_start (*lab, Gtk::PACK_SHRINK, 4);
|
||||
hlrbox->pack_start (*method);
|
||||
pack_start (*hlrbox);
|
||||
|
||||
enaconn = hrenabled->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::hrenabledChanged) );
|
||||
methconn = method->signal_changed().connect ( sigc::mem_fun(*this, &ToneCurve::methodChanged) );
|
||||
enaconn = hrenabled->signal_toggled().connect( sigc::mem_fun(*this, &ToneCurve::hrenabledChanged) );
|
||||
methconn = method->signal_changed().connect ( sigc::mem_fun(*this, &ToneCurve::methodChanged) );
|
||||
|
||||
//----------- Exposure Compensation ---------------------
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
//----------- Exposure Compensation ---------------------
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
expcomp = Gtk::manage (new Adjuster (M("TP_EXPOSURE_EXPCOMP"), -5, 12, 0.05, 0));
|
||||
pack_start (*expcomp);
|
||||
expcomp = Gtk::manage (new Adjuster (M("TP_EXPOSURE_EXPCOMP"), -5, 12, 0.05, 0));
|
||||
pack_start (*expcomp);
|
||||
|
||||
//----------- Highlight recovery & threshold -------------
|
||||
hlcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0));
|
||||
pack_start (*hlcompr);
|
||||
hlcomprthresh = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 33));
|
||||
pack_start (*hlcomprthresh);
|
||||
//----------- Highlight recovery & threshold -------------
|
||||
hlcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTS"), 0, 500, 1, 0));
|
||||
pack_start (*hlcompr);
|
||||
hlcomprthresh = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRHIGHLIGHTSTHRESHOLD"), 0, 100, 1, 33));
|
||||
pack_start (*hlcomprthresh);
|
||||
|
||||
//----------- Black Level & Compression -------------------
|
||||
black = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BLACKLEVEL"), -16384, 32768, 50, 0));
|
||||
pack_start (*black);
|
||||
shcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRSHADOWS"), 0, 100, 1, 50));
|
||||
pack_start (*shcompr);
|
||||
black = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BLACKLEVEL"), -16384, 32768, 50, 0));
|
||||
pack_start (*black);
|
||||
shcompr = Gtk::manage (new Adjuster (M("TP_EXPOSURE_COMPRSHADOWS"), 0, 100, 1, 50));
|
||||
pack_start (*shcompr);
|
||||
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
//---------Brightness / Contrast -------------------------
|
||||
brightness = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BRIGHTNESS"), -100, 100, 1, 0));
|
||||
pack_start (*brightness);
|
||||
contrast = Gtk::manage (new Adjuster (M("TP_EXPOSURE_CONTRAST"), -100, 100, 1, 0));
|
||||
pack_start (*contrast);
|
||||
saturation = Gtk::manage (new Adjuster (M("TP_EXPOSURE_SATURATION"), -100, 100, 1, 0));
|
||||
pack_start (*saturation);
|
||||
brightness = Gtk::manage (new Adjuster (M("TP_EXPOSURE_BRIGHTNESS"), -100, 100, 1, 0));
|
||||
pack_start (*brightness);
|
||||
contrast = Gtk::manage (new Adjuster (M("TP_EXPOSURE_CONTRAST"), -100, 100, 1, 0));
|
||||
pack_start (*contrast);
|
||||
saturation = Gtk::manage (new Adjuster (M("TP_EXPOSURE_SATURATION"), -100, 100, 1, 0));
|
||||
pack_start (*saturation);
|
||||
|
||||
//----------- Curve 1 ------------------------------
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
toneCurveMode = Gtk::manage (new MyComboBoxText ());
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_STANDARD"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_FILMLIKE"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_LUMINANCE"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_PERCEPTUAL"));
|
||||
toneCurveMode->set_active (0);
|
||||
toneCurveMode->set_tooltip_text(M("TP_EXPOSURE_TCMODE_LABEL1"));
|
||||
toneCurveMode = Gtk::manage (new MyComboBoxText ());
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_STANDARD"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_FILMLIKE"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_LUMINANCE"));
|
||||
toneCurveMode->append_text (M("TP_EXPOSURE_TCMODE_PERCEPTUAL"));
|
||||
toneCurveMode->set_active (0);
|
||||
toneCurveMode->set_tooltip_text(M("TP_EXPOSURE_TCMODE_LABEL1"));
|
||||
|
||||
curveEditorG = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_EXPOSURE_CURVEEDITOR1"));
|
||||
curveEditorG->setCurveListener (this);
|
||||
curveEditorG = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_EXPOSURE_CURVEEDITOR1"));
|
||||
curveEditorG->setCurveListener (this);
|
||||
|
||||
shape = static_cast<DiagonalCurveEditor*>(curveEditorG->addCurve(CT_Diagonal, "", toneCurveMode));
|
||||
shape->setEditID(EUID_ToneCurve1, BT_IMAGEFLOAT);
|
||||
shape->setBottomBarBgGradient(bottomMilestones);
|
||||
shape->setLeftBarBgGradient(bottomMilestones);
|
||||
shape = static_cast<DiagonalCurveEditor*>(curveEditorG->addCurve(CT_Diagonal, "", toneCurveMode));
|
||||
shape->setEditID(EUID_ToneCurve1, BT_IMAGEFLOAT);
|
||||
shape->setBottomBarBgGradient(bottomMilestones);
|
||||
shape->setLeftBarBgGradient(bottomMilestones);
|
||||
|
||||
// This will add the reset button at the end of the curveType buttons
|
||||
curveEditorG->curveListComplete();
|
||||
// This will add the reset button at the end of the curveType buttons
|
||||
curveEditorG->curveListComplete();
|
||||
|
||||
pack_start( *curveEditorG, Gtk::PACK_SHRINK, 2);
|
||||
pack_start( *curveEditorG, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
tcmodeconn = toneCurveMode->signal_changed().connect( sigc::mem_fun(*this, &ToneCurve::curveMode1Changed), true );
|
||||
tcmodeconn = toneCurveMode->signal_changed().connect( sigc::mem_fun(*this, &ToneCurve::curveMode1Changed), true );
|
||||
|
||||
//----------- Curve 2 ------------------------------
|
||||
|
||||
toneCurveMode2 = Gtk::manage (new MyComboBoxText ());
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_STANDARD"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_FILMLIKE"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_LUMINANCE"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_PERCEPTUAL"));
|
||||
toneCurveMode2->set_active (0);
|
||||
toneCurveMode2->set_tooltip_text(M("TP_EXPOSURE_TCMODE_LABEL2"));
|
||||
toneCurveMode2 = Gtk::manage (new MyComboBoxText ());
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_STANDARD"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_WEIGHTEDSTD"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_FILMLIKE"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_SATANDVALBLENDING"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_LUMINANCE"));
|
||||
toneCurveMode2->append_text (M("TP_EXPOSURE_TCMODE_PERCEPTUAL"));
|
||||
toneCurveMode2->set_active (0);
|
||||
toneCurveMode2->set_tooltip_text(M("TP_EXPOSURE_TCMODE_LABEL2"));
|
||||
|
||||
curveEditorG2 = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_EXPOSURE_CURVEEDITOR2"));
|
||||
curveEditorG2->setCurveListener (this);
|
||||
curveEditorG2 = new CurveEditorGroup (options.lastToneCurvesDir, M("TP_EXPOSURE_CURVEEDITOR2"));
|
||||
curveEditorG2->setCurveListener (this);
|
||||
|
||||
shape2 = static_cast<DiagonalCurveEditor*>(curveEditorG2->addCurve(CT_Diagonal, "", toneCurveMode2));
|
||||
shape2->setEditID(EUID_ToneCurve2, BT_IMAGEFLOAT);
|
||||
shape2->setBottomBarBgGradient(bottomMilestones);
|
||||
shape2->setLeftBarBgGradient(bottomMilestones);
|
||||
shape2 = static_cast<DiagonalCurveEditor*>(curveEditorG2->addCurve(CT_Diagonal, "", toneCurveMode2));
|
||||
shape2->setEditID(EUID_ToneCurve2, BT_IMAGEFLOAT);
|
||||
shape2->setBottomBarBgGradient(bottomMilestones);
|
||||
shape2->setLeftBarBgGradient(bottomMilestones);
|
||||
|
||||
// This will add the reset button at the end of the curveType buttons
|
||||
curveEditorG2->curveListComplete();
|
||||
curveEditorG2->setTooltip(M("TP_EXPOSURE_CURVEEDITOR2_TOOLTIP"));
|
||||
// This will add the reset button at the end of the curveType buttons
|
||||
curveEditorG2->curveListComplete();
|
||||
curveEditorG2->setTooltip(M("TP_EXPOSURE_CURVEEDITOR2_TOOLTIP"));
|
||||
|
||||
pack_start( *curveEditorG2, Gtk::PACK_SHRINK, 2);
|
||||
pack_start( *curveEditorG2, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
tcmode2conn = toneCurveMode2->signal_changed().connect( sigc::mem_fun(*this, &ToneCurve::curveMode2Changed), true );
|
||||
tcmode2conn = toneCurveMode2->signal_changed().connect( sigc::mem_fun(*this, &ToneCurve::curveMode2Changed), true );
|
||||
|
||||
// --------- Set Up Listeners -------------
|
||||
expcomp->setAdjusterListener (this);
|
||||
brightness->setAdjusterListener (this);
|
||||
black->setAdjusterListener (this);
|
||||
hlcompr->setAdjusterListener (this);
|
||||
hlcomprthresh->setAdjusterListener (this);
|
||||
shcompr->setAdjusterListener (this);
|
||||
contrast->setAdjusterListener (this);
|
||||
saturation->setAdjusterListener (this);
|
||||
expcomp->setAdjusterListener (this);
|
||||
brightness->setAdjusterListener (this);
|
||||
black->setAdjusterListener (this);
|
||||
hlcompr->setAdjusterListener (this);
|
||||
hlcomprthresh->setAdjusterListener (this);
|
||||
shcompr->setAdjusterListener (this);
|
||||
contrast->setAdjusterListener (this);
|
||||
saturation->setAdjusterListener (this);
|
||||
}
|
||||
|
||||
ToneCurve::~ToneCurve () {
|
||||
ToneCurve::~ToneCurve ()
|
||||
{
|
||||
delete curveEditorG;
|
||||
delete curveEditorG2;
|
||||
}
|
||||
|
||||
void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
disableListener ();
|
||||
|
||||
@@ -206,7 +209,11 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
hlcompr->setValue (pp->toneCurve.hlcompr);
|
||||
hlcomprthresh->setValue (pp->toneCurve.hlcomprthresh);
|
||||
shcompr->setValue (pp->toneCurve.shcompr);
|
||||
if (!black->getAddMode()) shcompr->set_sensitive(!((int)black->getValue ()==0)); //at black=0 shcompr value has no effect
|
||||
|
||||
if (!black->getAddMode()) {
|
||||
shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect
|
||||
}
|
||||
|
||||
brightness->setValue (pp->toneCurve.brightness);
|
||||
contrast->setValue (pp->toneCurve.contrast);
|
||||
saturation->setValue (pp->toneCurve.saturation);
|
||||
@@ -229,36 +236,44 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
clipDirty = pedited->toneCurve.clip;
|
||||
shape->setUnChanged (!pedited->toneCurve.curve);
|
||||
shape2->setUnChanged (!pedited->toneCurve.curve2);
|
||||
|
||||
if (!pedited->toneCurve.curveMode) {
|
||||
toneCurveMode->set_active(6);
|
||||
}
|
||||
|
||||
if (!pedited->toneCurve.curveMode2) {
|
||||
toneCurveMode2->set_active(6);
|
||||
}
|
||||
}
|
||||
if (pedited)
|
||||
|
||||
if (pedited) {
|
||||
hrenabled->set_inconsistent (!pedited->toneCurve.hrenabled);
|
||||
}
|
||||
|
||||
enaconn.block (true);
|
||||
hrenabled->set_active (pp->toneCurve.hrenabled);
|
||||
enaconn.block (false);
|
||||
|
||||
if (pedited && !pedited->toneCurve.method)
|
||||
if (pedited && !pedited->toneCurve.method) {
|
||||
method->set_active (4);
|
||||
else if (pp->toneCurve.method=="Luminance")
|
||||
} else if (pp->toneCurve.method == "Luminance") {
|
||||
method->set_active (0);
|
||||
else if (pp->toneCurve.method=="CIELab blending")
|
||||
} else if (pp->toneCurve.method == "CIELab blending") {
|
||||
method->set_active (1);
|
||||
else if (pp->toneCurve.method=="Color")
|
||||
} else if (pp->toneCurve.method == "Color") {
|
||||
method->set_active (2);
|
||||
else if (pp->toneCurve.method=="Blend")
|
||||
} else if (pp->toneCurve.method == "Blend") {
|
||||
method->set_active (3);
|
||||
}
|
||||
|
||||
if (!batchMode) {
|
||||
if (hrenabled->get_active())
|
||||
if (hrenabled->get_active()) {
|
||||
hlrbox->show();
|
||||
else
|
||||
} else {
|
||||
hlrbox->hide();
|
||||
}
|
||||
}
|
||||
|
||||
lasthrEnabled = pp->toneCurve.hrenabled;
|
||||
|
||||
autoconn.block (false);
|
||||
@@ -268,17 +283,20 @@ void ToneCurve::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
void ToneCurve::autoOpenCurve () {
|
||||
void ToneCurve::autoOpenCurve ()
|
||||
{
|
||||
shape->openIfNonlinear();
|
||||
shape2->openIfNonlinear();
|
||||
}
|
||||
|
||||
void ToneCurve::setEditProvider (EditDataProvider *provider) {
|
||||
void ToneCurve::setEditProvider (EditDataProvider *provider)
|
||||
{
|
||||
shape->setEditProvider(provider);
|
||||
shape2->setEditProvider(provider);
|
||||
}
|
||||
|
||||
void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
pp->toneCurve.autoexp = autolevels->get_active();
|
||||
pp->toneCurve.clip = sclip->get_value ();
|
||||
@@ -294,20 +312,36 @@ void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
pp->toneCurve.curve2 = shape2->getCurve ();
|
||||
|
||||
int tcMode = toneCurveMode->get_active_row_number();
|
||||
if (tcMode == 0) pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_STD;
|
||||
else if (tcMode == 1) pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_WEIGHTEDSTD;
|
||||
else if (tcMode == 2) pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_FILMLIKE;
|
||||
else if (tcMode == 3) pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_SATANDVALBLENDING;
|
||||
else if (tcMode == 4) pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_LUMINANCE;
|
||||
else if (tcMode == 5) pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_PERCEPTUAL;
|
||||
|
||||
if (tcMode == 0) {
|
||||
pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_STD;
|
||||
} else if (tcMode == 1) {
|
||||
pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_WEIGHTEDSTD;
|
||||
} else if (tcMode == 2) {
|
||||
pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_FILMLIKE;
|
||||
} else if (tcMode == 3) {
|
||||
pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_SATANDVALBLENDING;
|
||||
} else if (tcMode == 4) {
|
||||
pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_LUMINANCE;
|
||||
} else if (tcMode == 5) {
|
||||
pp->toneCurve.curveMode = ToneCurveParams::TC_MODE_PERCEPTUAL;
|
||||
}
|
||||
|
||||
tcMode = toneCurveMode2->get_active_row_number();
|
||||
if (tcMode == 0) pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_STD;
|
||||
else if (tcMode == 1) pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_WEIGHTEDSTD;
|
||||
else if (tcMode == 2) pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_FILMLIKE;
|
||||
else if (tcMode == 3) pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_SATANDVALBLENDING;
|
||||
else if (tcMode == 4) pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_LUMINANCE;
|
||||
else if (tcMode == 5) pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_PERCEPTUAL;
|
||||
|
||||
if (tcMode == 0) {
|
||||
pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_STD;
|
||||
} else if (tcMode == 1) {
|
||||
pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_WEIGHTEDSTD;
|
||||
} else if (tcMode == 2) {
|
||||
pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_FILMLIKE;
|
||||
} else if (tcMode == 3) {
|
||||
pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_SATANDVALBLENDING;
|
||||
} else if (tcMode == 4) {
|
||||
pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_LUMINANCE;
|
||||
} else if (tcMode == 5) {
|
||||
pp->toneCurve.curveMode2 = ToneCurveParams::TC_MODE_PERCEPTUAL;
|
||||
}
|
||||
|
||||
if (pedited) {
|
||||
pedited->toneCurve.expcomp = expcomp->getEditedState ();
|
||||
@@ -325,23 +359,27 @@ void ToneCurve::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
pedited->toneCurve.curveMode = toneCurveMode->get_active_row_number() != 6;
|
||||
pedited->toneCurve.curveMode2 = toneCurveMode2->get_active_row_number() != 6;
|
||||
}
|
||||
|
||||
if (pedited) {
|
||||
pedited->toneCurve.method = method->get_active_row_number()!=4;
|
||||
pedited->toneCurve.method = method->get_active_row_number() != 4;
|
||||
pedited->toneCurve.hrenabled = !hrenabled->get_inconsistent();
|
||||
}
|
||||
|
||||
pp->toneCurve.hrenabled = hrenabled->get_active();
|
||||
if (method->get_active_row_number()==0)
|
||||
|
||||
if (method->get_active_row_number() == 0) {
|
||||
pp->toneCurve.method = "Luminance";
|
||||
else if (method->get_active_row_number()==1)
|
||||
} else if (method->get_active_row_number() == 1) {
|
||||
pp->toneCurve.method = "CIELab blending";
|
||||
else if (method->get_active_row_number()==2)
|
||||
} else if (method->get_active_row_number() == 2) {
|
||||
pp->toneCurve.method = "Color";
|
||||
else if (method->get_active_row_number()==3)
|
||||
} else if (method->get_active_row_number() == 3) {
|
||||
pp->toneCurve.method = "Blend";
|
||||
}
|
||||
}
|
||||
|
||||
void ToneCurve::hrenabledChanged () {
|
||||
void ToneCurve::hrenabledChanged ()
|
||||
{
|
||||
|
||||
if (multiImage) {
|
||||
if (hrenabled->get_inconsistent()) {
|
||||
@@ -349,18 +387,19 @@ void ToneCurve::hrenabledChanged () {
|
||||
enaconn.block (true);
|
||||
hrenabled->set_active (false);
|
||||
enaconn.block (false);
|
||||
}
|
||||
else if (lasthrEnabled)
|
||||
} else if (lasthrEnabled) {
|
||||
hrenabled->set_inconsistent (true);
|
||||
}
|
||||
|
||||
lasthrEnabled = hrenabled->get_active ();
|
||||
}
|
||||
|
||||
if (!batchMode) {
|
||||
if (hrenabled->get_active())
|
||||
if (hrenabled->get_active()) {
|
||||
hlrbox->show();
|
||||
else
|
||||
} else {
|
||||
hlrbox->hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
@@ -371,20 +410,25 @@ void ToneCurve::hrenabledChanged () {
|
||||
autoconn.block(false);
|
||||
autolevels->set_inconsistent (false);
|
||||
}
|
||||
if (hrenabled->get_active ())
|
||||
listener->panelChanged (EvHREnabled, M("GENERAL_ENABLED"));
|
||||
else
|
||||
listener->panelChanged (EvHREnabled, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
void ToneCurve::methodChanged () {
|
||||
|
||||
if (listener) {
|
||||
if (hrenabled->get_active ())
|
||||
listener->panelChanged (EvHRMethod, method->get_active_text ());
|
||||
if (hrenabled->get_active ()) {
|
||||
listener->panelChanged (EvHREnabled, M("GENERAL_ENABLED"));
|
||||
} else {
|
||||
listener->panelChanged (EvHREnabled, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
void ToneCurve::setRaw (bool raw) {
|
||||
void ToneCurve::methodChanged ()
|
||||
{
|
||||
|
||||
if (listener) {
|
||||
if (hrenabled->get_active ()) {
|
||||
listener->panelChanged (EvHRMethod, method->get_active_text ());
|
||||
}
|
||||
}
|
||||
}
|
||||
void ToneCurve::setRaw (bool raw)
|
||||
{
|
||||
|
||||
disableListener ();
|
||||
method->set_sensitive (raw);
|
||||
@@ -393,7 +437,8 @@ void ToneCurve::setRaw (bool raw) {
|
||||
}
|
||||
|
||||
|
||||
void ToneCurve::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
void ToneCurve::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
expcomp->setDefault (defParams->toneCurve.expcomp);
|
||||
brightness->setDefault (defParams->toneCurve.brightness);
|
||||
@@ -413,8 +458,7 @@ void ToneCurve::setDefaults (const ProcParams* defParams, const ParamsEdited* pe
|
||||
brightness->setDefaultEditedState (pedited->toneCurve.brightness ? Edited : UnEdited);
|
||||
contrast->setDefaultEditedState (pedited->toneCurve.contrast ? Edited : UnEdited);
|
||||
saturation->setDefaultEditedState (pedited->toneCurve.saturation ? Edited : UnEdited);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
expcomp->setDefaultEditedState (Irrelevant);
|
||||
black->setDefaultEditedState (Irrelevant);
|
||||
hlcompr->setDefaultEditedState (Irrelevant);
|
||||
@@ -426,89 +470,116 @@ void ToneCurve::setDefaults (const ProcParams* defParams, const ParamsEdited* pe
|
||||
}
|
||||
}
|
||||
|
||||
void ToneCurve::curveChanged (CurveEditor* ce) {
|
||||
void ToneCurve::curveChanged (CurveEditor* ce)
|
||||
{
|
||||
|
||||
if (listener) {
|
||||
if (ce == shape)
|
||||
if (ce == shape) {
|
||||
listener->panelChanged (EvToneCurve1, M("HISTORY_CUSTOMCURVE"));
|
||||
else if (ce == shape2)
|
||||
} else if (ce == shape2) {
|
||||
listener->panelChanged (EvToneCurve2, M("HISTORY_CUSTOMCURVE"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToneCurve::curveMode1Changed () {
|
||||
void ToneCurve::curveMode1Changed ()
|
||||
{
|
||||
//if (listener) listener->panelChanged (EvToneCurveMode, toneCurveMode->get_active_text());
|
||||
if (listener) Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::curveMode1Changed_));
|
||||
if (listener) {
|
||||
Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::curveMode1Changed_));
|
||||
}
|
||||
}
|
||||
|
||||
bool ToneCurve::curveMode1Changed_ () {
|
||||
if (listener) listener->panelChanged (EvToneCurveMode1, toneCurveMode->get_active_text());
|
||||
bool ToneCurve::curveMode1Changed_ ()
|
||||
{
|
||||
if (listener) {
|
||||
listener->panelChanged (EvToneCurveMode1, toneCurveMode->get_active_text());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ToneCurve::curveMode2Changed () {
|
||||
void ToneCurve::curveMode2Changed ()
|
||||
{
|
||||
//if (listener) listener->panelChanged (EvToneCurveMode, toneCurveMode->get_active_text());
|
||||
if (listener) Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::curveMode2Changed_));
|
||||
if (listener) {
|
||||
Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::curveMode2Changed_));
|
||||
}
|
||||
}
|
||||
|
||||
bool ToneCurve::curveMode2Changed_ () {
|
||||
if (listener) listener->panelChanged (EvToneCurveMode2, toneCurveMode2->get_active_text());
|
||||
bool ToneCurve::curveMode2Changed_ ()
|
||||
{
|
||||
if (listener) {
|
||||
listener->panelChanged (EvToneCurveMode2, toneCurveMode2->get_active_text());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
float ToneCurve::blendPipetteValues(CurveEditor *ce, float chan1, float chan2, float chan3) {
|
||||
float ToneCurve::blendPipetteValues(CurveEditor *ce, float chan1, float chan2, float chan3)
|
||||
{
|
||||
// assuming that all the channels are used...
|
||||
if (ce == shape) {
|
||||
if (toneCurveMode->get_active_row_number() == 4)
|
||||
return chan1*0.2126729f + chan2*0.7151521f + chan3*0.0721750f;
|
||||
}
|
||||
else if (ce == shape2) {
|
||||
if (toneCurveMode2->get_active_row_number() == 4)
|
||||
return chan1*0.2126729f + chan2*0.7151521f + chan3*0.0721750f;
|
||||
if (toneCurveMode->get_active_row_number() == 4) {
|
||||
return chan1 * 0.2126729f + chan2 * 0.7151521f + chan3 * 0.0721750f;
|
||||
}
|
||||
} else if (ce == shape2) {
|
||||
if (toneCurveMode2->get_active_row_number() == 4) {
|
||||
return chan1 * 0.2126729f + chan2 * 0.7151521f + chan3 * 0.0721750f;
|
||||
}
|
||||
}
|
||||
|
||||
return CurveListener::blendPipetteValues(ce, chan1, chan2, chan3);
|
||||
}
|
||||
|
||||
void ToneCurve::adjusterChanged (Adjuster* a, double newval) {
|
||||
void ToneCurve::adjusterChanged (Adjuster* a, double newval)
|
||||
{
|
||||
|
||||
// Switch off auto exposure if user changes sliders manually
|
||||
if (autolevels->get_active() && (a==expcomp || a==brightness || a==contrast || a==black || a==hlcompr || a==hlcomprthresh)) {
|
||||
if (autolevels->get_active() && (a == expcomp || a == brightness || a == contrast || a == black || a == hlcompr || a == hlcomprthresh)) {
|
||||
autoconn.block(true);
|
||||
autolevels->set_active (false);
|
||||
autoconn.block(false);
|
||||
autolevels->set_inconsistent (false);
|
||||
}
|
||||
|
||||
if (!listener)
|
||||
if (!listener) {
|
||||
return;
|
||||
}
|
||||
|
||||
Glib::ustring costr;
|
||||
if (a==expcomp)
|
||||
costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
|
||||
else
|
||||
costr = Glib::ustring::format ((int)a->getValue());
|
||||
|
||||
if (a==expcomp)
|
||||
listener->panelChanged (EvExpComp, costr);
|
||||
else if (a==brightness)
|
||||
listener->panelChanged (EvBrightness, costr);
|
||||
else if (a==black){
|
||||
listener->panelChanged (EvBlack, costr);
|
||||
if (!black->getAddMode()) shcompr->set_sensitive(!((int)black->getValue ()==0)); //at black=0 shcompr value has no effect
|
||||
if (a == expcomp) {
|
||||
costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
|
||||
} else {
|
||||
costr = Glib::ustring::format ((int)a->getValue());
|
||||
}
|
||||
else if (a==contrast)
|
||||
|
||||
if (a == expcomp) {
|
||||
listener->panelChanged (EvExpComp, costr);
|
||||
} else if (a == brightness) {
|
||||
listener->panelChanged (EvBrightness, costr);
|
||||
} else if (a == black) {
|
||||
listener->panelChanged (EvBlack, costr);
|
||||
|
||||
if (!black->getAddMode()) {
|
||||
shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect
|
||||
}
|
||||
} else if (a == contrast) {
|
||||
listener->panelChanged (EvContrast, costr);
|
||||
else if (a==saturation)
|
||||
} else if (a == saturation) {
|
||||
listener->panelChanged (EvSaturation, costr);
|
||||
else if (a==hlcompr)
|
||||
} else if (a == hlcompr) {
|
||||
listener->panelChanged (EvHLCompr, costr);
|
||||
else if (a==hlcomprthresh)
|
||||
} else if (a == hlcomprthresh) {
|
||||
listener->panelChanged (EvHLComprThreshold, costr);
|
||||
else if (a==shcompr)
|
||||
} else if (a == shcompr) {
|
||||
listener->panelChanged (EvSHCompr, costr);
|
||||
}
|
||||
}
|
||||
|
||||
void ToneCurve::neutral_pressed () {
|
||||
void ToneCurve::neutral_pressed ()
|
||||
{
|
||||
// This method deselects auto levels and HL reconstruction auto
|
||||
// and sets neutral values to params in exposure panel
|
||||
|
||||
@@ -519,8 +590,7 @@ void ToneCurve::neutral_pressed () {
|
||||
autoconn.block (false);
|
||||
|
||||
lastAuto = autolevels->get_active ();
|
||||
}
|
||||
else { //!batchMode
|
||||
} else { //!batchMode
|
||||
autolevels->set_active (false);
|
||||
autolevels->set_inconsistent (false);
|
||||
}
|
||||
@@ -534,15 +604,22 @@ void ToneCurve::neutral_pressed () {
|
||||
enaconn.block (true);
|
||||
hrenabled->set_active (false);
|
||||
enaconn.block (false);
|
||||
if (!batchMode)
|
||||
|
||||
if (!batchMode) {
|
||||
hlrbox->hide();
|
||||
if (!black->getAddMode()) shcompr->set_sensitive(!((int)black->getValue ()==0)); //at black=0 shcompr value has no effect
|
||||
}
|
||||
|
||||
if (!black->getAddMode()) {
|
||||
shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect
|
||||
}
|
||||
|
||||
contrast->setValue(0);
|
||||
//saturation->setValue(0);
|
||||
|
||||
listener->panelChanged (EvNeutralExp, M("GENERAL_ENABLED"));
|
||||
}
|
||||
void ToneCurve::autolevels_toggled () {
|
||||
void ToneCurve::autolevels_toggled ()
|
||||
{
|
||||
|
||||
if (batchMode) {
|
||||
if (autolevels->get_inconsistent()) {
|
||||
@@ -550,9 +627,9 @@ void ToneCurve::autolevels_toggled () {
|
||||
autoconn.block (true);
|
||||
autolevels->set_active (false);
|
||||
autoconn.block (false);
|
||||
}
|
||||
else if (lastAuto)
|
||||
} else if (lastAuto) {
|
||||
autolevels->set_inconsistent (true);
|
||||
}
|
||||
|
||||
lastAuto = autolevels->get_active ();
|
||||
|
||||
@@ -562,58 +639,80 @@ void ToneCurve::autolevels_toggled () {
|
||||
black->setEditedState (UnEdited);
|
||||
hlcompr->setEditedState (UnEdited);
|
||||
hlcomprthresh->setEditedState (UnEdited);
|
||||
if (expcomp->getAddMode())
|
||||
|
||||
if (expcomp->getAddMode()) {
|
||||
expcomp->setValue (0);
|
||||
if (brightness->getAddMode())
|
||||
}
|
||||
|
||||
if (brightness->getAddMode()) {
|
||||
brightness->setValue (0);
|
||||
if (contrast->getAddMode())
|
||||
}
|
||||
|
||||
if (contrast->getAddMode()) {
|
||||
contrast->setValue (0);
|
||||
if (black->getAddMode())
|
||||
}
|
||||
|
||||
if (black->getAddMode()) {
|
||||
black->setValue (0);
|
||||
if (hlcompr->getAddMode())
|
||||
}
|
||||
|
||||
if (hlcompr->getAddMode()) {
|
||||
hlcompr->setValue (0);
|
||||
if (hlcomprthresh->getAddMode())
|
||||
}
|
||||
|
||||
if (hlcomprthresh->getAddMode()) {
|
||||
hlcomprthresh->setValue (0);
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
if (!autolevels->get_inconsistent()) {
|
||||
if (autolevels->get_active ())
|
||||
if (autolevels->get_active ()) {
|
||||
listener->panelChanged (EvAutoExp, M("GENERAL_ENABLED"));
|
||||
else
|
||||
} else {
|
||||
listener->panelChanged (EvFixedExp, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (/* !batchMode && */ listener) {
|
||||
} else if (/* !batchMode && */ listener) {
|
||||
if (autolevels->get_active()) {
|
||||
listener->panelChanged (EvAutoExp, M("GENERAL_ENABLED"));
|
||||
waitForAutoExp ();
|
||||
if (!black->getAddMode()) shcompr->set_sensitive(!((int)black->getValue ()==0)); //at black=0 shcompr value has no effect
|
||||
}
|
||||
else {
|
||||
|
||||
if (!black->getAddMode()) {
|
||||
shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect
|
||||
}
|
||||
} else {
|
||||
listener->panelChanged (EvFixedExp, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToneCurve::clip_changed () {
|
||||
void ToneCurve::clip_changed ()
|
||||
{
|
||||
|
||||
clipDirty = true;
|
||||
if (autolevels->get_active() && listener)
|
||||
|
||||
if (autolevels->get_active() && listener) {
|
||||
Glib::signal_idle().connect (sigc::mem_fun(*this, &ToneCurve::clip_changed_));
|
||||
}
|
||||
}
|
||||
|
||||
bool ToneCurve::clip_changed_ () {
|
||||
bool ToneCurve::clip_changed_ ()
|
||||
{
|
||||
|
||||
if (listener) {
|
||||
listener->panelChanged (EvClip, Glib::ustring::format (std::setprecision(5), sclip->get_value()));
|
||||
if (!batchMode)
|
||||
|
||||
if (!batchMode) {
|
||||
waitForAutoExp ();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ToneCurve::waitForAutoExp () {
|
||||
void ToneCurve::waitForAutoExp ()
|
||||
{
|
||||
|
||||
sclip->set_sensitive (false);
|
||||
expcomp->setEnabled (false);
|
||||
@@ -633,12 +732,14 @@ void ToneCurve::waitForAutoExp () {
|
||||
method->set_sensitive(false);
|
||||
}
|
||||
|
||||
int autoExpChangedUI (void* data) {
|
||||
int autoExpChangedUI (void* data)
|
||||
{
|
||||
(static_cast<ToneCurve*>(data))->autoExpComputed_ ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ToneCurve::autoExpChanged (double expcomp, int bright, int contr, int black, int hlcompr, int hlcomprthresh, bool hlrecons) {
|
||||
void ToneCurve::autoExpChanged (double expcomp, int bright, int contr, int black, int hlcompr, int hlcomprthresh, bool hlrecons)
|
||||
{
|
||||
|
||||
nextBlack = black;
|
||||
nextExpcomp = expcomp;
|
||||
@@ -650,7 +751,8 @@ void ToneCurve::autoExpChanged (double expcomp, int bright, int contr, int black
|
||||
g_idle_add (autoExpChangedUI, this);
|
||||
}
|
||||
|
||||
void ToneCurve::enableAll () {
|
||||
void ToneCurve::enableAll ()
|
||||
{
|
||||
|
||||
sclip->set_sensitive (true);
|
||||
expcomp->setEnabled (true);
|
||||
@@ -669,7 +771,8 @@ void ToneCurve::enableAll () {
|
||||
method->set_sensitive(true);
|
||||
}
|
||||
|
||||
bool ToneCurve::autoExpComputed_ () {
|
||||
bool ToneCurve::autoExpComputed_ ()
|
||||
{
|
||||
|
||||
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
||||
disableListener ();
|
||||
@@ -683,17 +786,24 @@ bool ToneCurve::autoExpComputed_ () {
|
||||
enaconn.block (true);
|
||||
hrenabled->set_active (nextHLRecons);
|
||||
enaconn.block (false);
|
||||
if (nextHLRecons)
|
||||
|
||||
if (nextHLRecons) {
|
||||
hlrbox->show();
|
||||
else if (!batchMode)
|
||||
} else if (!batchMode) {
|
||||
hlrbox->hide();
|
||||
if (!black->getAddMode()) shcompr->set_sensitive(!((int)black->getValue ()==0)); //at black=0 shcompr value has no effect
|
||||
}
|
||||
|
||||
if (!black->getAddMode()) {
|
||||
shcompr->set_sensitive(!((int)black->getValue () == 0)); //at black=0 shcompr value has no effect
|
||||
}
|
||||
|
||||
enableListener ();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ToneCurve::setBatchMode (bool batchMode) {
|
||||
void ToneCurve::setBatchMode (bool batchMode)
|
||||
{
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
method->append_text (M("GENERAL_UNCHANGED"));
|
||||
|
||||
@@ -720,7 +830,8 @@ void ToneCurve::setBatchMode (bool batchMode) {
|
||||
curveEditorG2->setBatchMode (batchMode);
|
||||
}
|
||||
|
||||
void ToneCurve::setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthreshadd, bool bradd, bool blackadd, bool shcompadd, bool contradd, bool satadd) {
|
||||
void ToneCurve::setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthreshadd, bool bradd, bool blackadd, bool shcompadd, bool contradd, bool satadd)
|
||||
{
|
||||
|
||||
expcomp->setAddMode(expadd);
|
||||
hlcompr->setAddMode(hlcompadd);
|
||||
@@ -732,7 +843,8 @@ void ToneCurve::setAdjusterBehavior (bool expadd, bool hlcompadd, bool hlcompthr
|
||||
saturation->setAddMode(satadd);
|
||||
}
|
||||
|
||||
void ToneCurve::trimValues (rtengine::procparams::ProcParams* pp) {
|
||||
void ToneCurve::trimValues (rtengine::procparams::ProcParams* pp)
|
||||
{
|
||||
|
||||
expcomp->trimValue(pp->toneCurve.expcomp);
|
||||
hlcompr->trimValue(pp->toneCurve.hlcompr);
|
||||
@@ -744,7 +856,8 @@ void ToneCurve::trimValues (rtengine::procparams::ProcParams* pp) {
|
||||
saturation->trimValue(pp->toneCurve.saturation);
|
||||
}
|
||||
|
||||
void ToneCurve::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve, /*LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma) {
|
||||
void ToneCurve::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve, /*LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma)
|
||||
{
|
||||
|
||||
shape->updateBackgroundHistogram (histToneCurve);
|
||||
}
|
||||
|
Reference in New Issue
Block a user