Formatted all .cc and .h code in rtengine, rtexif and rtgui using astyle
This commit is contained in:
103
rtgui/chmixer.cc
103
rtgui/chmixer.cc
@@ -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
|
||||
@@ -22,7 +22,8 @@
|
||||
using namespace rtengine;
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL")) {
|
||||
ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL"))
|
||||
{
|
||||
|
||||
imgIcon[0] = Gtk::manage (new RTImage ("Chanmixer-RR.png"));
|
||||
imgIcon[1] = Gtk::manage (new RTImage ("Chanmixer-RG.png"));
|
||||
@@ -45,8 +46,11 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL")) {
|
||||
Gtk::HSeparator* rsep = Gtk::manage (new Gtk::HSeparator ());
|
||||
|
||||
pack_start (*rlabel);
|
||||
for (int i=0; i<3; i++)
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
pack_start (*red[i]);
|
||||
}
|
||||
|
||||
pack_start (*rsep, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||
|
||||
Gtk::Label* glabel = Gtk::manage (new Gtk::Label ());
|
||||
@@ -61,8 +65,11 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL")) {
|
||||
Gtk::HSeparator* gsep = Gtk::manage (new Gtk::HSeparator ());
|
||||
|
||||
pack_start (*glabel);
|
||||
for (int i=0; i<3; i++)
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
pack_start (*green[i]);
|
||||
}
|
||||
|
||||
pack_start (*gsep, Gtk::PACK_EXPAND_WIDGET, 4);
|
||||
|
||||
Gtk::Label* blabel = Gtk::manage (new Gtk::Label ());
|
||||
@@ -72,31 +79,34 @@ ChMixer::ChMixer (): FoldableToolPanel(this, "chmixer", M("TP_CHMIXER_LABEL")) {
|
||||
blue[1] = Gtk::manage (new Adjuster ("", -200, 200, 1, 0, imgIcon[7]));
|
||||
blue[2] = Gtk::manage (new Adjuster ("", -200, 200, 1, 100, imgIcon[8]));
|
||||
|
||||
for (int i=0; i<3; i++) {
|
||||
red[i]->setAdjusterListener (this);
|
||||
green[i]->setAdjusterListener (this);
|
||||
blue[i]->setAdjusterListener (this);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->setAdjusterListener (this);
|
||||
green[i]->setAdjusterListener (this);
|
||||
blue[i]->setAdjusterListener (this);
|
||||
}
|
||||
|
||||
pack_start (*blabel);
|
||||
for (int i=0; i<3; i++)
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
pack_start (*blue[i]);
|
||||
}
|
||||
|
||||
show_all();
|
||||
}
|
||||
|
||||
void ChMixer::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
void ChMixer::read (const ProcParams* pp, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
disableListener ();
|
||||
|
||||
if (pedited)
|
||||
for (int i=0; i<3; i++) {
|
||||
if (pedited)
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->setEditedState (pedited->chmixer.red[i] ? Edited : UnEdited);
|
||||
green[i]->setEditedState (pedited->chmixer.green[i] ? Edited : UnEdited);
|
||||
blue[i]->setEditedState (pedited->chmixer.blue[i] ? Edited : UnEdited);
|
||||
}
|
||||
|
||||
for (int i=0; i<3; i++) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->setValue (pp->chmixer.red[i]);
|
||||
green[i]->setValue (pp->chmixer.green[i]);
|
||||
blue[i]->setValue (pp->chmixer.blue[i]);
|
||||
@@ -105,79 +115,86 @@ void ChMixer::read (const ProcParams* pp, const ParamsEdited* pedited) {
|
||||
enableListener ();
|
||||
}
|
||||
|
||||
void ChMixer::write (ProcParams* pp, ParamsEdited* pedited) {
|
||||
void ChMixer::write (ProcParams* pp, ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
for (int i=0; i<3; i++) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
pp->chmixer.red[i] = (int) red[i]->getValue ();
|
||||
pp->chmixer.green[i] = (int) green[i]->getValue ();
|
||||
pp->chmixer.blue[i] = (int) blue[i]->getValue ();
|
||||
}
|
||||
|
||||
if (pedited)
|
||||
for (int i=0; i<3; i++) {
|
||||
|
||||
if (pedited)
|
||||
for (int i = 0; i < 3; i++) {
|
||||
pedited->chmixer.red[i] = red[i]->getEditedState ();
|
||||
pedited->chmixer.green[i] = green[i]->getEditedState ();
|
||||
pedited->chmixer.blue[i] = blue[i]->getEditedState ();
|
||||
}
|
||||
}
|
||||
|
||||
void ChMixer::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) {
|
||||
void ChMixer::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited)
|
||||
{
|
||||
|
||||
for (int i=0; i<3; i++) {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->setDefault (defParams->chmixer.red[i]);
|
||||
green[i]->setDefault (defParams->chmixer.green[i]);
|
||||
blue[i]->setDefault (defParams->chmixer.blue[i]);
|
||||
}
|
||||
|
||||
if (pedited)
|
||||
for (int i=0; i<3; i++) {
|
||||
|
||||
if (pedited)
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->setDefaultEditedState (pedited->chmixer.red[i] ? Edited : UnEdited);
|
||||
green[i]->setDefaultEditedState (pedited->chmixer.green[i] ? Edited : UnEdited);
|
||||
blue[i]->setDefaultEditedState (pedited->chmixer.blue[i] ? Edited : UnEdited);
|
||||
}
|
||||
else
|
||||
for (int i=0; i<3; i++) {
|
||||
else
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->setDefaultEditedState (Irrelevant);
|
||||
green[i]->setDefaultEditedState (Irrelevant);
|
||||
blue[i]->setDefaultEditedState (Irrelevant);
|
||||
}
|
||||
}
|
||||
|
||||
void ChMixer::adjusterChanged (Adjuster* a, double newval) {
|
||||
void ChMixer::adjusterChanged (Adjuster* a, double newval)
|
||||
{
|
||||
|
||||
if (listener) {
|
||||
Glib::ustring descr = Glib::ustring::compose ("R=%1,%2,%3\nG=%4,%5,%6\nB=%7,%8,%9",
|
||||
(int)red[0]->getValue(), (int)red[1]->getValue(), (int)red[2]->getValue(),
|
||||
(int)green[0]->getValue(), (int)green[1]->getValue(), (int)green[2]->getValue(),
|
||||
(int)blue[0]->getValue(), (int)blue[1]->getValue(), (int)blue[2]->getValue());
|
||||
(int)red[0]->getValue(), (int)red[1]->getValue(), (int)red[2]->getValue(),
|
||||
(int)green[0]->getValue(), (int)green[1]->getValue(), (int)green[2]->getValue(),
|
||||
(int)blue[0]->getValue(), (int)blue[1]->getValue(), (int)blue[2]->getValue());
|
||||
listener->panelChanged (EvChMixer, descr);
|
||||
}
|
||||
}
|
||||
|
||||
void ChMixer::setBatchMode (bool batchMode) {
|
||||
void ChMixer::setBatchMode (bool batchMode)
|
||||
{
|
||||
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
for (int i=0; i<3; i++) {
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->showEditedCB ();
|
||||
green[i]->showEditedCB ();
|
||||
blue[i]->showEditedCB ();
|
||||
}
|
||||
}
|
||||
|
||||
void ChMixer::setAdjusterBehavior (bool rgbadd) {
|
||||
void ChMixer::setAdjusterBehavior (bool rgbadd)
|
||||
{
|
||||
|
||||
for (int i=0; i<3; i++) {
|
||||
red[i]->setAddMode(rgbadd);
|
||||
green[i]->setAddMode(rgbadd);
|
||||
blue[i]->setAddMode(rgbadd);
|
||||
}
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->setAddMode(rgbadd);
|
||||
green[i]->setAddMode(rgbadd);
|
||||
blue[i]->setAddMode(rgbadd);
|
||||
}
|
||||
}
|
||||
|
||||
void ChMixer::trimValues (rtengine::procparams::ProcParams* pp) {
|
||||
void ChMixer::trimValues (rtengine::procparams::ProcParams* pp)
|
||||
{
|
||||
|
||||
for (int i=0; i<3; i++) {
|
||||
red[i]->trimValue(pp->chmixer.red[i]);
|
||||
green[i]->trimValue(pp->chmixer.green[i]);
|
||||
blue[i]->trimValue(pp->chmixer.blue[i]);
|
||||
}
|
||||
for (int i = 0; i < 3; i++) {
|
||||
red[i]->trimValue(pp->chmixer.red[i]);
|
||||
green[i]->trimValue(pp->chmixer.green[i]);
|
||||
blue[i]->trimValue(pp->chmixer.blue[i]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user