Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* 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
|
||||
@@ -24,18 +24,20 @@
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
ImpulseDenoise::ImpulseDenoise () : FoldableToolPanel(this, "impulsedenoise", M("TP_IMPULSEDENOISE_LABEL"), true, true) {
|
||||
ImpulseDenoise::ImpulseDenoise () : FoldableToolPanel(this, "impulsedenoise", M("TP_IMPULSEDENOISE_LABEL"), true, true)
|
||||
{
|
||||
|
||||
thresh = Gtk::manage (new Adjuster (M("TP_IMPULSEDENOISE_THRESH"), 0, 100, 1, 50));
|
||||
thresh = Gtk::manage (new Adjuster (M("TP_IMPULSEDENOISE_THRESH"), 0, 100, 1, 50));
|
||||
|
||||
pack_start (*thresh);
|
||||
pack_start (*thresh);
|
||||
|
||||
thresh->setAdjusterListener (this);
|
||||
thresh->setAdjusterListener (this);
|
||||
|
||||
show_all_children ();
|
||||
show_all_children ();
|
||||
}
|
||||
|
||||
void ImpulseDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
void ImpulseDenoise::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
disableListener ();
|
||||
|
||||
@@ -51,7 +53,8 @@ void ImpulseDenoise::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
void ImpulseDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
void ImpulseDenoise::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
pp->impulseDenoise.thresh = thresh->getValue ();
|
||||
pp->impulseDenoise.enabled = getEnabled();
|
||||
@@ -62,17 +65,20 @@ void ImpulseDenoise::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
}
|
||||
}
|
||||
|
||||
void ImpulseDenoise::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
void ImpulseDenoise::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
thresh->setDefault (defParams->impulseDenoise.thresh);
|
||||
|
||||
if (pedited)
|
||||
if (pedited) {
|
||||
thresh->setDefaultEditedState (pedited->impulseDenoise.thresh ? Edited : UnEdited);
|
||||
else
|
||||
} else {
|
||||
thresh->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
}
|
||||
|
||||
void ImpulseDenoise::adjusterChanged (Adjuster* a, double newval) {
|
||||
void ImpulseDenoise::adjusterChanged (Adjuster* a, double newval)
|
||||
{
|
||||
|
||||
if (listener && getEnabled()) {
|
||||
|
||||
@@ -80,29 +86,34 @@ void ImpulseDenoise::adjusterChanged (Adjuster* a, double newval) {
|
||||
}
|
||||
}
|
||||
|
||||
void ImpulseDenoise::enabledChanged () {
|
||||
void ImpulseDenoise::enabledChanged ()
|
||||
{
|
||||
if (listener) {
|
||||
if (get_inconsistent())
|
||||
if (get_inconsistent()) {
|
||||
listener->panelChanged (EvIDNEnabled, M("GENERAL_UNCHANGED"));
|
||||
else if (getEnabled())
|
||||
} else if (getEnabled()) {
|
||||
listener->panelChanged (EvIDNEnabled, M("GENERAL_ENABLED"));
|
||||
else
|
||||
} else {
|
||||
listener->panelChanged (EvIDNEnabled, M("GENERAL_DISABLED"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImpulseDenoise::setBatchMode (bool batchMode) {
|
||||
void ImpulseDenoise::setBatchMode (bool batchMode)
|
||||
{
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
thresh->showEditedCB ();
|
||||
}
|
||||
|
||||
void ImpulseDenoise::setAdjusterBehavior (bool threshadd) {
|
||||
void ImpulseDenoise::setAdjusterBehavior (bool threshadd)
|
||||
{
|
||||
|
||||
thresh->setAddMode(threshadd);
|
||||
thresh->setAddMode(threshadd);
|
||||
}
|
||||
|
||||
void ImpulseDenoise::trimValues (rtengine::procparams::ProcParams* pp) {
|
||||
void ImpulseDenoise::trimValues (rtengine::procparams::ProcParams* pp)
|
||||
{
|
||||
|
||||
thresh->trimValue(pp->impulseDenoise.thresh);
|
||||
thresh->trimValue(pp->impulseDenoise.thresh);
|
||||
}
|
||||
|
Reference in New Issue
Block a user