Commiting HSV equalizer tool.

This commit is contained in:
Emil Martinec
2010-11-11 14:33:26 -06:00
parent 06875fede4
commit 1a2e7a9b4a
20 changed files with 690 additions and 43 deletions

View File

@@ -26,7 +26,7 @@ set (BASESOURCEFILES
batchqueue.cc lwbutton.cc lwbuttonset.cc
batchqueuebuttonset.cc browserfilter.cc exiffiltersettings.cc
profilestore.cc partialpastedlg.cc rawprocess.cc preprocess.cc
equalizer.cc dirpyrequalizer.cc
equalizer.cc dirpyrequalizer.cc hsvequalizer.cc
popupcommon.cc popupbutton.cc popuptogglebutton.cc)
if (WIN32)

358
rtgui/hsvequalizer.cc Normal file
View File

@@ -0,0 +1,358 @@
/*
* This file is part of RawTherapee.
*
* RawTherapee is free software: you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*
* 2010 Ilya Popov <ilia_popov@rambler.ru>
*/
#include <hsvequalizer.h>
using namespace rtengine;
using namespace rtengine::procparams;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSVEqualizer::HSVEqualizer () : ToolPanel () {
enabled = Gtk::manage (new Gtk::CheckButton (M("GENERAL_ENABLED")));
enabled->set_active (true);
pack_start(*enabled);
enaConn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &HSVEqualizer::enabledToggled) );
Gtk::HSeparator *hsvsepa = Gtk::manage (new Gtk::HSeparator());
pack_start(*hsvsepa, Gtk::PACK_SHRINK, 2);
hsvsepa->show ();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Gtk::HBox* hb = Gtk::manage (new Gtk::HBox ());
hb->set_border_width (4);
hb->show ();
Gtk::Label* hsvselect = Gtk::manage (new Gtk::Label (M("TP_HSVEQUALIZER_CHANNEL")+":"));
hsvselect->show ();
hsvchannel = Gtk::manage (new Gtk::ComboBoxText ());
hsvchannel->append_text (M("TP_HSVEQUALIZER_SAT"));
hsvchannel->append_text (M("TP_HSVEQUALIZER_VAL"));
hsvchannel->append_text (M("TP_HSVEQUALIZER_HUE"));
hsvchannel->show ();
hb->pack_start(*hsvselect, Gtk::PACK_SHRINK, 4);
hb->pack_start(*hsvchannel);
Gtk::Button * neutralButton = Gtk::manage (new Gtk::Button(M("TP_HSVEQUALIZER_NEUTRAL")));
hb->pack_start(*neutralButton, Gtk::PACK_SHRINK, 2);
neutralPressedConn = neutralButton->signal_pressed().connect( sigc::mem_fun(*this, &HSVEqualizer::neutralPressed));
pack_start (*hb);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/*
Gtk::HBox * buttonBox17 = Gtk::manage (new Gtk::HBox());
pack_start(*buttonBox17, Gtk::PACK_SHRINK, 2);
Gtk::Button * neutralButton = Gtk::manage (new Gtk::Button(M("TP_HSVEQUALIZER_NEUTRAL")));
buttonBox17->pack_start(*neutralButton, Gtk::PACK_SHRINK, 2);
neutralPressedConn = neutralButton->signal_pressed().connect( sigc::mem_fun(*this, &HSVEqualizer::neutralPressed));
buttonBox17->show();
*/
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Gtk::HSeparator *hsvsepb = Gtk::manage (new Gtk::HSeparator());
pack_start(*hsvsepb, Gtk::PACK_SHRINK, 2);
hsvsepb->show ();
satbox = new Gtk::VBox ();
sat[0] = new Adjuster (M("TP_HSVEQUALIZER1"), -100, 100, 0.1, 0);
sat[1] = new Adjuster (M("TP_HSVEQUALIZER2"), -100, 100, 0.1, 0);
sat[2] = new Adjuster (M("TP_HSVEQUALIZER3"), -100, 100, 0.1, 0);
sat[3] = new Adjuster (M("TP_HSVEQUALIZER4"), -100, 100, 0.1, 0);
sat[4] = new Adjuster (M("TP_HSVEQUALIZER5"), -100, 100, 0.1, 0);
sat[5] = new Adjuster (M("TP_HSVEQUALIZER6"), -100, 100, 0.1, 0);
sat[6] = new Adjuster (M("TP_HSVEQUALIZER7"), -100, 100, 0.1, 0);
sat[7] = new Adjuster (M("TP_HSVEQUALIZER8"), -100, 100, 0.1, 0);
for(int i = 0; i < 8; i++)
{
sat[i]->setAdjusterListener(this);
satbox->pack_start(*sat[i]);
}
//show_all_children ();
satbox->show ();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%
valbox = new Gtk::VBox ();
val[0] = new Adjuster (M("TP_HSVEQUALIZER1"), -100, 100, 0.1, 0);
val[1] = new Adjuster (M("TP_HSVEQUALIZER2"), -100, 100, 0.1, 0);
val[2] = new Adjuster (M("TP_HSVEQUALIZER3"), -100, 100, 0.1, 0);
val[3] = new Adjuster (M("TP_HSVEQUALIZER4"), -100, 100, 0.1, 0);
val[4] = new Adjuster (M("TP_HSVEQUALIZER5"), -100, 100, 0.1, 0);
val[5] = new Adjuster (M("TP_HSVEQUALIZER6"), -100, 100, 0.1, 0);
val[6] = new Adjuster (M("TP_HSVEQUALIZER7"), -100, 100, 0.1, 0);
val[7] = new Adjuster (M("TP_HSVEQUALIZER8"), -100, 100, 0.1, 0);
for(int i = 0; i < 8; i++)
{
val[i]->setAdjusterListener(this);
valbox->pack_start(*val[i]);
}
//show_all_children ();
valbox->show ();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%
huebox = new Gtk::VBox ();
hue[0] = new Adjuster (M("TP_HSVEQUALIZER1"), -100, 100, 0.1, 0);
hue[1] = new Adjuster (M("TP_HSVEQUALIZER2"), -100, 100, 0.1, 0);
hue[2] = new Adjuster (M("TP_HSVEQUALIZER3"), -100, 100, 0.1, 0);
hue[3] = new Adjuster (M("TP_HSVEQUALIZER4"), -100, 100, 0.1, 0);
hue[4] = new Adjuster (M("TP_HSVEQUALIZER5"), -100, 100, 0.1, 0);
hue[5] = new Adjuster (M("TP_HSVEQUALIZER6"), -100, 100, 0.1, 0);
hue[6] = new Adjuster (M("TP_HSVEQUALIZER7"), -100, 100, 0.1, 0);
hue[7] = new Adjuster (M("TP_HSVEQUALIZER8"), -100, 100, 0.1, 0);
for(int i = 0; i < 8; i++)
{
hue[i]->setAdjusterListener(this);
huebox->pack_start(*hue[i]);
}
//huebox->show_all_children ();
huebox->show ();
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%
huebox->reference ();
valbox->reference ();
satbox->reference ();
//enaConn = enabled->signal_toggled().connect( sigc::mem_fun(*this, &HSVEqualizer::enabled_toggled) );
hsvchannel->signal_changed().connect( sigc::mem_fun(*this, &HSVEqualizer::hsvchannelChanged) );
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HSVEqualizer::~HSVEqualizer () {
delete hue;
delete val;
delete sat;
}
void HSVEqualizer::read (const ProcParams* pp, const ParamsEdited* pedited) {
disableListener ();
if (pedited) {
for (int i=0; i<8; i++) {
sat[i]->setEditedState (pedited->hsvequalizer.sat[i] ? Edited : UnEdited);
val[i]->setEditedState (pedited->hsvequalizer.val[i] ? Edited : UnEdited);
hue[i]->setEditedState (pedited->hsvequalizer.hue[i] ? Edited : UnEdited);
}
enabled->set_inconsistent (!pedited->hsvequalizer.enabled);
}
enaConn.block (true);
enabled->set_active (pp->hsvequalizer.enabled);
enaConn.block (false);
lastEnabled = pp->hsvequalizer.enabled;
for (int i=0; i<8; i++) {
sat[i]->setValue (pp->hsvequalizer.sat[i]);
val[i]->setValue (pp->hsvequalizer.val[i]);
hue[i]->setValue (pp->hsvequalizer.hue[i]);
}
if (pedited && !pedited->hsvequalizer.hsvchannel)
hsvchannel->set_active (3);
else if (pp->hsvequalizer.hsvchannel=="sat")
hsvchannel->set_active (0);
else if (pp->hsvequalizer.hsvchannel=="val")
hsvchannel->set_active (1);
else if (pp->hsvequalizer.hsvchannel=="hue")
hsvchannel->set_active (2);
enableListener ();
}
void HSVEqualizer::write (ProcParams* pp, ParamsEdited* pedited) {
pp->hsvequalizer.enabled = enabled->get_active ();
for (int i=0; i<8; i++) {
pp->hsvequalizer.sat[i] = sat[i]->getValue();
pp->hsvequalizer.val[i] = val[i]->getValue();
pp->hsvequalizer.hue[i] = hue[i]->getValue();
}
if (hsvchannel->get_active_row_number()==0)
pp->hsvequalizer.hsvchannel = "sat";
else if (hsvchannel->get_active_row_number()==1)
pp->hsvequalizer.hsvchannel = "val";
else if (hsvchannel->get_active_row_number()==2)
pp->hsvequalizer.hsvchannel = "hue";
if (pedited) {
pedited->hsvequalizer.enabled = !enabled->get_inconsistent();//from dirpyreq
for (int i=0; i<8; i++) {
pedited->hsvequalizer.sat[i] = sat[i]->getEditedState ();
pedited->hsvequalizer.val[i] = val[i]->getEditedState ();
pedited->hsvequalizer.hue[i] = hue[i]->getEditedState ();
}
}
}
void HSVEqualizer::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
for (int i = 0; i < 8; i++) {
sat[i]->setDefault(defParams->hsvequalizer.sat[i]);
val[i]->setDefault(defParams->hsvequalizer.val[i]);
hue[i]->setDefault(defParams->hsvequalizer.hue[i]);
}
if (pedited) {
for (int i = 0; i < 8; i++) {
sat[i]->setDefaultEditedState(pedited->hsvequalizer.sat[i] ? Edited : UnEdited);
val[i]->setDefaultEditedState(pedited->hsvequalizer.val[i] ? Edited : UnEdited);
hue[i]->setDefaultEditedState(pedited->hsvequalizer.hue[i] ? Edited : UnEdited);
}
}
else {
for (int i = 0; i < 8; i++) {
sat[i]->setDefaultEditedState(Irrelevant);
val[i]->setDefaultEditedState(Irrelevant);
hue[i]->setDefaultEditedState(Irrelevant);
}
}
}
void HSVEqualizer::adjusterChanged (Adjuster* a, double newval) {
if (listener && enabled->get_active()) {
std::stringstream ss;
ss << "(";
int i;
if (hsvchannel->get_active_row_number()==0) {
for (i = 0; i < 8; i++) {
if (i > 0) {
ss << ", ";
}
ss << static_cast<int>(sat[i]->getValue());
}
listener->panelChanged (EvHSVEqualizerS, ss.str());
}
else if (hsvchannel->get_active_row_number()==1) {
for (i = 0; i < 8; i++) {
if (i > 0) {
ss << ", ";
}
ss << static_cast<int>(val[i]->getValue());
}
listener->panelChanged (EvHSVEqualizerV, ss.str());
}
else if (hsvchannel->get_active_row_number()==2) {
for (i = 0; i < 8; i++) {
if (i > 0) {
ss << ", ";
}
ss << static_cast<int>(hue[i]->getValue());
}
listener->panelChanged (EvHSVEqualizerH, ss.str());
}
ss << ")";
//listener->panelChanged (EvHSVEqualizer, ss.str());
}
}
void HSVEqualizer::enabledToggled () {
if (batchMode) {
if (enabled->get_inconsistent()) {
enabled->set_inconsistent (false);
enaConn.block (true);
enabled->set_active (false);
enaConn.block (false);
}
else if (lastEnabled)
enabled->set_inconsistent (true);
lastEnabled = enabled->get_active ();
}
if (listener) {
if (enabled->get_active ())
listener->panelChanged (EvHSVEqEnabled, M("GENERAL_ENABLED"));
else
listener->panelChanged (EvHSVEqEnabled, M("GENERAL_DISABLED"));
}
}
void HSVEqualizer::hsvchannelChanged () {
removeIfThere (this, satbox, false);
removeIfThere (this, valbox, false);
removeIfThere (this, huebox, false);
if (hsvchannel->get_active_row_number()==0)
pack_start (*satbox);
else if (hsvchannel->get_active_row_number()==1)
pack_start (*valbox);
else if (hsvchannel->get_active_row_number()==2)
pack_start (*huebox);
if (listener && enabled->get_active ()) {
if (hsvchannel->get_active_row_number()==0)
listener->panelChanged (EvHSVEqualizerS, hsvchannel->get_active_text ());
else if (hsvchannel->get_active_row_number()==1)
listener->panelChanged (EvHSVEqualizerV, hsvchannel->get_active_text ());
else if (hsvchannel->get_active_row_number()==2)
listener->panelChanged (EvHSVEqualizerH, hsvchannel->get_active_text ());
}
}
void HSVEqualizer::setBatchMode (bool batchMode) {
ToolPanel::setBatchMode (batchMode);
for (int i = 0; i < 8; i++) {
sat[i]->showEditedCB();
val[i]->showEditedCB();
hue[i]->showEditedCB();
}
hsvchannel->append_text (M("GENERAL_UNCHANGED"));
}
void HSVEqualizer::neutralPressed () {
if (hsvchannel->get_active_row_number()==0)
for (int i = 0; i < 8; i++) {
sat[i]->setValue(0);
adjusterChanged(sat[i], 0);
}
else if (hsvchannel->get_active_row_number()==1)
for (int i = 0; i < 8; i++) {
val[i]->setValue(0);
adjusterChanged(val[i], 0);
}
else if (hsvchannel->get_active_row_number()==2)
for (int i = 0; i < 8; i++) {
hue[i]->setValue(0);
adjusterChanged(hue[i], 0);
}
}

