Patch to enable saving/loading of pyramid/wavelet equalizer settings to/from profile.
This commit is contained in:
parent
f348121ffb
commit
f709617a8b
@ -347,7 +347,7 @@ int ProcParams::save (Glib::ustring fname) const {
|
||||
|
||||
// save directional pyramid equalizer parameters
|
||||
keyFile.set_boolean ("Directional Pyramid Equalizer", "Enabled", dirpyrequalizer.enabled);
|
||||
for(int i = 0; i < 8; i++)
|
||||
for(int i = 0; i < 5; i++)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Mult" << i;
|
||||
@ -608,7 +608,7 @@ if (keyFile.has_group ("Equalizer")) {
|
||||
// load directional pyramid equalizer parameters
|
||||
if (keyFile.has_group ("Directional Pyramid Equalizer")) {
|
||||
if (keyFile.has_key ("Directional Pyramid Equalizer", "Enabled")) dirpyrequalizer.enabled = keyFile.get_boolean ("Directional Pyramid Equalizer", "Enabled");
|
||||
for(int i = 0; i < 8; i ++)
|
||||
for(int i = 0; i < 5; i ++)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << "Mult" << i;
|
||||
@ -664,7 +664,7 @@ bool operator==(const DirPyrEqualizerParams & a, const DirPyrEqualizerParams & b
|
||||
if(a.enabled != b.enabled)
|
||||
return false;
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
for(int i = 0; i < 5; i++) {
|
||||
if(a.mult[i] != b.mult[i])
|
||||
return false;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ void ParamsEdited::set (bool v) {
|
||||
equalizer.enabled = v;
|
||||
dirpyrequalizer.enabled = v;
|
||||
|
||||
for(int i = 0; i < 8; i++)
|
||||
for(int i = 0; i < 5; i++)
|
||||
{
|
||||
equalizer.c[i] = v;
|
||||
dirpyrequalizer.mult[i] = v;
|
||||
|
@ -42,6 +42,8 @@ PartialPasteDlg::PartialPasteDlg () {
|
||||
lumaden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_LUMADENOISE")));
|
||||
lumacurve = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_LUMACURVE")));
|
||||
sh = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_SHADOWSHIGHLIGHTS")));
|
||||
dirpyreq = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DIRPYREQUALIZER")));
|
||||
waveq = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_WAVELETEQUALIZER")));
|
||||
|
||||
// options in color:
|
||||
colormixer = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORMIXER")));
|
||||
@ -87,6 +89,8 @@ PartialPasteDlg::PartialPasteDlg () {
|
||||
vboxes[1]->pack_start (*lumaden, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*lumacurve, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*sh, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*dirpyreq, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[1]->pack_start (*waveq, Gtk::PACK_SHRINK, 2);
|
||||
|
||||
vboxes[2]->pack_start (*color, Gtk::PACK_SHRINK, 2);
|
||||
vboxes[2]->pack_start (*hseps[2], Gtk::PACK_SHRINK, 2);
|
||||
@ -150,6 +154,8 @@ PartialPasteDlg::PartialPasteDlg () {
|
||||
lumadenConn = lumaden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*luminance, &Gtk::CheckButton::set_inconsistent), true));
|
||||
lumacurveConn = lumacurve->signal_toggled().connect (sigc::bind (sigc::mem_fun(*luminance, &Gtk::CheckButton::set_inconsistent), true));
|
||||
shConn = sh->signal_toggled().connect (sigc::bind (sigc::mem_fun(*luminance, &Gtk::CheckButton::set_inconsistent), true));
|
||||
dirpyreqConn = dirpyreq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*luminance, &Gtk::CheckButton::set_inconsistent), true));
|
||||
waveqConn = waveq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*luminance, &Gtk::CheckButton::set_inconsistent), true));
|
||||
|
||||
colormixerConn = colormixer->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
|
||||
colorshiftConn = colorshift->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
|
||||
@ -201,6 +207,8 @@ void PartialPasteDlg::luminanceToggled () {
|
||||
lumadenConn.block (true);
|
||||
lumacurveConn.block (true);
|
||||
shConn.block (true);
|
||||
dirpyreqConn.block (true);
|
||||
waveqConn.block (true);
|
||||
|
||||
luminance->set_inconsistent (false);
|
||||
|
||||
@ -209,12 +217,16 @@ void PartialPasteDlg::luminanceToggled () {
|
||||
lumaden->set_active (luminance->get_active ());
|
||||
lumacurve->set_active (luminance->get_active ());
|
||||
sh->set_active (luminance->get_active ());
|
||||
dirpyreq->set_active (luminance->get_active ());
|
||||
waveq->set_active (luminance->get_active ());
|
||||
|
||||
sharpenConn.block (false);
|
||||
impdenConn.block (false);
|
||||
lumadenConn.block (false);
|
||||
lumacurveConn.block (false);
|
||||
shConn.block (false);
|
||||
dirpyreqConn.block (false);
|
||||
waveqConn.block (false);
|
||||
}
|
||||
|
||||
void PartialPasteDlg::colorToggled () {
|
||||
@ -306,6 +318,8 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dst, const r
|
||||
if (lumaden->get_active ()) dst->lumaDenoise = src->lumaDenoise;
|
||||
if (lumacurve->get_active ()) dst->lumaCurve = src->lumaCurve;
|
||||
if (sh->get_active ()) dst->sh = src->sh;
|
||||
if (dirpyreq->get_active ()) dst->dirpyrequalizer = src->dirpyrequalizer;
|
||||
if (waveq->get_active ()) dst->equalizer = src->equalizer;
|
||||
|
||||
if (colormixer->get_active ()) dst->chmixer = src->chmixer;
|
||||
if (colorshift->get_active ()) dst->colorShift = src->colorShift;
|
||||
|
@ -44,6 +44,8 @@ class PartialPasteDlg : public Gtk::Dialog {
|
||||
Gtk::CheckButton* lumaden;
|
||||
Gtk::CheckButton* lumacurve;
|
||||
Gtk::CheckButton* sh;
|
||||
Gtk::CheckButton* dirpyreq;
|
||||
Gtk::CheckButton* waveq;
|
||||
|
||||
// options in color:
|
||||
Gtk::CheckButton* colormixer;
|
||||
@ -71,7 +73,7 @@ class PartialPasteDlg : public Gtk::Dialog {
|
||||
|
||||
sigc::connection basicConn, luminanceConn, colorConn, lensConn, compositionConn, metaicmConn;
|
||||
sigc::connection wbConn, exposureConn, hlrecConn;
|
||||
sigc::connection sharpenConn, impdenConn, lumadenConn, lumacurveConn, shConn;
|
||||
sigc::connection sharpenConn, impdenConn, lumadenConn, lumacurveConn, shConn, dirpyreqConn, waveqConn;
|
||||
sigc::connection colormixerConn, colorshiftConn, colorboostConn, colordenConn, dirpyrdenConn;
|
||||
sigc::connection distortionConn, cacorrConn, vignettingConn;
|
||||
sigc::connection coarserotConn, finerotConn, cropConn, resizeConn;
|
||||
|
Loading…
x
Reference in New Issue
Block a user