code cleanup after the new shadows/highlights tool
This commit is contained in:
@@ -51,7 +51,6 @@ ExportPanel::ExportPanel () : listener (nullptr)
|
||||
//bypass_colorDenoise = Gtk::manage ( new Gtk::CheckButton (M("EXPORT_BYPASS_COLORDENOISE")));
|
||||
bypass_defringe = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DEFRINGE")));
|
||||
bypass_dirpyrDenoise = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DIRPYRDENOISE")));
|
||||
bypass_sh_hq = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_SH_HQ")));
|
||||
bypass_dirpyrequalizer = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_DIRPYREQUALIZER")));
|
||||
bypass_wavelet = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_EQUALIZER")));
|
||||
bypass_raw_ccSteps = Gtk::manage ( new Gtk::CheckButton (M ("EXPORT_BYPASS_RAW_CCSTEPS")));
|
||||
@@ -120,7 +119,6 @@ ExportPanel::ExportPanel () : listener (nullptr)
|
||||
//pack_start(*bypass_colorDenoise , Gtk::PACK_SHRINK, 4);
|
||||
bypass_box->pack_start (*bypass_defringe, Gtk::PACK_SHRINK, 4);
|
||||
bypass_box->pack_start (*bypass_dirpyrDenoise, Gtk::PACK_SHRINK, 4);
|
||||
bypass_box->pack_start (*bypass_sh_hq, Gtk::PACK_SHRINK, 4);
|
||||
bypass_box->pack_start (*bypass_dirpyrequalizer, Gtk::PACK_SHRINK, 4);
|
||||
bypass_box->pack_start (*bypass_wavelet, Gtk::PACK_SHRINK, 4);
|
||||
|
||||
@@ -206,7 +204,6 @@ ExportPanel::ExportPanel () : listener (nullptr)
|
||||
//bypass_colorDenoiseConn = bypass_colorDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
|
||||
bypass_defringeConn = bypass_defringe->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
|
||||
bypass_dirpyrDenoiseConn = bypass_dirpyrDenoise->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
|
||||
bypass_sh_hqConn = bypass_sh_hq->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
|
||||
bypass_dirpyrequalizerConn = bypass_dirpyrequalizer->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
|
||||
bypass_waveletConn = bypass_wavelet->signal_toggled().connect (sigc::bind (sigc::mem_fun (*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
|
||||
//bypass_raw_all_enhanceConn = bypass_raw_bayer_all_enhance->signal_toggled().connect (sigc::bind (sigc::mem_fun(*bypass_ALL, &Gtk::CheckButton::set_inconsistent), true));
|
||||
@@ -258,7 +255,6 @@ void ExportPanel::SaveSettingsAsDefault()
|
||||
//options.fastexport_bypass_colorDenoise = bypass_colorDenoise->get_active ();
|
||||
FE_OPT_STORE_ (options.fastexport_bypass_defringe, bypass_defringe->get_active ());
|
||||
FE_OPT_STORE_ (options.fastexport_bypass_dirpyrDenoise, bypass_dirpyrDenoise->get_active ());
|
||||
FE_OPT_STORE_ (options.fastexport_bypass_sh_hq, bypass_sh_hq->get_active ());
|
||||
FE_OPT_STORE_ (options.fastexport_bypass_dirpyrequalizer, bypass_dirpyrequalizer->get_active ());
|
||||
FE_OPT_STORE_ (options.fastexport_bypass_wavelet, bypass_wavelet->get_active ());
|
||||
//options.fastexport_bypass_raw_bayer_all_enhance = bypass_raw_all_enhance->get_active ();
|
||||
@@ -322,7 +318,6 @@ void ExportPanel::LoadDefaultSettings()
|
||||
//bypass_colorDenoise->set_active (options.fastexport_bypass_colorDenoise );
|
||||
bypass_defringe->set_active (options.fastexport_bypass_defringe );
|
||||
bypass_dirpyrDenoise->set_active (options.fastexport_bypass_dirpyrDenoise );
|
||||
bypass_sh_hq->set_active (options.fastexport_bypass_sh_hq );
|
||||
bypass_dirpyrequalizer->set_active (options.fastexport_bypass_dirpyrequalizer );
|
||||
bypass_wavelet->set_active (options.fastexport_bypass_wavelet );
|
||||
//bypass_raw_bayer_all_enhance->set_active (options.fastexport_bypass_raw_bayer_all_enhance );
|
||||
@@ -394,7 +389,6 @@ void ExportPanel::bypassALL_Toggled()
|
||||
//bypass_colorDenoiseConn.block (true);
|
||||
bypass_defringeConn.block (true);
|
||||
bypass_dirpyrDenoiseConn.block (true);
|
||||
bypass_sh_hqConn.block (true);
|
||||
bypass_dirpyrequalizerConn.block (true);
|
||||
bypass_waveletConn.block (true);
|
||||
//bypass_raw_bayer_all_enhanceConn.block (true);
|
||||
@@ -417,7 +411,6 @@ void ExportPanel::bypassALL_Toggled()
|
||||
//bypass_colorDenoise->set_active(bypass_ALL->get_active());
|
||||
bypass_defringe->set_active (bypass_ALL->get_active());
|
||||
bypass_dirpyrDenoise->set_active (bypass_ALL->get_active());
|
||||
bypass_sh_hq->set_active (bypass_ALL->get_active());
|
||||
bypass_dirpyrequalizer->set_active (bypass_ALL->get_active());
|
||||
bypass_wavelet->set_active (bypass_ALL->get_active());
|
||||
//bypass_raw_bayer_all_enhance->set_active(bypass_ALL->get_active());
|
||||
@@ -438,7 +431,6 @@ void ExportPanel::bypassALL_Toggled()
|
||||
//bypass_colorDenoiseConn.block (false);
|
||||
bypass_defringeConn.block (false);
|
||||
bypass_dirpyrDenoiseConn.block (false);
|
||||
bypass_sh_hqConn.block (false);
|
||||
bypass_dirpyrequalizerConn.block (false);
|
||||
bypass_waveletConn.block (false);
|
||||
//bypass_raw_bayer_all_enhanceConn.block (false);
|
||||
@@ -466,7 +458,6 @@ fastexport_bypass_lumaDenoise
|
||||
fastexport_bypass_colorDenoise
|
||||
fastexport_bypass_defringe
|
||||
fastexport_bypass_dirpyrDenoise
|
||||
fastexport_bypass_sh_hq
|
||||
fastexport_bypass_dirpyrequalizer
|
||||
fastexport_raw_bayer_method
|
||||
fastexport_bypass_raw_bayer_all_enhance
|
||||
|
||||
@@ -48,7 +48,6 @@ protected:
|
||||
//Gtk::CheckButton* bypass_colorDenoise;
|
||||
Gtk::CheckButton* bypass_defringe;
|
||||
Gtk::CheckButton* bypass_dirpyrDenoise;
|
||||
Gtk::CheckButton* bypass_sh_hq;
|
||||
|
||||
/* icm_input = "(camera)";
|
||||
icm_working = "sRGB";
|
||||
@@ -88,7 +87,6 @@ protected:
|
||||
//sigc::connection bypass_colorDenoiseConn ;
|
||||
sigc::connection bypass_defringeConn ;
|
||||
sigc::connection bypass_dirpyrDenoiseConn ;
|
||||
sigc::connection bypass_sh_hqConn ;
|
||||
sigc::connection bypass_dirpyrequalizerConn ;
|
||||
sigc::connection bypass_waveletConn ;
|
||||
//sigc::connection bypass_raw_bayer_all_enhanceConn ;
|
||||
|
||||
@@ -1129,10 +1129,6 @@ void FileCatalog::developRequested (std::vector<FileBrowserEntry*> tbe, bool fas
|
||||
params.dirpyrDenoise.enabled = false;
|
||||
}
|
||||
|
||||
if (options.fastexport_bypass_sh_hq) {
|
||||
params.sh.hq = false;
|
||||
}
|
||||
|
||||
if (options.fastexport_bypass_dirpyrequalizer) {
|
||||
params.dirpyrequalizer.enabled = false;
|
||||
}
|
||||
|
||||
@@ -447,7 +447,6 @@ void Options::setDefaults ()
|
||||
//fastexport_bypass_colorDenoise = true;
|
||||
fastexport_bypass_defringe = true;
|
||||
fastexport_bypass_dirpyrDenoise = true;
|
||||
fastexport_bypass_sh_hq = true;
|
||||
fastexport_bypass_dirpyrequalizer = true;
|
||||
fastexport_bypass_wavelet = true;
|
||||
fastexport_raw_bayer_method = "fast";
|
||||
@@ -1538,10 +1537,6 @@ void Options::readFromFile (Glib::ustring fname)
|
||||
fastexport_bypass_dirpyrDenoise = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise" );
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("Fast Export", "fastexport_bypass_sh_hq" )) {
|
||||
fastexport_bypass_sh_hq = keyFile.get_boolean ("Fast Export", "fastexport_bypass_sh_hq" );
|
||||
}
|
||||
|
||||
if (keyFile.has_key ("Fast Export", "fastexport_bypass_dirpyrequalizer" )) {
|
||||
fastexport_bypass_dirpyrequalizer = keyFile.get_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer" );
|
||||
}
|
||||
@@ -2017,7 +2012,6 @@ void Options::saveToFile (Glib::ustring fname)
|
||||
//keyFile.set_boolean ("Fast Export", "fastexport_bypass_colorDenoise" , fastexport_bypass_colorDenoise);
|
||||
keyFile.set_boolean ("Fast Export", "fastexport_bypass_defringe", fastexport_bypass_defringe);
|
||||
keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrDenoise", fastexport_bypass_dirpyrDenoise);
|
||||
keyFile.set_boolean ("Fast Export", "fastexport_bypass_sh_hq", fastexport_bypass_sh_hq);
|
||||
keyFile.set_boolean ("Fast Export", "fastexport_bypass_dirpyrequalizer", fastexport_bypass_dirpyrequalizer);
|
||||
keyFile.set_boolean ("Fast Export", "fastexport_bypass_wavelet", fastexport_bypass_wavelet);
|
||||
keyFile.set_string ("Fast Export", "fastexport_raw_bayer_method", fastexport_raw_bayer_method);
|
||||
|
||||
@@ -295,7 +295,6 @@ public:
|
||||
//bool fastexport_bypass_colorDenoise;
|
||||
bool fastexport_bypass_defringe;
|
||||
bool fastexport_bypass_dirpyrDenoise;
|
||||
bool fastexport_bypass_sh_hq;
|
||||
bool fastexport_bypass_dirpyrequalizer;
|
||||
bool fastexport_bypass_wavelet;
|
||||
Glib::ustring fastexport_raw_bayer_method;
|
||||
|
||||
@@ -283,7 +283,6 @@ void ParamsEdited::set (bool v)
|
||||
fattal.amount = v;
|
||||
fattal.anchor = v;
|
||||
sh.enabled = v;
|
||||
sh.hq = v;
|
||||
sh.highlights = v;
|
||||
sh.htonalwidth = v;
|
||||
sh.shadows = v;
|
||||
@@ -849,7 +848,6 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
fattal.anchor = fattal.anchor && p.fattal.anchor == other.fattal.anchor;
|
||||
|
||||
sh.enabled = sh.enabled && p.sh.enabled == other.sh.enabled;
|
||||
sh.hq = sh.hq && p.sh.hq == other.sh.hq;
|
||||
sh.highlights = sh.highlights && p.sh.highlights == other.sh.highlights;
|
||||
sh.htonalwidth = sh.htonalwidth && p.sh.htonalwidth == other.sh.htonalwidth;
|
||||
sh.shadows = sh.shadows && p.sh.shadows == other.sh.shadows;
|
||||
@@ -2088,10 +2086,6 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
toEdit.sh.enabled = mods.sh.enabled;
|
||||
}
|
||||
|
||||
if (sh.hq) {
|
||||
toEdit.sh.hq = mods.sh.hq;
|
||||
}
|
||||
|
||||
if (sh.highlights) {
|
||||
toEdit.sh.highlights = dontforceSet && options.baBehav[ADDSET_SH_HIGHLIGHTS] ? toEdit.sh.highlights + mods.sh.highlights : mods.sh.highlights;
|
||||
}
|
||||
|
||||
@@ -23,22 +23,15 @@ using namespace rtengine::procparams;
|
||||
|
||||
ShadowsHighlights::ShadowsHighlights () : FoldableToolPanel(this, "shadowshighlights", M("TP_SHADOWSHLIGHTS_LABEL"), false, true)
|
||||
{
|
||||
|
||||
hq = Gtk::manage (new Gtk::CheckButton (M("TP_SHADOWSHLIGHTS_SHARPMASK")));
|
||||
hq->set_active (false);
|
||||
pack_start (*hq);
|
||||
hqConn = hq->signal_toggled().connect( sigc::mem_fun(*this, &ShadowsHighlights::hqChanged) );
|
||||
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
highlights = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0));
|
||||
h_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 80));
|
||||
h_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_HLTONALW"), 10, 100, 1, 70));
|
||||
pack_start (*highlights);
|
||||
pack_start (*h_tonalwidth);
|
||||
|
||||
pack_start (*Gtk::manage (new Gtk::HSeparator()));
|
||||
|
||||
shadows = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHADOWS"), 0, 100, 1, 0));
|
||||
s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 80));
|
||||
s_tonalwidth = Gtk::manage (new Adjuster (M("TP_SHADOWSHLIGHTS_SHTONALW"), 10, 100, 1, 30));
|
||||
pack_start (*shadows);
|
||||
pack_start (*s_tonalwidth);
|
||||
|
||||
@@ -68,17 +61,10 @@ void ShadowsHighlights::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
shadows->setEditedState (pedited->sh.shadows ? Edited : UnEdited);
|
||||
s_tonalwidth->setEditedState (pedited->sh.stonalwidth ? Edited : UnEdited);
|
||||
set_inconsistent (multiImage && !pedited->sh.enabled);
|
||||
hq->set_inconsistent (!pedited->sh.hq);
|
||||
}
|
||||
|
||||
setEnabled (pp->sh.enabled);
|
||||
|
||||
hqConn.block (true);
|
||||
hq->set_active (pp->sh.hq);
|
||||
hqConn.block (false);
|
||||
|
||||
lastHQ = pp->sh.hq;
|
||||
|
||||
radius->setValue (pp->sh.radius);
|
||||
highlights->setValue (pp->sh.highlights);
|
||||
h_tonalwidth->setValue (pp->sh.htonalwidth);
|
||||
@@ -97,7 +83,6 @@ void ShadowsHighlights::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
pp->sh.shadows = (int)shadows->getValue ();
|
||||
pp->sh.stonalwidth = (int)s_tonalwidth->getValue ();
|
||||
pp->sh.enabled = getEnabled();
|
||||
pp->sh.hq = hq->get_active();
|
||||
|
||||
if (pedited) {
|
||||
pedited->sh.radius = radius->getEditedState ();
|
||||
@@ -106,7 +91,6 @@ void ShadowsHighlights::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
pedited->sh.shadows = shadows->getEditedState ();
|
||||
pedited->sh.stonalwidth = s_tonalwidth->getEditedState ();
|
||||
pedited->sh.enabled = !get_inconsistent();
|
||||
pedited->sh.hq = !hq->get_inconsistent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,31 +153,6 @@ void ShadowsHighlights::enabledChanged ()
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowsHighlights::hqChanged ()
|
||||
{
|
||||
|
||||
if (batchMode) {
|
||||
if (hq->get_inconsistent()) {
|
||||
hq->set_inconsistent (false);
|
||||
hqConn.block (true);
|
||||
hq->set_active (false);
|
||||
hqConn.block (false);
|
||||
} else if (lastHQ) {
|
||||
hq->set_inconsistent (true);
|
||||
}
|
||||
|
||||
lastHQ = hq->get_active ();
|
||||
}
|
||||
|
||||
if (listener) {
|
||||
if (hq->get_active()) {
|
||||
listener->panelChanged (EvSHHighQuality, M("GENERAL_ENABLED"));
|
||||
} else {
|
||||
listener->panelChanged (EvSHHighQuality, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ShadowsHighlights::setBatchMode (bool batchMode)
|
||||
{
|
||||
|
||||
|
||||
@@ -32,9 +32,6 @@ protected:
|
||||
Adjuster* shadows;
|
||||
Adjuster* s_tonalwidth;
|
||||
Adjuster* radius;
|
||||
Gtk::CheckButton* hq;
|
||||
bool lastHQ;
|
||||
sigc::connection hqConn;
|
||||
|
||||
public:
|
||||
|
||||
@@ -47,7 +44,6 @@ public:
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void enabledChanged ();
|
||||
void hqChanged ();
|
||||
|
||||
void setAdjusterBehavior (bool hadd, bool sadd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
|
||||
Reference in New Issue
Block a user