68
rtgui/hsvequalizer.h Normal file
View File

@@ -0,0 +1,68 @@
/*
* This file is part of RawTherapee.
*
* RawTherapee is free software: you can redistribute it and/or modify
* 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
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*
* 2010 Ilya Popov <ilia_popov@rambler.ru>
*/
#ifndef HSVEQUALIZER_H_INCLUDED
#define HSVEQUALIZER_H_INCLUDED
#include <gtkmm.h>
#include <adjuster.h>
#include <toolpanel.h>
#include <guiutils.h>
class HSVEqualizer : public Gtk::VBox, public AdjusterListener, public ToolPanel
{
protected:
Gtk::CheckButton * enabled;
Gtk::ComboBoxText* hsvchannel;
Gtk::VBox* satbox;
Gtk::VBox* valbox;
Gtk::VBox* huebox;
Adjuster* sat[8];
Adjuster* val[8];
Adjuster* hue[8];
sigc::connection enaConn;
sigc::connection neutralPressedConn;
bool lastEnabled;
public:
HSVEqualizer ();
virtual ~HSVEqualizer ();
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
void setBatchMode (bool batchMode);
void adjusterChanged (Adjuster* a, double newval);
void enabledToggled ();
void hsvchannelChanged ();
void neutralPressed ();
};
#endif

