Merge branch 'dev' into favorites-gui

This commit is contained in:
Lawrence Lee
2023-01-02 15:37:07 -08:00
193 changed files with 64046 additions and 10050 deletions

View File

@@ -66,7 +66,7 @@ std::vector<GradientMilestone> makeWholeHueRange()
Wavelet::Wavelet() :
FoldableToolPanel(this, TOOL_NAME, M("TP_WAVELET_LABEL"), true, true),
curveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CONTEDIT"))),
curveEditorC(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CONTRASTEDIT"))),
//curveEditorC(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CONTRASTEDIT"))),
CCWcurveEditorG(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_CCURVE"))),
curveEditorbl(new CurveEditorGroup(options.lastWaveletCurvesDir, M("TP_WAVELET_BLCURVE"))),
curveEditorRES(new CurveEditorGroup(options.lastWaveletCurvesDir)),
@@ -180,7 +180,7 @@ Wavelet::Wavelet() :
Dirmethod(Gtk::manage(new MyComboBoxText())),
Medgreinf(Gtk::manage(new MyComboBoxText())),
ushamethod(Gtk::manage(new MyComboBoxText())),
denmethod(Gtk::manage(new MyComboBoxText())),
//denmethod(Gtk::manage(new MyComboBoxText())),
mixmethod(Gtk::manage(new MyComboBoxText())),
quamethod(Gtk::manage(new MyComboBoxText())),
slimethod(Gtk::manage(new MyComboBoxText())),
@@ -216,7 +216,7 @@ Wavelet::Wavelet() :
ctboxch(Gtk::manage(new Gtk::Box())),
quaHBox(Gtk::manage(new Gtk::Box())),
sliHBox(Gtk::manage(new Gtk::Box())),
denHBox(Gtk::manage(new Gtk::Box())),
//denHBox(Gtk::manage(new Gtk::Box())),
mixHBox(Gtk::manage(new Gtk::Box())),
ctboxBA(Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)))
@@ -255,11 +255,11 @@ Wavelet::Wavelet() :
EvWavLabGridValue = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVLABGRID_VALUE");
EvWavrangeab = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_RANGEAB");
EvWavprotab = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_PROTAB");
EvWavlevelshc = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_LEVELSHC");
//EvWavlevelshc = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_LEVELSHC");
EvWavcomplexmet = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_COMPLEX");
EvWavsigm = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVSIGM");
EvWavdenoise = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVDENOISE");
EvWavdenmethod = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVDENMET");
//EvWavdenmethod = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVDENMET");
EvWavmixmethod = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVMIXMET");
EvWavquamethod = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVQUAMET");
EvWavlevden = m->newEvent(DIRPYREQUALIZER, "HISTORY_MSG_WAVLEVDEN");
@@ -488,16 +488,16 @@ Wavelet::Wavelet() :
const WaveletParams default_params;
curveEditorC->setCurveListener(this);
curveEditorC->set_tooltip_text(M("TP_WAVELET_FINCOAR_TOOLTIP"));
//curveEditorC->setCurveListener(this);
//curveEditorC->set_tooltip_text(M("TP_WAVELET_FINCOAR_TOOLTIP"));
opacityShapeSH = static_cast<FlatCurveEditor*>(curveEditorC->addCurve(CT_Flat, "", nullptr, false, false));
opacityShapeSH->setIdentityValue(0.);
opacityShapeSH->setResetCurve(FlatCurveType(default_params.opacityCurveSH.at(0)), default_params.opacityCurveSH);
//opacityShapeSH = static_cast<FlatCurveEditor*>(curveEditorC->addCurve(CT_Flat, "", nullptr, false, false));
//opacityShapeSH->setIdentityValue(0.);
//opacityShapeSH->setResetCurve(FlatCurveType(default_params.opacityCurveSH.at(0)), default_params.opacityCurveSH);
curveEditorC->curveListComplete();
curveEditorC->show();
//curveEditorC->curveListComplete();
//curveEditorC->show();
contrastSHVBox->pack_start(*HSmethod);
contrastSHVBox->pack_start(*hllev);
@@ -686,17 +686,17 @@ Wavelet::Wavelet() :
sliHBox->pack_start(*slimethod);
denmethod->append(M("TP_WAVELET_DENEQUAL"));
denmethod->append(M("TP_WAVELET_DEN14PLUS"));
denmethod->append(M("TP_WAVELET_DEN14LOW"));
denmethod->append(M("TP_WAVELET_DEN12PLUS"));
denmethod->append(M("TP_WAVELET_DEN12LOW"));
denmethodconn = denmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::denmethodChanged));
denmethod->set_tooltip_text(M("TP_WAVELET_DENEQUAL_TOOLTIP"));
//denmethod->append(M("TP_WAVELET_DENEQUAL"));
//denmethod->append(M("TP_WAVELET_DEN14PLUS"));
//denmethod->append(M("TP_WAVELET_DEN14LOW"));
//denmethod->append(M("TP_WAVELET_DEN12PLUS"));
//denmethod->append(M("TP_WAVELET_DEN12LOW"));
//denmethodconn = denmethod->signal_changed().connect(sigc::mem_fun(*this, &Wavelet::denmethodChanged));
//denmethod->set_tooltip_text(M("TP_WAVELET_DENEQUAL_TOOLTIP"));
// Gtk::Box* const denHBox = Gtk::manage(new Gtk::Box());
Gtk::Label* const denLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DENCONTRAST") + ":"));
denHBox->pack_start(*denLabel, Gtk::PACK_SHRINK, 4);
denHBox->pack_start(*denmethod);
//Gtk::Label* const denLabel = Gtk::manage(new Gtk::Label(M("TP_WAVELET_DENCONTRAST") + ":"));
//denHBox->pack_start(*denLabel, Gtk::PACK_SHRINK, 4);
//denHBox->pack_start(*denmethod);
mixmethod->append(M("TP_WAVELET_MIXNOISE"));
mixmethod->append(M("TP_WAVELET_MIXMIX"));
@@ -759,7 +759,7 @@ Wavelet::Wavelet() :
noiseBox->pack_start(*thrden);
noiseBox->pack_start(*quaHBox);
noiseBox->pack_start(*sliHBox);
noiseBox->pack_start(*denHBox);
//noiseBox->pack_start(*denHBox);
noiseBox->pack_start(*mixHBox);
noiseBox->pack_start(*levelsigm, Gtk::PACK_SHRINK, 0);
noiseBox->pack_start(*limden);
@@ -1170,7 +1170,7 @@ Wavelet::Wavelet() :
//RTImage *resetImg = Gtk::manage (new RTImage ("undo-small.png", "redo-small.png"));
//neutral->set_image(*resetImg);
Gtk::Button* const neutral = Gtk::manage(new Gtk::Button(M("TP_COLORTONING_NEUTRAL")));
neutral->set_tooltip_text(M("TP_COLORTONING_NEUTRAL_TIP"));
neutral->set_tooltip_text(M("TP_COLORTONING_NEUTRAL_TOOLTIP"));
neutralconn = neutral->signal_pressed().connect(sigc::mem_fun(*this, &Wavelet::neutral_pressed));
neutral->show();
neutrHBox->pack_start(*neutral, Gtk::PACK_EXPAND_WIDGET);
@@ -1334,7 +1334,7 @@ Wavelet::~Wavelet()
idle_register.destroy();
delete opaCurveEditorG;
delete curveEditorC;
//delete curveEditorC;
delete opacityCurveEditorG;
delete CurveEditorwavnoise;
delete CurveEditorwavnoiseh;
@@ -1426,7 +1426,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
Backmethodconn.block(true);
Tilesmethodconn.block(true);
complexmethodconn.block(true);
denmethodconn.block(true);
//denmethodconn.block(true);
mixmethodconn.block(true);
slimethodconn.block(true);
quamethodconn.block(true);
@@ -1557,17 +1557,17 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
complexmethod->set_active(1);
}
if (pp->wavelet.denmethod == "equ") {
denmethod->set_active(0);
} else if (pp->wavelet.denmethod == "high") {
denmethod->set_active(1);
} else if (pp->wavelet.denmethod == "low") {
denmethod->set_active(2);
} else if (pp->wavelet.denmethod == "12high") {
denmethod->set_active(3);
} else if (pp->wavelet.denmethod == "12low") {
denmethod->set_active(4);
}
//if (pp->wavelet.denmethod == "equ") {
// denmethod->set_active(0);
//} else if (pp->wavelet.denmethod == "high") {
// denmethod->set_active(1);
//} else if (pp->wavelet.denmethod == "low") {
// denmethod->set_active(2);
//} else if (pp->wavelet.denmethod == "12high") {
// denmethod->set_active(3);
//} else if (pp->wavelet.denmethod == "12low") {
// denmethod->set_active(4);
//}
if (pp->wavelet.mixmethod == "nois") {
mixmethod->set_active(0);
@@ -1632,7 +1632,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
opacityShapeRG->setCurve(pp->wavelet.opacityCurveRG);
wavdenoise->setCurve(pp->wavelet.wavdenoise);
wavdenoiseh->setCurve(pp->wavelet.wavdenoiseh);
opacityShapeSH->setCurve(pp->wavelet.opacityCurveSH);
//opacityShapeSH->setCurve(pp->wavelet.opacityCurveSH);
opacityShapeBY->setCurve(pp->wavelet.opacityCurveBY);
opacityShape->setCurve(pp->wavelet.opacityCurveW);
opacityShapeWL->setCurve(pp->wavelet.opacityCurveWL);
@@ -1808,9 +1808,9 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
complexmethod->set_active_text(M("GENERAL_UNCHANGED"));
}
if (!pedited->wavelet.denmethod) {
denmethod->set_active_text(M("GENERAL_UNCHANGED"));
}
//if (!pedited->wavelet.denmethod) {
// denmethod->set_active_text(M("GENERAL_UNCHANGED"));
//}
if (!pedited->wavelet.mixmethod) {
mixmethod->set_active_text(M("GENERAL_UNCHANGED"));
@@ -1886,7 +1886,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
exptoning->set_inconsistent(!pedited->wavelet.exptoning);
expnoise->set_inconsistent(!pedited->wavelet.expnoise);
opacityShapeRG->setCurve(pp->wavelet.opacityCurveRG);
opacityShapeSH->setCurve(pp->wavelet.opacityCurveSH);
//opacityShapeSH->setCurve(pp->wavelet.opacityCurveSH);
opacityShapeBY->setCurve(pp->wavelet.opacityCurveBY);
wavdenoise->setCurve(pp->wavelet.wavdenoise);
wavdenoiseh->setCurve(pp->wavelet.wavdenoiseh);
@@ -2075,7 +2075,7 @@ void Wavelet::read(const ProcParams* pp, const ParamsEdited* pedited)
Backmethodconn.block(false);
Tilesmethodconn.block(false);
complexmethodconn.block(false);
denmethodconn.block(false);
//denmethodconn.block(false);
mixmethodconn.block(false);
slimethodconn.block(false);
quamethodconn.block(false);
@@ -2106,7 +2106,7 @@ void Wavelet::setEditProvider(EditDataProvider *provider)
ccshape->setEditProvider(provider);
blshape->setEditProvider(provider);
opacityShapeRG->setEditProvider(provider);
opacityShapeSH->setEditProvider(provider);
//opacityShapeSH->setEditProvider(provider);
opacityShapeBY->setEditProvider(provider);
wavdenoise->setEditProvider(provider);
wavdenoiseh->setEditProvider(provider);
@@ -2190,7 +2190,7 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
pp->wavelet.ccwcurve = ccshape->getCurve();
pp->wavelet.blcurve = blshape->getCurve();
pp->wavelet.opacityCurveRG = opacityShapeRG->getCurve();
pp->wavelet.opacityCurveSH = opacityShapeSH->getCurve();
//pp->wavelet.opacityCurveSH = opacityShapeSH->getCurve();
pp->wavelet.opacityCurveBY = opacityShapeBY->getCurve();
pp->wavelet.wavdenoise = wavdenoise->getCurve();
pp->wavelet.wavdenoiseh = wavdenoiseh->getCurve();
@@ -2278,7 +2278,7 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
pedited->wavelet.Backmethod = Backmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.Tilesmethod = Tilesmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.complexmethod = complexmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.denmethod = denmethod->get_active_text() != M("GENERAL_UNCHANGED");
//pedited->wavelet.denmethod = denmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.mixmethod = mixmethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.slimethod = slimethod->get_active_text() != M("GENERAL_UNCHANGED");
pedited->wavelet.quamethod = quamethod->get_active_text() != M("GENERAL_UNCHANGED");
@@ -2339,7 +2339,7 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
pedited->wavelet.leveldenoise = leveldenoise->getEditedState();
pedited->wavelet.levelsigm = levelsigm->getEditedState();
pedited->wavelet.opacityCurveRG = !opacityShapeRG->isUnChanged();
pedited->wavelet.opacityCurveSH = !opacityShapeSH->isUnChanged();
//pedited->wavelet.opacityCurveSH = !opacityShapeSH->isUnChanged();
pedited->wavelet.opacityCurveBY = !opacityShapeBY->isUnChanged();
pedited->wavelet.wavdenoise = !wavdenoise->isUnChanged();
pedited->wavelet.wavdenoiseh = !wavdenoiseh->isUnChanged();
@@ -2504,17 +2504,17 @@ void Wavelet::write(ProcParams* pp, ParamsEdited* pedited)
pp->wavelet.complexmethod = "expert";
}
if (denmethod->get_active_row_number() == 0) {
pp->wavelet.denmethod = "equ";
} else if (denmethod->get_active_row_number() == 1) {
pp->wavelet.denmethod = "high";
} else if (denmethod->get_active_row_number() == 2) {
pp->wavelet.denmethod = "low";
} else if (denmethod->get_active_row_number() == 3) {
pp->wavelet.denmethod = "12high";
} else if (denmethod->get_active_row_number() == 4) {
pp->wavelet.denmethod = "12low";
}
//if (denmethod->get_active_row_number() == 0) {
// pp->wavelet.denmethod = "equ";
//} else if (denmethod->get_active_row_number() == 1) {
// pp->wavelet.denmethod = "high";
//} else if (denmethod->get_active_row_number() == 2) {
// pp->wavelet.denmethod = "low";
//} else if (denmethod->get_active_row_number() == 3) {
// pp->wavelet.denmethod = "12high";
//} else if (denmethod->get_active_row_number() == 4) {
// pp->wavelet.denmethod = "12low";
//}
if (mixmethod->get_active_row_number() == 0) {
pp->wavelet.mixmethod = "nois";
@@ -2573,8 +2573,8 @@ void Wavelet::curveChanged(CurveEditor* ce)
listener->panelChanged(EvWavblshape, M("HISTORY_CUSTOMCURVE"));
} else if (ce == opacityShapeRG) {
listener->panelChanged(EvWavColor, M("HISTORY_CUSTOMCURVE"));
} else if (ce == opacityShapeSH) {
listener->panelChanged(EvWavlevelshc, M("HISTORY_CUSTOMCURVE"));
//} else if (ce == opacityShapeSH) {
// listener->panelChanged(EvWavlevelshc, M("HISTORY_CUSTOMCURVE"));
} else if (ce == opacityShapeBY) {
listener->panelChanged(EvWavOpac, M("HISTORY_CUSTOMCURVE"));
} else if (ce == wavdenoise) {
@@ -2917,13 +2917,13 @@ void Wavelet::HSmethodUpdateUI()
bllev->hide();
threshold->hide();
threshold2->hide();
curveEditorC->hide();
//curveEditorC->hide();
} else { //with
hllev->show();
bllev->show();
threshold->show();
threshold2->show();
curveEditorC->show();
//curveEditorC->show();
}
}
}
@@ -3256,7 +3256,7 @@ void Wavelet::convertParamToNormal()
//denoise
chromfi->setValue(def_params.chromfi);
chromco->setValue(def_params.chromco);
denmethod->set_active(4);
//denmethod->set_active(4);
mixmethod->set_active(2);
slimethod->set_active(0);
levelsigm->setValue<double>(def_params.levelsigm);
@@ -3314,7 +3314,7 @@ void Wavelet::updateGUIToMode(int mode)
blurFrame->hide();
cbenab->hide();
sigmafin->hide();
denHBox->hide();
//denHBox->hide();
mixHBox->hide();
sliHBox->hide();
sigm->hide();
@@ -3342,7 +3342,7 @@ void Wavelet::updateGUIToMode(int mode)
blurFrame->show();
cbenab->show();
sigmafin->show();
denHBox->hide();
//denHBox->hide();
mixHBox->show();
sigm->hide();
levelsigm->show();
@@ -3361,7 +3361,7 @@ void Wavelet::updateGUIToMode(int mode)
CurveEditorwavnoise->show();
}
disableListener();
denmethod->set_active(4);
//denmethod->set_active(4);
enableListener();
}
@@ -3384,13 +3384,13 @@ void Wavelet::complexmethodChanged()
}
}
void Wavelet::denmethodChanged()
{
if (listener && (multiImage || getEnabled())) {
listener->panelChanged(EvWavdenmethod, denmethod->get_active_text());
}
}
//void Wavelet::denmethodChanged()
//{
//
// if (listener && (multiImage || getEnabled())) {
// listener->panelChanged(EvWavdenmethod, denmethod->get_active_text());
// }
//}
void Wavelet::mixmethodChanged()
{
@@ -3515,7 +3515,7 @@ void Wavelet::setBatchMode(bool batchMode)
Backmethod->append(M("GENERAL_UNCHANGED"));
Tilesmethod->append(M("GENERAL_UNCHANGED"));
complexmethod->append(M("GENERAL_UNCHANGED"));
denmethod->append(M("GENERAL_UNCHANGED"));
//denmethod->append(M("GENERAL_UNCHANGED"));
mixmethod->append(M("GENERAL_UNCHANGED"));
slimethod->append(M("GENERAL_UNCHANGED"));
quamethod->append(M("GENERAL_UNCHANGED"));
@@ -3532,7 +3532,7 @@ void Wavelet::setBatchMode(bool batchMode)
Dirmethod->append(M("GENERAL_UNCHANGED"));
CCWcurveEditorG->setBatchMode(batchMode);
opaCurveEditorG->setBatchMode(batchMode);
curveEditorC->setBatchMode(batchMode);
//curveEditorC->setBatchMode(batchMode);
opacityCurveEditorG->setBatchMode(batchMode);
CurveEditorwavnoise->setBatchMode(batchMode);
CurveEditorwavnoiseh->setBatchMode(batchMode);