Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle

This commit is contained in:
DrSlony
2015-08-11 11:55:03 +02:00
parent effb46c3e1
commit 0e0cfb9b25
452 changed files with 133354 additions and 99460 deletions

View File

@@ -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
@@ -23,51 +23,68 @@
class CurveEditor;
class CurveListener {
class CurveListener
{
private:
bool multi;
public:
CurveListener() : multi(false) {}
virtual ~CurveListener() {}
virtual void curveChanged () {}
virtual void curveChanged (CurveEditor* ce) {}
void setMulti(bool value) { multi = value; }
bool isMulti() { return multi; }
private:
bool multi;
public:
CurveListener() : multi(false) {}
virtual ~CurveListener() {}
virtual void curveChanged () {}
virtual void curveChanged (CurveEditor* ce) {}
void setMulti(bool value)
{
multi = value;
}
bool isMulti()
{
return multi;
}
/** @brief Ask the reset curve for a given curve type
* @param ce CurveEditor that we want to reset
* @param curve Actual curve for the return value. The actual curve type (given by the first value of the vector)
* should be kept the same. Change the curve type if REALLY necessary! */
virtual bool getResetCurve(CurveEditor *ce, std::vector<double> &curve) { return false; }
/** @brief Ask the reset curve for a given curve type
* @param ce CurveEditor that we want to reset
* @param curve Actual curve for the return value. The actual curve type (given by the first value of the vector)
* should be kept the same. Change the curve type if REALLY necessary! */
virtual bool getResetCurve(CurveEditor *ce, std::vector<double> &curve)
{
return false;
}
/** @brief Blend pipette values from its different channels into a single value
If the buffer has more than one channel and one channel, this method will blend them together.
@param chan1 first channel's value
@param chan2 second channel's value
@param chan3 third channel's value
@return the blended value */
virtual float blendPipetteValues(CurveEditor *ce, float chan1, float chan2, float chan3) {
float retVal = 0.f;
int n = 0;
if (chan1 != -1.f) {
retVal += chan1;
++n;
}
if (chan2 != -1.f) {
retVal += chan2;
++n;
}
if (chan3 != -1.f) {
retVal += chan3;
++n;
}
if (n>1)
retVal /= n;
else if (!n)
retVal = -1.f;
return retVal;
/** @brief Blend pipette values from its different channels into a single value
If the buffer has more than one channel and one channel, this method will blend them together.
@param chan1 first channel's value
@param chan2 second channel's value
@param chan3 third channel's value
@return the blended value */
virtual float blendPipetteValues(CurveEditor *ce, float chan1, float chan2, float chan3)
{
float retVal = 0.f;
int n = 0;
if (chan1 != -1.f) {
retVal += chan1;
++n;
}
if (chan2 != -1.f) {
retVal += chan2;
++n;
}
if (chan3 != -1.f) {
retVal += chan3;
++n;
}
if (n > 1) {
retVal /= n;
} else if (!n) {
retVal = -1.f;
}
return retVal;
}
};
#endif