View File

@@ -100,7 +100,7 @@ void Navigator::rgb2hsv (int r, int g, int b, int &h, int &s, int &v) {
volatile double var_G = g / 255.0;
volatile double var_B = b / 255.0;
volatile double var_Min = MIN(MIN(var_R,var_G),var_B);
/*volatile double var_Min = MIN(MIN(var_R,var_G),var_B);
volatile double var_Max = MAX(MAX(var_R,var_G),var_B);
double del_Max = var_Max - var_Min;
double V = (var_Max + var_Min) / 2;
@@ -120,6 +120,27 @@ void Navigator::rgb2hsv (int r, int g, int b, int &h, int &s, int &v) {
else if ( var_G == var_Max ) H = (1.0 / 3.0) + del_R - del_B;
else if ( var_B == var_Max ) H = (2.0 / 3.0) + del_G - del_R;
if ( H < 0 ) H += 1;
if ( H > 1 ) H -= 1;
}*/
double var_Min = MIN(MIN(var_R,var_G),var_B);
double var_Max = MAX(MAX(var_R,var_G),var_B);
double del_Max = var_Max - var_Min;
double V = var_Max;
double H, S;
if (fabs(del_Max)<0.001) {
H = 0;
S = 0;
}
else {
S = del_Max/var_Max;
if ( var_R == var_Max ) H = (var_G - var_B)/del_Max;
else if ( var_G == var_Max ) H = 2.0 + (var_B - var_R)/del_Max;
else if ( var_B == var_Max ) H = 4.0 + (var_R - var_G)/del_Max;
H /= 6.0;
if ( H < 0 ) H += 1;
if ( H > 1 ) H -= 1;
}

View File

@@ -138,12 +138,18 @@ void ParamsEdited::set (bool v) {
raw.dcbEnhance = v;
equalizer.enabled = v;
dirpyrequalizer.enabled = v;
for(int i = 0; i < 5; i++)
{
hsvequalizer.enabled = v;
for(int i = 0; i < 8; i++) {
equalizer.c[i] = v;
dirpyrequalizer.mult[i] = v;
}
for(int i = 0; i < 5; i++) {
dirpyrequalizer.mult[i] = v;
}
for(int i = 0; i < 8; i++) {
hsvequalizer.sat[i] = v;
hsvequalizer.val[i] = v;
hsvequalizer.hue[i] = v;
}
exif.clear ();
iptc.clear ();
}
@@ -286,6 +292,12 @@ void ParamsEdited::initFrom (const std::vector<rtengine::procparams::ProcParams>
for(int i = 0; i < 8; i++) {
dirpyrequalizer.mult[i] = dirpyrequalizer.mult[i] && p.dirpyrequalizer.mult[i] == other.dirpyrequalizer.mult[i];
}
hsvequalizer.enabled = hsvequalizer.enabled && p.hsvequalizer.enabled == other.hsvequalizer.enabled;
for(int i = 0; i < 8; i++) {
hsvequalizer.sat[i] = hsvequalizer.sat[i] && p.hsvequalizer.sat[i] == other.hsvequalizer.sat[i];
hsvequalizer.val[i] = hsvequalizer.val[i] && p.hsvequalizer.val[i] == other.hsvequalizer.val[i];
hsvequalizer.hue[i] = hsvequalizer.hue[i] && p.hsvequalizer.hue[i] == other.hsvequalizer.hue[i];
}
// exif = exif && p.exif==other.exif
// iptc = other.iptc;
}
@@ -415,9 +427,15 @@ void ParamsEdited::combine (rtengine::procparams::ProcParams& toEdit, const rten
if(equalizer.c[i]) toEdit.equalizer.c[i] = mods.equalizer.c[i];
}
if (dirpyrequalizer.enabled) toEdit.dirpyrequalizer.enabled = mods.dirpyrequalizer.enabled;
for(int i = 0; i < 8; i++) {
for(int i = 0; i < 5; i++) {
if(dirpyrequalizer.mult[i]) toEdit.dirpyrequalizer.mult[i] = mods.dirpyrequalizer.mult[i];
}
if (hsvequalizer.enabled) toEdit.hsvequalizer.enabled = mods.hsvequalizer.enabled;
for(int i = 0; i < 8; i++) {
if(hsvequalizer.sat[i]) toEdit.hsvequalizer.sat[i] = mods.hsvequalizer.sat[i];
if(hsvequalizer.val[i]) toEdit.hsvequalizer.val[i] = mods.hsvequalizer.val[i];
if(hsvequalizer.hue[i]) toEdit.hsvequalizer.hue[i] = mods.hsvequalizer.hue[i];
}
// if (exif) toEdit.exif==mo.exif = mods.exif==other.exif;
// if (iptc;) toEdit.iptc==other.iptc; = mods.iptc==other.iptc;;
}

View File

@@ -253,6 +253,16 @@ public:
bool mult[8];
};
class HSVEqualizerParamsEdited {
public:
bool enabled;
bool sat[6];
bool val[6];
bool hue[6];
int hsvchannel;
};
class RAWParamsEdited {
public:
@@ -313,6 +323,7 @@ class ParamsEdited {
EqualizerParamsEdited equalizer;
RAWParamsEdited raw;
DirPyrEqualizerParamsEdited dirpyrequalizer;
HSVEqualizerParamsEdited hsvequalizer;
std::vector<ExifPairEdited> exif;
std::vector<IPTCPairEdited> iptc;

View File

@@ -51,6 +51,7 @@ PartialPasteDlg::PartialPasteDlg () {
colorboost = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORBOOST")));
colorden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_COLORDENOISE")));
dirpyrden = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DIRPYRDENOISE")));
hsveq = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_HSVEQUALIZER")));
// options in lens:
distortion = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_DISTORTION")));
@@ -97,6 +98,7 @@ PartialPasteDlg::PartialPasteDlg () {
vboxes[2]->pack_start (*colormixer, Gtk::PACK_SHRINK, 2);
vboxes[2]->pack_start (*colorshift, Gtk::PACK_SHRINK, 2);
vboxes[2]->pack_start (*colorboost, Gtk::PACK_SHRINK, 2);
vboxes[2]->pack_start (*hsveq, Gtk::PACK_SHRINK, 2);
vboxes[2]->pack_start (*colorden, Gtk::PACK_SHRINK, 2);
vboxes[2]->pack_start (*dirpyrden, Gtk::PACK_SHRINK, 2);
@@ -160,7 +162,8 @@ PartialPasteDlg::PartialPasteDlg () {
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));
colorboostConn = colorboost->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
colordenConn = colorden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
hsveqConn = hsveq->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
colordenConn = colorden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
dirpyrdenConn = dirpyrden->signal_toggled().connect (sigc::bind (sigc::mem_fun(*color, &Gtk::CheckButton::set_inconsistent), true));
distortionConn = distortion->signal_toggled().connect (sigc::bind (sigc::mem_fun(*lens, &Gtk::CheckButton::set_inconsistent), true));
@@ -242,6 +245,7 @@ void PartialPasteDlg::colorToggled () {
colormixer->set_active (color->get_active ());
colorshift->set_active (color->get_active ());
colorboost->set_active (color->get_active ());
hsveq->set_active (color->get_active ());
colorden->set_active (color->get_active ());
dirpyrden->set_active (color->get_active ());
@@ -324,6 +328,7 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dst, const r
if (colormixer->get_active ()) dst->chmixer = src->chmixer;
if (colorshift->get_active ()) dst->colorShift = src->colorShift;
if (colorboost->get_active ()) dst->colorBoost = src->colorBoost;
if (hsveq->get_active ()) dst->hsvequalizer = src->hsvequalizer;
if (colorden->get_active ()) dst->colorDenoise = src->colorDenoise;
if (dirpyrden->get_active ()) dst->dirpyrDenoise = src->dirpyrDenoise;

View File

@@ -51,6 +51,7 @@ class PartialPasteDlg : public Gtk::Dialog {
Gtk::CheckButton* colormixer;
Gtk::CheckButton* colorshift;
Gtk::CheckButton* colorboost;
Gtk::CheckButton* hsveq;
Gtk::CheckButton* colorden;
Gtk::CheckButton* dirpyrden;
@@ -73,7 +74,7 @@ class PartialPasteDlg : public Gtk::Dialog {
sigc::connection basicConn, luminanceConn, colorConn, lensConn, compositionConn, metaicmConn;
sigc::connection wbConn, exposureConn, hlrecConn;
sigc::connection sharpenConn, impdenConn, lumadenConn, labcurveConn, shConn, dirpyreqConn, waveqConn;
sigc::connection sharpenConn, impdenConn, lumadenConn, labcurveConn, shConn, dirpyreqConn, waveqConn, hsveqConn;
sigc::connection colormixerConn, colorshiftConn, colorboostConn, colordenConn, dirpyrdenConn;
sigc::connection distortionConn, cacorrConn, vignettingConn;
sigc::connection coarserotConn, finerotConn, cropConn, resizeConn;

View File

@@ -58,6 +58,7 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
iptcpanel = Gtk::manage (new IPTCPanel ());
equalizer = Gtk::manage (new Equalizer ());
dirpyrequalizer = Gtk::manage (new DirPyrEqualizer ());
hsvequalizer = Gtk::manage (new HSVEqualizer ());
rawprocess = Gtk::manage (new RawProcess ());
preprocess = Gtk::manage (new PreProcess ());
@@ -69,7 +70,8 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
addPanel (detailsPanel, sharpening, M("TP_SHARPENING_LABEL")); toolPanels.push_back (sharpening);
addPanel (colorPanel, colorboost, M("TP_COLORBOOST_LABEL")); toolPanels.push_back (colorboost);
addPanel (colorPanel, colorshift, M("TP_COLORSHIFT_LABEL")); toolPanels.push_back (colorshift);
addPanel (exposurePanel, lcurve, M("TP_LABCURVE_LABEL")); toolPanels.push_back (lcurve);
addPanel (colorPanel, hsvequalizer, M("TP_HSVEQUALIZER_LABEL")); toolPanels.push_back (hsvequalizer);
addPanel (exposurePanel, lcurve, M("TP_LABCURVE_LABEL")); toolPanels.push_back (lcurve);
addPanel (detailsPanel, impulsedenoise, M("TP_IMPULSEDENOISE_LABEL")); toolPanels.push_back (impulsedenoise);
addPanel (detailsPanel, lumadenoise, M("TP_LUMADENOISE_LABEL")); toolPanels.push_back (lumadenoise);
addPanel (detailsPanel, colordenoise, M("TP_COLORDENOISE_LABEL")); toolPanels.push_back (colordenoise);

View File

@@ -55,6 +55,7 @@
#include <lensgeomlistener.h>
#include <equalizer.h>
#include <dirpyrequalizer.h>
#include <hsvequalizer.h>
#include <rawprocess.h>
#include <preprocess.h>
@@ -95,6 +96,7 @@ class ToolPanelCoordinator : public ToolPanelListener,
LCurve* lcurve;
Equalizer * equalizer;
DirPyrEqualizer * dirpyrequalizer;
HSVEqualizer * hsvequalizer;
RawProcess* rawprocess;
PreProcess* preprocess;