GUI update, thanks Michael!
This commit is contained in:
@@ -212,7 +212,7 @@ void BatchToolPanelCoordinator::initSession () {
|
||||
if (options.baBehav[ADDSET_VIGN_AMOUNT]) pparams.vignetting.amount = 0;
|
||||
|
||||
if (options.baBehav[ADDSET_DIRPYREQ]) for (int i=0; i<5; i++) pparams.dirpyrequalizer.mult[i] = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_CHLUM]) pparams.dirpyrDenoise.Lamt = pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_CHLUM]) pparams.dirpyrDenoise.Ldetail = pparams.dirpyrDenoise.luma = pparams.dirpyrDenoise.chroma = 0;
|
||||
if (options.baBehav[ADDSET_DIRPYRDN_GAMMA]) pparams.dirpyrDenoise.gamma = 0;
|
||||
|
||||
if (options.baBehav[ADDSET_PREPROCESS_GREENEQUIL]) pparams.raw.greenthresh = 0;
|
||||
|
@@ -36,23 +36,23 @@ DirPyrDenoise::DirPyrDenoise () : Gtk::VBox(), FoldableToolPanel(this) {
|
||||
|
||||
enaConn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &DirPyrDenoise::enabledChanged) );
|
||||
|
||||
Lamt = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LAMT"), 0, 100, 1, 10));
|
||||
luma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LUMA"), 0, 100, 1, 10));
|
||||
chroma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_CHROMA"), 0, 100, 1, 10));
|
||||
luma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LUMA"), 0, 100, 0.01, 10));
|
||||
Ldetail = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_LDETAIL"), 0, 100, 0.01, 10));
|
||||
chroma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_CHROMA"), 0, 100, 0.01, 10));
|
||||
gamma = Gtk::manage (new Adjuster (M("TP_DIRPYRDENOISE_GAMMA"), 1.0, 3.0, 0.01, 0.10));
|
||||
|
||||
Lamt->setAdjusterListener (this);
|
||||
luma->setAdjusterListener (this);
|
||||
Ldetail->setAdjusterListener (this);
|
||||
chroma->setAdjusterListener (this);
|
||||
gamma->setAdjusterListener (this);
|
||||
|
||||
Lamt->show();
|
||||
luma->show();
|
||||
chroma->show();
|
||||
luma->show();
|
||||
Ldetail->show();
|
||||
chroma->show();
|
||||
gamma->show();
|
||||
|
||||
pack_start (*Lamt);
|
||||
pack_start (*luma);
|
||||
pack_start (*Ldetail);
|
||||
pack_start (*chroma);
|
||||
pack_start (*gamma);
|
||||
|
||||
@@ -63,9 +63,9 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
disableListener ();
|
||||
|
||||
if (pedited) {
|
||||
Lamt->setEditedState (pedited->dirpyrDenoise.Lamt ? Edited : UnEdited);
|
||||
luma->setEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
chroma->setEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
Ldetail->setEditedState (pedited->dirpyrDenoise.Ldetail ? Edited : UnEdited);
|
||||
chroma->setEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
gamma->setEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited);
|
||||
enabled->set_inconsistent (!pedited->dirpyrDenoise.enabled);
|
||||
}
|
||||
@@ -76,8 +76,8 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
lastEnabled = pp->dirpyrDenoise.enabled;
|
||||
|
||||
Lamt->setValue (pp->dirpyrDenoise.Lamt);
|
||||
luma->setValue (pp->dirpyrDenoise.luma);
|
||||
Ldetail->setValue (pp->dirpyrDenoise.Ldetail);
|
||||
chroma->setValue (pp->dirpyrDenoise.chroma);
|
||||
gamma->setValue (pp->dirpyrDenoise.gamma);
|
||||
|
||||
@@ -86,15 +86,15 @@ void DirPyrDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
|
||||
void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
pp->dirpyrDenoise.Lamt = Lamt->getValue ();
|
||||
pp->dirpyrDenoise.luma = luma->getValue ();
|
||||
pp->dirpyrDenoise.Ldetail = Ldetail->getValue ();
|
||||
pp->dirpyrDenoise.chroma = chroma->getValue ();
|
||||
pp->dirpyrDenoise.gamma = gamma->getValue ();
|
||||
pp->dirpyrDenoise.enabled = enabled->get_active();
|
||||
|
||||
if (pedited) {
|
||||
pedited->dirpyrDenoise.Lamt = Lamt->getEditedState ();
|
||||
pedited->dirpyrDenoise.luma = luma->getEditedState ();
|
||||
pedited->dirpyrDenoise.Ldetail = Ldetail->getEditedState ();
|
||||
pedited->dirpyrDenoise.chroma = chroma->getEditedState ();
|
||||
pedited->dirpyrDenoise.gamma = gamma->getEditedState ();
|
||||
pedited->dirpyrDenoise.enabled = !enabled->get_inconsistent();
|
||||
@@ -103,21 +103,21 @@ void DirPyrDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
|
||||
void DirPyrDenoise::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
|
||||
Lamt->setDefault (defParams->dirpyrDenoise.Lamt);
|
||||
luma->setDefault (defParams->dirpyrDenoise.luma);
|
||||
chroma->setDefault (defParams->dirpyrDenoise.chroma);
|
||||
luma->setDefault (defParams->dirpyrDenoise.luma);
|
||||
Ldetail->setDefault (defParams->dirpyrDenoise.Ldetail);
|
||||
chroma->setDefault (defParams->dirpyrDenoise.chroma);
|
||||
gamma->setDefault (defParams->dirpyrDenoise.chroma);
|
||||
|
||||
if (pedited) {
|
||||
Lamt->setDefaultEditedState (pedited->dirpyrDenoise.Lamt ? Edited : UnEdited);
|
||||
luma->setDefaultEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
chroma->setDefaultEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
luma->setDefaultEditedState (pedited->dirpyrDenoise.luma ? Edited : UnEdited);
|
||||
Ldetail->setDefaultEditedState (pedited->dirpyrDenoise.Ldetail ? Edited : UnEdited);
|
||||
chroma->setDefaultEditedState (pedited->dirpyrDenoise.chroma ? Edited : UnEdited);
|
||||
gamma->setDefaultEditedState (pedited->dirpyrDenoise.gamma ? Edited : UnEdited);
|
||||
}
|
||||
else {
|
||||
Lamt->setDefaultEditedState (Irrelevant);
|
||||
luma->setDefaultEditedState (Irrelevant);
|
||||
chroma->setDefaultEditedState (Irrelevant);
|
||||
Ldetail->setDefaultEditedState (Irrelevant);
|
||||
chroma->setDefaultEditedState (Irrelevant);
|
||||
gamma->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
}
|
||||
@@ -126,8 +126,8 @@ void DirPyrDenoise::adjusterChanged (Adjuster* a, double newval) {
|
||||
|
||||
if (listener && enabled->get_active()) {
|
||||
|
||||
if (a==Lamt)
|
||||
listener->panelChanged (EvDPDNLamt, Glib::ustring::format ((int)a->getValue()));
|
||||
if (a==Ldetail)
|
||||
listener->panelChanged (EvDPDNLdetail, Glib::ustring::format ((int)a->getValue()));
|
||||
else if (a==luma)
|
||||
listener->panelChanged (EvDPDNLuma, Glib::ustring::format ((int)a->getValue()));
|
||||
else if (a==chroma)
|
||||
@@ -163,23 +163,23 @@ void DirPyrDenoise::enabledChanged () {
|
||||
void DirPyrDenoise::setBatchMode (bool batchMode) {
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
Lamt->showEditedCB ();
|
||||
luma->showEditedCB ();
|
||||
Ldetail->showEditedCB ();
|
||||
chroma->showEditedCB ();
|
||||
}
|
||||
|
||||
void DirPyrDenoise::setAdjusterBehavior (bool chrolumaadd, bool gammaadd) {
|
||||
|
||||
Lamt->setAddMode(chrolumaadd);
|
||||
luma->setAddMode(chrolumaadd);
|
||||
Ldetail->setAddMode(chrolumaadd);
|
||||
chroma->setAddMode(chrolumaadd);
|
||||
gamma->setAddMode(gammaadd);
|
||||
}
|
||||
|
||||
void DirPyrDenoise::trimValues (rtengine::procparams::ProcParams* pp) {
|
||||
|
||||
Lamt->trimValue(pp->dirpyrDenoise.Lamt);
|
||||
luma->trimValue(pp->dirpyrDenoise.luma);
|
||||
Ldetail->trimValue(pp->dirpyrDenoise.Ldetail);
|
||||
chroma->trimValue(pp->dirpyrDenoise.chroma);
|
||||
gamma->trimValue(pp->dirpyrDenoise.gamma);
|
||||
}
|
||||
|
@@ -26,9 +26,9 @@
|
||||
class DirPyrDenoise : public Gtk::VBox, public AdjusterListener, public FoldableToolPanel {
|
||||
|
||||
protected:
|
||||
Adjuster* Lamt;
|
||||
Adjuster* luma;
|
||||
Adjuster* chroma;
|
||||
Adjuster* luma;
|
||||
Adjuster* Ldetail;
|
||||
Adjuster* chroma;
|
||||
Adjuster* gamma;
|
||||
|
||||
Gtk::CheckButton* enabled;
|
||||
|
@@ -100,8 +100,8 @@ void ParamsEdited::set (bool v) {
|
||||
impulseDenoise.enabled = v;
|
||||
impulseDenoise.thresh = v;
|
||||
dirpyrDenoise.enabled = v;
|
||||
dirpyrDenoise.Lamt = v;
|
||||
dirpyrDenoise.luma = v;
|
||||
dirpyrDenoise.Ldetail = v;
|
||||
dirpyrDenoise.chroma = v;
|
||||
dirpyrDenoise.gamma = v;
|
||||
edgePreservingDecompositionUI.enabled = v;
|
||||
@@ -290,8 +290,8 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
|
||||
impulseDenoise.thresh = impulseDenoise.thresh && p.impulseDenoise.thresh == other.impulseDenoise.thresh;
|
||||
|
||||
dirpyrDenoise.enabled = dirpyrDenoise.enabled && p.dirpyrDenoise.enabled == other.dirpyrDenoise.enabled;
|
||||
dirpyrDenoise.Lamt = dirpyrDenoise.Lamt && p.dirpyrDenoise.Lamt == other.dirpyrDenoise.Lamt;
|
||||
dirpyrDenoise.luma = dirpyrDenoise.luma && p.dirpyrDenoise.luma == other.dirpyrDenoise.luma;
|
||||
dirpyrDenoise.Ldetail = dirpyrDenoise.Ldetail && p.dirpyrDenoise.Ldetail == other.dirpyrDenoise.Ldetail;
|
||||
dirpyrDenoise.chroma = dirpyrDenoise.chroma && p.dirpyrDenoise.chroma == other.dirpyrDenoise.chroma;
|
||||
dirpyrDenoise.gamma = dirpyrDenoise.gamma && p.dirpyrDenoise.gamma == other.dirpyrDenoise.gamma;
|
||||
|
||||
@@ -478,8 +478,8 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
|
||||
if (impulseDenoise.thresh) toEdit.impulseDenoise.thresh = mods.impulseDenoise.thresh;
|
||||
|
||||
if (dirpyrDenoise.enabled) toEdit.dirpyrDenoise.enabled = mods.dirpyrDenoise.enabled;
|
||||
if (dirpyrDenoise.Lamt) toEdit.dirpyrDenoise.Lamt = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.Lamt + mods.dirpyrDenoise.Lamt : mods.dirpyrDenoise.Lamt;
|
||||
if (dirpyrDenoise.luma) toEdit.dirpyrDenoise.luma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.luma + mods.dirpyrDenoise.luma : mods.dirpyrDenoise.luma;
|
||||
if (dirpyrDenoise.Ldetail) toEdit.dirpyrDenoise.Ldetail = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.Ldetail + mods.dirpyrDenoise.Ldetail : mods.dirpyrDenoise.Ldetail;
|
||||
if (dirpyrDenoise.chroma) toEdit.dirpyrDenoise.chroma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_CHLUM] ? toEdit.dirpyrDenoise.chroma + mods.dirpyrDenoise.chroma : mods.dirpyrDenoise.chroma;
|
||||
if (dirpyrDenoise.gamma) toEdit.dirpyrDenoise.gamma = dontforceSet && options.baBehav[ADDSET_DIRPYRDN_GAMMA] ? toEdit.dirpyrDenoise.gamma + mods.dirpyrDenoise.gamma : mods.dirpyrDenoise.gamma;
|
||||
|
||||
|
@@ -170,7 +170,7 @@ class DirPyrDenoiseParamsEdited {
|
||||
|
||||
public:
|
||||
bool enabled;
|
||||
bool Lamt;
|
||||
bool Ldetail;
|
||||
bool luma;
|
||||
bool chroma;
|
||||
bool gamma;
|
||||
|
Reference in New Issue
Block a user