diff --git a/rtengine/curves.cc b/rtengine/curves.cc index 71e128495..ecd38d4aa 100644 --- a/rtengine/curves.cc +++ b/rtengine/curves.cc @@ -37,7 +37,6 @@ #include "ciecam02.h" #include "color.h" #include "iccstore.h" -#include "procparams.h" #undef CLIPD #define CLIPD(a) ((a)>0.0f?((a)<1.0f?(a):1.0f):0.0f) diff --git a/rtengine/dcp.h b/rtengine/dcp.h index bedc7f76d..dc6915d26 100644 --- a/rtengine/dcp.h +++ b/rtengine/dcp.h @@ -48,7 +48,7 @@ public: private: struct Data; - std::unique_ptr data; + const std::unique_ptr data; friend class DCPProfile; }; diff --git a/rtengine/iccstore.cc b/rtengine/iccstore.cc index b0248456a..268a6b1c2 100644 --- a/rtengine/iccstore.cc +++ b/rtengine/iccstore.cc @@ -32,7 +32,6 @@ #include "iccstore.h" #include "iccmatrices.h" -#include "procparams.h" #include "../rtgui/options.h" #include "../rtgui/threadutils.h" diff --git a/rtengine/iimage.h b/rtengine/iimage.h index 5ce93605b..a67c2051e 100644 --- a/rtengine/iimage.h +++ b/rtengine/iimage.h @@ -45,7 +45,7 @@ namespace rtengine namespace procparams { - class CoarseTransformParams; +struct CoarseTransformParams; } diff --git a/rtengine/imageio.h b/rtengine/imageio.h index f3428b759..05a11655a 100644 --- a/rtengine/imageio.h +++ b/rtengine/imageio.h @@ -56,7 +56,7 @@ protected: char* loadedProfileData; bool loadedProfileDataJpg; int loadedProfileLength; - std::unique_ptr exifChange; + const std::unique_ptr exifChange; IptcData* iptc; const rtexif::TagDirectory* exifRoot; MyMutex imutex; diff --git a/rtengine/improccoordinator.h b/rtengine/improccoordinator.h index 8ae5bc669..c293f0c16 100644 --- a/rtengine/improccoordinator.h +++ b/rtengine/improccoordinator.h @@ -185,7 +185,7 @@ protected: void updatePreviewImage (int todo, bool panningRelatedChange); MyMutex mProcessing; - std::unique_ptr params; + const std::unique_ptr params; // for optimization purpose, the output profile, output rendering intent and // output BPC will trigger a regeneration of the profile on parameter change only @@ -200,7 +200,7 @@ protected: MyMutex paramsUpdateMutex; int changeSinceLast; bool updaterRunning; - std::unique_ptr nextParams; + const std::unique_ptr nextParams; bool destroying; bool utili; bool autili; diff --git a/rtengine/ipvibrance.cc b/rtengine/ipvibrance.cc index 5f178b5c0..9bb4bc087 100644 --- a/rtengine/ipvibrance.cc +++ b/rtengine/ipvibrance.cc @@ -27,6 +27,7 @@ #include "../rtgui/thresholdselector.h" #include "curves.h" #include "color.h" +#include "procparams.h" #include "StopWatch.h" #ifdef _OPENMP #include diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 37f428c8a..26670c65a 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -28,7 +28,7 @@ #include "noncopyable.h" -class ParamsEdited; +struct ParamsEdited; namespace rtengine { @@ -473,7 +473,7 @@ struct ColorToningParams { }; std::vector labregions; int labregionsShowMask; - + ColorToningParams(); bool operator ==(const ColorToningParams& other) const; diff --git a/rtengine/rawimagesource.h b/rtengine/rawimagesource.h index 15d030cca..3c41b8742 100644 --- a/rtengine/rawimagesource.h +++ b/rtengine/rawimagesource.h @@ -94,7 +94,7 @@ protected: float psBlueBrightness[4]; std::vector histMatchingCache; - std::unique_ptr histMatchingParams; + const std::unique_ptr histMatchingParams; void processFalseColorCorrectionThread (Imagefloat* im, array2D &rbconv_Y, array2D &rbconv_I, array2D &rbconv_Q, array2D &rbout_I, array2D &rbout_Q, const int row_from, const int row_to); void hlRecovery (const std::string &method, float* red, float* green, float* blue, int width, float* hlmax); diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 540215478..9792522c7 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -21,6 +21,7 @@ #include #include #include "../rtengine/rt_math.h" +#include "../rtengine/procparams.h" #include #include diff --git a/rtgui/batchqueueentry.h b/rtgui/batchqueueentry.h index e14581285..6aecff945 100644 --- a/rtgui/batchqueueentry.h +++ b/rtgui/batchqueueentry.h @@ -48,7 +48,7 @@ public: static Glib::RefPtr savedAsIcon; rtengine::ProcessingJob* job; - std::unique_ptr params; + const std::unique_ptr params; Glib::ustring savedParamsFile; double progress; Glib::ustring outFileName; diff --git a/rtgui/bayerpreprocess.cc b/rtgui/bayerpreprocess.cc index 0720612fe..89fd6fcb6 100644 --- a/rtgui/bayerpreprocess.cc +++ b/rtgui/bayerpreprocess.cc @@ -16,11 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "bayerpreprocess.h" -#include "guiutils.h" -#include "eventmapper.h" #include +#include "bayerpreprocess.h" +#include "eventmapper.h" +#include "guiutils.h" + +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/bayerprocess.cc b/rtgui/bayerprocess.cc index 279e68bd6..a681023a6 100644 --- a/rtgui/bayerprocess.cc +++ b/rtgui/bayerprocess.cc @@ -17,9 +17,13 @@ * along with RawTherapee. If not, see . */ #include "bayerprocess.h" + #include "eventmapper.h" -#include "options.h" #include "guiutils.h" +#include "options.h" + +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/bayerrawexposure.cc b/rtgui/bayerrawexposure.cc index f284d7975..d49486511 100644 --- a/rtgui/bayerrawexposure.cc +++ b/rtgui/bayerrawexposure.cc @@ -17,8 +17,11 @@ * along with RawTherapee. If not, see . */ #include "bayerrawexposure.h" + #include "guiutils.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/blackwhite.cc b/rtgui/blackwhite.cc index dcc5c7e01..48d37ebab 100644 --- a/rtgui/blackwhite.cc +++ b/rtgui/blackwhite.cc @@ -16,13 +16,17 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "blackwhite.h" -#include "rtimage.h" -#include "../rtengine/color.h" #include #include -#include "guiutils.h" + +#include "blackwhite.h" + #include "edit.h" +#include "guiutils.h" +#include "rtimage.h" + +#include "../rtengine/color.h" +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/cacorrection.cc b/rtgui/cacorrection.cc index 4405e4ad1..c91eec145 100644 --- a/rtgui/cacorrection.cc +++ b/rtgui/cacorrection.cc @@ -16,10 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "cacorrection.h" #include + +#include "cacorrection.h" + #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/chmixer.cc b/rtgui/chmixer.cc index e15ed89f5..4a3411e8b 100644 --- a/rtgui/chmixer.cc +++ b/rtgui/chmixer.cc @@ -17,8 +17,11 @@ * along with RawTherapee. If not, see . */ #include "chmixer.h" + #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/clipboard.cc b/rtgui/clipboard.cc index dfd78cdd1..c8eb94d7b 100644 --- a/rtgui/clipboard.cc +++ b/rtgui/clipboard.cc @@ -18,62 +18,146 @@ */ #include "clipboard.h" +#include "../rtengine/procparams.h" + Clipboard clipboard; -Clipboard::Clipboard () : _hasIPTC(false), partProfile (false), hasDiagonalCurveDataType(DCT_Empty), hasFlatCurveDataType(FCT_Empty) {} +Clipboard::Clipboard () : + _hasIPTC(false), + iptc(new rtengine::procparams::IPTCPairs), + partProfile(new rtengine::procparams::PartialProfile(false)), + hasDiagonalCurveDataType(DCT_Empty), + hasFlatCurveDataType(FCT_Empty) +{ +} Clipboard::~Clipboard () { - partProfile.deleteInstance(); + partProfile->deleteInstance(); +} + +bool Clipboard::hasIPTC() const +{ + return _hasIPTC; +} + +const rtengine::procparams::IPTCPairs& Clipboard::getIPTC() const +{ + return *iptc; +} + +void Clipboard::setIPTC(const rtengine::procparams::IPTCPairs& iptcc) +{ + *iptc = iptcc; + _hasIPTC = true; +} + +const rtengine::procparams::PartialProfile& Clipboard::getPartialProfile() const +{ + return *partProfile; } /* * set both the "pparams" and "pedited" field of the PartialProfile; each one can be NULL */ -void Clipboard::setPartialProfile (const rtengine::procparams::PartialProfile& pprofile) +void Clipboard::setPartialProfile(const rtengine::procparams::PartialProfile& pprofile) { if (pprofile.pparams) { - if (!partProfile.pparams) { - partProfile.pparams = new rtengine::procparams::ProcParams(); + if (!partProfile->pparams) { + partProfile->pparams = new rtengine::procparams::ProcParams(); } - *partProfile.pparams = *pprofile.pparams; + *partProfile->pparams = *pprofile.pparams; } else { - if (partProfile.pparams) { - delete partProfile.pparams; - partProfile.pparams = nullptr; + if (partProfile->pparams) { + delete partProfile->pparams; + partProfile->pparams = nullptr; } } if (pprofile.pedited) { - if (!partProfile.pedited) { - partProfile.pedited = new ParamsEdited(); + if (!partProfile->pedited) { + partProfile->pedited = new ParamsEdited(); } - *partProfile.pedited = *pprofile.pedited; + *partProfile->pedited = *pprofile.pedited; } else { - if (partProfile.pedited) { - delete partProfile.pedited; - partProfile.pedited = nullptr; + if (partProfile->pedited) { + delete partProfile->pedited; + partProfile->pedited = nullptr; } } } +const rtengine::procparams::ProcParams& Clipboard::getProcParams() const +{ + return *partProfile->pparams; +} + /* * this method copy the procparams to "pparams" and delete "pedited" */ -void Clipboard::setProcParams (const rtengine::procparams::ProcParams& pparams) +void Clipboard::setProcParams(const rtengine::procparams::ProcParams& pparams) { // copy procparams - if (!partProfile.pparams) { - partProfile.pparams = new rtengine::procparams::ProcParams(); + if (!partProfile->pparams) { + partProfile->pparams = new rtengine::procparams::ProcParams(); } - *partProfile.pparams = pparams; + *partProfile->pparams = pparams; // delete pedited - if (partProfile.pedited) { - delete partProfile.pedited; - partProfile.pedited = nullptr; + if (partProfile->pedited) { + delete partProfile->pedited; + partProfile->pedited = nullptr; } } + +const ParamsEdited& Clipboard::getParamsEdited() const +{ + return *partProfile->pedited; +} + +bool Clipboard::hasProcParams() const +{ + return partProfile->pparams; +} + +bool Clipboard::hasPEdited() const +{ + return partProfile->pedited; +} + +DiagonalCurveType Clipboard::hasDiagonalCurveData() const +{ + return hasDiagonalCurveDataType; +} + +const std::vector& Clipboard::getDiagonalCurveData() const +{ + return diagonalCurve; +} + +void Clipboard::setDiagonalCurveData(const std::vector& p, DiagonalCurveType type) +{ + diagonalCurve = p; + hasDiagonalCurveDataType = type; + return; +} + +FlatCurveType Clipboard::hasFlatCurveData() const +{ + return hasFlatCurveDataType; +} + +const std::vector& Clipboard:: getFlatCurveData() const +{ + return flatCurve; +} + +void Clipboard::setFlatCurveData(const std::vector& p, FlatCurveType type) +{ + flatCurve = p; + hasFlatCurveDataType = type; + return; +} diff --git a/rtgui/clipboard.h b/rtgui/clipboard.h index eff5c08c8..74c9f6770 100644 --- a/rtgui/clipboard.h +++ b/rtgui/clipboard.h @@ -19,96 +19,64 @@ #ifndef _CLIPBOARD_ #define _CLIPBOARD_ +#include #include -#include "../rtengine/rtengine.h" -#include "../rtengine/procparams.h" -#include "paramsedited.h" -#include "myflatcurve.h" + #include "mydiagonalcurve.h" +#include "myflatcurve.h" +#include "paramsedited.h" + +#include "../rtengine/rtengine.h" + +namespace rtengine +{ + +namespace procparams +{ + +class PartialProfile; + +} + +} class Clipboard { +public: + Clipboard (); + ~Clipboard (); + bool hasIPTC() const; + const rtengine::procparams::IPTCPairs& getIPTC() const; + void setIPTC(const rtengine::procparams::IPTCPairs& iptcc); + + const rtengine::procparams::PartialProfile& getPartialProfile() const; + void setPartialProfile(const rtengine::procparams::PartialProfile& pprofile); + + const rtengine::procparams::ProcParams& getProcParams() const; + void setProcParams(const rtengine::procparams::ProcParams& pparams); + + const ParamsEdited& getParamsEdited() const; + + bool hasProcParams() const; + bool hasPEdited() const; + + DiagonalCurveType hasDiagonalCurveData() const; + const std::vector& getDiagonalCurveData() const; + void setDiagonalCurveData(const std::vector& p, DiagonalCurveType type); + + void setFlatCurveData(const std::vector& p, FlatCurveType type); + const std::vector& getFlatCurveData() const; + FlatCurveType hasFlatCurveData() const; + +private: bool _hasIPTC; - rtengine::procparams::IPTCPairs iptc; - rtengine::procparams::PartialProfile partProfile; + const std::unique_ptr iptc; + const std::unique_ptr partProfile; DiagonalCurveType hasDiagonalCurveDataType; FlatCurveType hasFlatCurveDataType; std::vector diagonalCurve; std::vector flatCurve; - - -public: - void setIPTC (const rtengine::procparams::IPTCPairs& iptcc) - { - iptc = iptcc; - _hasIPTC = true; - } - const rtengine::procparams::IPTCPairs& getIPTC () - { - return iptc; - } - bool hasIPTC () - { - return _hasIPTC; - } - - void setPartialProfile (const rtengine::procparams::PartialProfile& pprofile); - const rtengine::procparams::PartialProfile& getPartialProfile () - { - return partProfile; - }; - void setProcParams (const rtengine::procparams::ProcParams& pparams); - const rtengine::procparams::ProcParams& getProcParams () - { - return *partProfile.pparams; - } - const ParamsEdited& getParamsEdited () - { - return *partProfile.pedited; - } - bool hasProcParams () - { - return partProfile.pparams; - } - bool hasPEdited () - { - return partProfile.pedited; - } - - void setDiagonalCurveData (std::vector& p, DiagonalCurveType type ) - { - diagonalCurve = p; - hasDiagonalCurveDataType = type; - return; - } - const std::vector & getDiagonalCurveData () - { - return diagonalCurve; - } - DiagonalCurveType hasDiagonalCurveData () - { - return hasDiagonalCurveDataType; - } - - void setFlatCurveData (std::vector& p, FlatCurveType type ) - { - flatCurve = p; - hasFlatCurveDataType = type; - return; - } - const std::vector & getFlatCurveData () - { - return flatCurve; - } - FlatCurveType hasFlatCurveData () - { - return hasFlatCurveDataType; - } - - Clipboard (); - ~Clipboard (); - }; extern Clipboard clipboard; diff --git a/rtgui/coarsepanel.cc b/rtgui/coarsepanel.cc index 8f927239e..92c312554 100644 --- a/rtgui/coarsepanel.cc +++ b/rtgui/coarsepanel.cc @@ -17,8 +17,11 @@ * along with RawTherapee. If not, see . */ #include "coarsepanel.h" + #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/colorappearance.cc b/rtgui/colorappearance.cc index dea55ced4..f78a1f32b 100644 --- a/rtgui/colorappearance.cc +++ b/rtgui/colorappearance.cc @@ -16,10 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "colorappearance.h" #include + +#include "colorappearance.h" + #include "guiutils.h" + #include "../rtengine/color.h" +#include "../rtengine/procparams.h" #define MINTEMP0 2000 //1200 #define MAXTEMP0 12000 //12000 diff --git a/rtgui/crop.cc b/rtgui/crop.cc index 1cd87b80a..de693d399 100644 --- a/rtgui/crop.cc +++ b/rtgui/crop.cc @@ -17,9 +17,12 @@ * along with RawTherapee. If not, see . */ #include "crop.h" + #include "options.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/crophandler.h b/rtgui/crophandler.h index f0e121e5e..e0b48d348 100644 --- a/rtgui/crophandler.h +++ b/rtgui/crophandler.h @@ -106,8 +106,8 @@ public: void update (); - std::unique_ptr cropParams; - std::unique_ptr colorParams; + const std::unique_ptr cropParams; + const std::unique_ptr colorParams; Glib::RefPtr cropPixbuf; // image displayed on monitor, using the monitor profile (i.e. lab to monitor profile) Glib::RefPtr cropPixbuftrue; // internal image in output color space for analysis (i.e. lab to either Working profile or Output profile, depending on options.rtSettings.HistogramWorking) diff --git a/rtgui/darkframe.cc b/rtgui/darkframe.cc index d0f2e9ed0..77e9c53a6 100644 --- a/rtgui/darkframe.cc +++ b/rtgui/darkframe.cc @@ -16,12 +16,16 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "darkframe.h" -#include "options.h" -#include "guiutils.h" #include + +#include "darkframe.h" + +#include "guiutils.h" +#include "options.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/defringe.cc b/rtgui/defringe.cc index 6a3d11d76..7d29b8c8f 100644 --- a/rtgui/defringe.cc +++ b/rtgui/defringe.cc @@ -16,9 +16,12 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "defringe.h" -#include #include +#include + +#include "defringe.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/dehaze.cc b/rtgui/dehaze.cc index 0f0892ac6..8204210db 100644 --- a/rtgui/dehaze.cc +++ b/rtgui/dehaze.cc @@ -17,10 +17,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "dehaze.h" -#include "eventmapper.h" -#include #include +#include + +#include "dehaze.h" + +#include "eventmapper.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/dirpyrdenoise.cc b/rtgui/dirpyrdenoise.cc index 613dc8d44..7be07420e 100644 --- a/rtgui/dirpyrdenoise.cc +++ b/rtgui/dirpyrdenoise.cc @@ -16,12 +16,16 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "dirpyrdenoise.h" -#include #include +#include + +#include "dirpyrdenoise.h" + #include "edit.h" #include "guiutils.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; extern Options options; diff --git a/rtgui/distortion.cc b/rtgui/distortion.cc index d1d097269..0ac067ba8 100644 --- a/rtgui/distortion.cc +++ b/rtgui/distortion.cc @@ -16,10 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "distortion.h" #include + +#include "distortion.h" + #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/epd.cc b/rtgui/epd.cc index 675a5b9b9..4b7cca10a 100644 --- a/rtgui/epd.cc +++ b/rtgui/epd.cc @@ -16,9 +16,12 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "epd.h" -#include #include +#include + +#include "epd.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/exifpanel.cc b/rtgui/exifpanel.cc index be5d5dc4c..1882f4377 100644 --- a/rtgui/exifpanel.cc +++ b/rtgui/exifpanel.cc @@ -21,13 +21,17 @@ #include "guiutils.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; using namespace rtexif; -ExifPanel::ExifPanel () : idata (nullptr) +ExifPanel::ExifPanel() : + idata(nullptr), + changeList(new rtengine::procparams::ExifPairs), + defChangeList(new rtengine::procparams::ExifPairs) { - recursiveOp = true; exifTree = Gtk::manage (new Gtk::TreeView()); @@ -166,7 +170,7 @@ void ExifPanel::read (const ProcParams* pp, const ParamsEdited* pedited) disableListener (); - changeList = pp->exif; + *changeList = pp->exif; setImageData (idata); applyChangeList (); exifSelectionChanged (); @@ -178,13 +182,13 @@ void ExifPanel::write (ProcParams* pp, ParamsEdited* pedited) { // updateChangeList (); - pp->exif = changeList; + pp->exif = *changeList; } void ExifPanel::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) { - defChangeList = defParams->exif; + *defChangeList = defParams->exif; } void ExifPanel::setImageData (const FramesMetaData* id) @@ -457,7 +461,7 @@ void ExifPanel::resetAllPressed () { setImageData (idata); - changeList = defChangeList; + *changeList = *defChangeList; applyChangeList (); exifSelectionChanged (); notifyListener (); @@ -661,11 +665,11 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre for (iter = root.begin(); iter != root.end(); ++iter) { if (iter->get_value (exifColumns.edited)) { - changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango); + (*changeList)[ prefix + iter->get_value (exifColumns.field_nopango) ] = iter->get_value (exifColumns.value_nopango); } else if (iter->get_value (exifColumns.action) == AC_WRITE && iter->get_value (exifColumns.icon) == delicon) { - changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#delete"; + (*changeList)[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#delete"; } else if (iter->get_value (exifColumns.action) == AC_DONTWRITE && iter->get_value (exifColumns.icon) == keepicon) { - changeList[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#keep"; + (*changeList)[ prefix + iter->get_value (exifColumns.field_nopango) ] = "#keep"; } if (iter->get_value (exifColumns.icon) == keepicon) { @@ -677,14 +681,14 @@ void ExifPanel::updateChangeList (Gtk::TreeModel::Children root, std::string pre void ExifPanel::updateChangeList () { - changeList.clear (); + changeList->clear (); updateChangeList (exifTreeModel->children(), ""); } void ExifPanel::applyChangeList () { - for (rtengine::procparams::ExifPairs::const_iterator i = changeList.begin(); i != changeList.end(); ++i) { + for (rtengine::procparams::ExifPairs::const_iterator i = changeList->begin(); i != changeList->end(); ++i) { editTag (exifTreeModel->children(), i->first, i->second); } } diff --git a/rtgui/exifpanel.h b/rtgui/exifpanel.h index cd27cb780..c8597a287 100644 --- a/rtgui/exifpanel.h +++ b/rtgui/exifpanel.h @@ -19,7 +19,10 @@ #ifndef _EXIFPANEL_ #define _EXIFPANEL_ +#include + #include + #include "toolpanel.h" class ExifPanel : public Gtk::VBox, public ToolPanel @@ -27,8 +30,8 @@ class ExifPanel : public Gtk::VBox, public ToolPanel private: const rtengine::FramesMetaData* idata; - rtengine::procparams::ExifPairs changeList; - rtengine::procparams::ExifPairs defChangeList; + const std::unique_ptr changeList; + const std::unique_ptr defChangeList; bool recursiveOp; class ExifColumns : public Gtk::TreeModelColumnRecord diff --git a/rtgui/fattaltonemap.cc b/rtgui/fattaltonemap.cc index 3a6a15a4d..85d835cc7 100644 --- a/rtgui/fattaltonemap.cc +++ b/rtgui/fattaltonemap.cc @@ -17,10 +17,15 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "fattaltonemap.h" -#include "eventmapper.h" -#include #include +#include + +#include "fattaltonemap.h" + +#include "eventmapper.h" + +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/filebrowser.cc b/rtgui/filebrowser.cc index d489bb1d3..2a576013a 100644 --- a/rtgui/filebrowser.cc +++ b/rtgui/filebrowser.cc @@ -18,19 +18,24 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "filebrowser.h" #include + #include -#include "options.h" -#include "multilangmgr.h" -#include "clipboard.h" -#include "procparamchangers.h" + +#include "filebrowser.h" + #include "batchqueue.h" -#include "../rtengine/dfmanager.h" -#include "../rtengine/ffmanager.h" +#include "clipboard.h" +#include "multilangmgr.h" +#include "options.h" +#include "procparamchangers.h" #include "rtimage.h" #include "threadutils.h" +#include "../rtengine/dfmanager.h" +#include "../rtengine/ffmanager.h" +#include "../rtengine/procparams.h" + extern Options options; namespace diff --git a/rtgui/filebrowserentry.h b/rtgui/filebrowserentry.h index 770889d88..3a3d32977 100644 --- a/rtgui/filebrowserentry.h +++ b/rtgui/filebrowserentry.h @@ -56,7 +56,7 @@ class FileBrowserEntry : public ThumbBrowserEntryBase, int press_x, press_y, action_x, action_y; double rot_deg; bool landscape; - std::unique_ptr cropParams; + const std::unique_ptr cropParams; CropGUIListener* cropgl; FileBrowserEntryIdleHelper* feih; diff --git a/rtgui/filmsimulation.cc b/rtgui/filmsimulation.cc index f929048b8..e354724ba 100644 --- a/rtgui/filmsimulation.cc +++ b/rtgui/filmsimulation.cc @@ -1,12 +1,13 @@ +#include #include #include #include "filmsimulation.h" -#include - #include "options.h" + #include "../rtengine/clutstore.h" +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/flatfield.cc b/rtgui/flatfield.cc index 86d27aacf..3cbd7acf1 100644 --- a/rtgui/flatfield.cc +++ b/rtgui/flatfield.cc @@ -16,12 +16,16 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "flatfield.h" -#include "options.h" -#include "guiutils.h" #include + +#include "flatfield.h" + +#include "guiutils.h" +#include "options.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/gradient.cc b/rtgui/gradient.cc index 5091d3637..fd99e9939 100644 --- a/rtgui/gradient.cc +++ b/rtgui/gradient.cc @@ -2,7 +2,10 @@ * This file is part of RawTherapee. */ #include "gradient.h" + #include "rtimage.h" + +#include "../rtengine/procparams.h" #include "../rtengine/rt_math.h" using namespace rtengine; diff --git a/rtgui/history.cc b/rtgui/history.cc index 35f99db5b..4d435c460 100644 --- a/rtgui/history.cc +++ b/rtgui/history.cc @@ -17,10 +17,13 @@ * along with RawTherapee. If not, see . */ #include "history.h" + +#include "eventmapper.h" +#include "guiutils.h" #include "multilangmgr.h" #include "rtimage.h" -#include "guiutils.h" -#include "eventmapper.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/hsvequalizer.cc b/rtgui/hsvequalizer.cc index 1dfb017a7..7db76aa9f 100644 --- a/rtgui/hsvequalizer.cc +++ b/rtgui/hsvequalizer.cc @@ -16,9 +16,10 @@ * * 2010 Ilya Popov */ - #include "hsvequalizer.h" + #include "../rtengine/color.h" +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/icmpanel.cc b/rtgui/icmpanel.cc index bb7fdd89b..ba8bf9cef 100644 --- a/rtgui/icmpanel.cc +++ b/rtgui/icmpanel.cc @@ -17,15 +17,18 @@ * along with RawTherapee. If not, see . */ #include -#include "icmpanel.h" -#include "options.h" -#include "eventmapper.h" +#include "icmpanel.h" + +#include "eventmapper.h" #include "guiutils.h" -#include "../rtengine/iccstore.h" -#include "../rtengine/dcp.h" +#include "options.h" #include "rtimage.h" +#include "../rtengine/dcp.h" +#include "../rtengine/iccstore.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/impulsedenoise.cc b/rtgui/impulsedenoise.cc index 3e5a9a980..9203ce8a7 100644 --- a/rtgui/impulsedenoise.cc +++ b/rtgui/impulsedenoise.cc @@ -16,11 +16,15 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "impulsedenoise.h" #include #include + +#include "impulsedenoise.h" + #include "guiutils.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/iptcpanel.cc b/rtgui/iptcpanel.cc index 5065452b0..7347927a0 100644 --- a/rtgui/iptcpanel.cc +++ b/rtgui/iptcpanel.cc @@ -20,10 +20,15 @@ #include "clipboard.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; -IPTCPanel::IPTCPanel () +IPTCPanel::IPTCPanel () : + changeList(new rtengine::procparams::IPTCPairs), + defChangeList(new rtengine::procparams::IPTCPairs), + embeddedData(new rtengine::procparams::IPTCPairs) { set_spacing (4); @@ -410,12 +415,12 @@ void IPTCPanel::read (const ProcParams* pp, const ParamsEdited* pedited) { disableListener (); - changeList.clear(); + changeList->clear(); if (!pp->iptc.empty()) { - changeList = pp->iptc; + *changeList = pp->iptc; } else { - changeList = embeddedData; + *changeList = *embeddedData; } applyChangeList (); @@ -425,25 +430,25 @@ void IPTCPanel::read (const ProcParams* pp, const ParamsEdited* pedited) void IPTCPanel::write (ProcParams* pp, ParamsEdited* pedited) { - pp->iptc = changeList; + pp->iptc = *changeList; } void IPTCPanel::setDefaults (const ProcParams* defParams, const ParamsEdited* pedited) { - defChangeList = defParams->iptc; + *defChangeList = defParams->iptc; } void IPTCPanel::setImageData (const FramesMetaData* id) { if (id) { - embeddedData = id->getIPTCData (); + *embeddedData = id->getIPTCData (); } else { - embeddedData.clear (); + embeddedData->clear (); } - file->set_sensitive (!embeddedData.empty()); + file->set_sensitive (!embeddedData->empty()); } void IPTCPanel::notifyListener () @@ -564,33 +569,33 @@ void IPTCPanel::delSuppCategory () void IPTCPanel::updateChangeList () { - changeList.clear (); - changeList["Caption" ].push_back (captionText->get_text ()); - changeList["CaptionWriter" ].push_back (captionWriter->get_text ()); - changeList["Headline" ].push_back (headline->get_text ()); - changeList["Instructions" ].push_back (instructions->get_text ()); + changeList->clear (); + (*changeList)["Caption" ].push_back (captionText->get_text ()); + (*changeList)["CaptionWriter" ].push_back (captionWriter->get_text ()); + (*changeList)["Headline" ].push_back (headline->get_text ()); + (*changeList)["Instructions" ].push_back (instructions->get_text ()); for (unsigned int i = 0; i < keywords->size(); i++) { - changeList["Keywords" ].push_back (keywords->get_text (i)); + (*changeList)["Keywords" ].push_back (keywords->get_text (i)); } - changeList["Category" ].push_back (category->get_entry()->get_text ()); + (*changeList)["Category" ].push_back (category->get_entry()->get_text ()); for (unsigned int i = 0; i < suppCategories->size(); i++) { - changeList["SupplementalCategories"].push_back (suppCategories->get_text (i)); + (*changeList)["SupplementalCategories"].push_back (suppCategories->get_text (i)); } - changeList["Creator" ].push_back (creator->get_text ()); - changeList["CreatorJobTitle"].push_back (creatorJobTitle->get_text ()); - changeList["Credit" ].push_back (credit->get_text ()); - changeList["Source" ].push_back (source->get_text ()); - changeList["Copyright" ].push_back (copyright->get_text ()); - changeList["City" ].push_back (city->get_text ()); - changeList["Province" ].push_back (province->get_text ()); - changeList["Country" ].push_back (country->get_text ()); - changeList["Title" ].push_back (title->get_text ()); - changeList["DateCreated" ].push_back (dateCreated->get_text ()); - changeList["TransReference" ].push_back (transReference->get_text ()); + (*changeList)["Creator" ].push_back (creator->get_text ()); + (*changeList)["CreatorJobTitle"].push_back (creatorJobTitle->get_text ()); + (*changeList)["Credit" ].push_back (credit->get_text ()); + (*changeList)["Source" ].push_back (source->get_text ()); + (*changeList)["Copyright" ].push_back (copyright->get_text ()); + (*changeList)["City" ].push_back (city->get_text ()); + (*changeList)["Province" ].push_back (province->get_text ()); + (*changeList)["Country" ].push_back (country->get_text ()); + (*changeList)["Title" ].push_back (title->get_text ()); + (*changeList)["DateCreated" ].push_back (dateCreated->get_text ()); + (*changeList)["TransReference" ].push_back (transReference->get_text ()); notifyListener (); } @@ -623,7 +628,7 @@ void IPTCPanel::applyChangeList () keyword->get_entry()->set_text (""); suppCategory->get_entry()->set_text (""); - for (rtengine::procparams::IPTCPairs::const_iterator i = changeList.begin(); i != changeList.end(); ++i) { + for (rtengine::procparams::IPTCPairs::const_iterator i = changeList->begin(); i != changeList->end(); ++i) { if (i->first == "Caption" && !i->second.empty()) { captionText->set_text (i->second.at(0)); } else if (i->first == "CaptionWriter" && !i->second.empty()) { @@ -676,7 +681,7 @@ void IPTCPanel::resetClicked () { disableListener (); - changeList = defChangeList; + *changeList = *defChangeList; applyChangeList (); enableListener (); notifyListener (); @@ -686,7 +691,7 @@ void IPTCPanel::fileClicked () { disableListener (); - changeList = embeddedData; + *changeList = *embeddedData; applyChangeList (); enableListener (); notifyListener (); @@ -695,14 +700,14 @@ void IPTCPanel::fileClicked () void IPTCPanel::copyClicked () { - clipboard.setIPTC (changeList); + clipboard.setIPTC (*changeList); } void IPTCPanel::pasteClicked () { disableListener (); - changeList = clipboard.getIPTC (); + *changeList = clipboard.getIPTC (); applyChangeList (); enableListener (); notifyListener (); diff --git a/rtgui/iptcpanel.h b/rtgui/iptcpanel.h index 5574fe884..25683ccec 100644 --- a/rtgui/iptcpanel.h +++ b/rtgui/iptcpanel.h @@ -19,17 +19,20 @@ #ifndef _IPTCPANEL_ #define _IPTCPANEL_ +#include + #include -#include "toolpanel.h" + #include "guiutils.h" +#include "toolpanel.h" class IPTCPanel : public Gtk::VBox, public ToolPanel { private: - rtengine::procparams::IPTCPairs changeList; - rtengine::procparams::IPTCPairs defChangeList; - rtengine::procparams::IPTCPairs embeddedData; + const std::unique_ptr changeList; + const std::unique_ptr defChangeList; + const std::unique_ptr embeddedData; Gtk::TextView* captionView; Glib::RefPtr captionText; diff --git a/rtgui/labcurve.cc b/rtgui/labcurve.cc index 2e851c321..e73fa31e0 100644 --- a/rtgui/labcurve.cc +++ b/rtgui/labcurve.cc @@ -16,11 +16,15 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "labcurve.h" #include -#include "../rtengine/improcfun.h" + +#include "labcurve.h" + #include "edit.h" +#include "../rtengine/improcfun.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/lensgeom.cc b/rtgui/lensgeom.cc index 898fa1105..baf816c8b 100644 --- a/rtgui/lensgeom.cc +++ b/rtgui/lensgeom.cc @@ -20,6 +20,8 @@ #include "guiutils.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/lensprofile.cc b/rtgui/lensprofile.cc index d421632a9..85dcb992a 100644 --- a/rtgui/lensprofile.cc +++ b/rtgui/lensprofile.cc @@ -16,15 +16,20 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include -#include "lensprofile.h" -#include "guiutils.h" -#include "../rtengine/lcp.h" -#include -#include "rtimage.h" -#include "../rtengine/rtlensfun.h" #include #include +#include + +#include + +#include "lensprofile.h" + +#include "guiutils.h" +#include "rtimage.h" + +#include "../rtengine/lcp.h" +#include "../rtengine/procparams.h" +#include "../rtengine/rtlensfun.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/localcontrast.cc b/rtgui/localcontrast.cc index 2be811a99..93b67657d 100644 --- a/rtgui/localcontrast.cc +++ b/rtgui/localcontrast.cc @@ -17,10 +17,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "localcontrast.h" -#include "eventmapper.h" -#include #include +#include + +#include "localcontrast.h" + +#include "eventmapper.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 5d7396f19..b93b3123b 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -16,10 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "paramsedited.h" #include -#include "options.h" + +#include "paramsedited.h" + #include "addsetids.h" +#include "options.h" + +#include "../rtengine/procparams.h" ParamsEdited::ParamsEdited(bool value) { diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 0bad2ab3c..49052cbdf 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -16,27 +16,19 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#ifndef _PARAMEDITED_H_ -#define _PARAMEDITED_H_ +#pragma once -#include #include -#include "../rtengine/procparams.h" + #include "../rtengine/rtengine.h" -class GeneralParamsEdited -{ - -public: +struct GeneralParamsEdited { bool rank; bool colorlabel; bool intrash; }; -class ToneCurveParamsEdited -{ - -public: +struct ToneCurveParamsEdited { bool curve; bool curve2; bool curveMode; @@ -58,9 +50,7 @@ public: bool clampOOG; }; -class RetinexParamsEdited -{ -public: +struct RetinexParamsEdited { bool enabled; bool str; bool scal; @@ -90,19 +80,17 @@ public: bool lhcurve; bool retinex; bool medianmap; - bool isUnchanged() const; bool highlights; bool htonalwidth; bool shadows; bool stonalwidth; bool radius; + bool isUnchanged() const; }; -class LCurveParamsEdited -{ -public: +struct LCurveParamsEdited { bool enabled; bool brightness; bool contrast; @@ -122,9 +110,7 @@ public: }; -class LocalContrastParamsEdited -{ -public: +struct LocalContrastParamsEdited { bool enabled; bool radius; bool amount; @@ -132,11 +118,7 @@ public: bool lightness; }; - -class RGBCurvesParamsEdited -{ - -public: +struct RGBCurvesParamsEdited { bool enabled; bool lumamode; bool rcurve; @@ -144,10 +126,7 @@ public: bool bcurve; }; -class ColorToningEdited -{ - -public: +struct ColorToningEdited { bool enabled; bool opacityCurve; bool colorCurve; @@ -182,31 +161,22 @@ public: bool labregionsShowMask; }; -class SharpenEdgeParamsEdited -{ - -public : +struct SharpenEdgeParamsEdited { bool enabled; bool passes; bool amount; bool threechannels; }; -class SharpenMicroParamsEdited -{ -public : +struct SharpenMicroParamsEdited { bool enabled; bool matrix; bool amount; bool contrast; bool uniformity; - }; -class SharpeningParamsEdited -{ - -public: +struct SharpeningParamsEdited { bool enabled; bool contrast; bool blurradius; @@ -226,10 +196,7 @@ public: bool deconvdamping; }; -class VibranceParamsEdited -{ - -public: +struct VibranceParamsEdited { bool enabled; bool pastels; bool saturated; @@ -240,19 +207,7 @@ public: bool skintonescurve; }; -/*class ColorBoostParamsEdited { - - public: - bool amount; - bool avoidclip; - bool enable_saturationlimiter; - bool rstprotection; -};*/ - -class WBParamsEdited -{ - -public: +struct WBParamsEdited { bool enabled; bool method; bool temperature; @@ -261,50 +216,19 @@ public: bool tempBias; }; -/*class ColorShiftParamsEdited { - - public: - bool a; - bool b; -};*/ - -/*class LumaDenoiseParamsEdited { - - public: - bool enabled; - bool radius; - bool edgetolerance; -};*/ - -/*class ColorDenoiseParamsEdited { - - public: - bool enabled; - bool amount; -};*/ - -class DefringeParamsEdited -{ - -public: +struct DefringeParamsEdited { bool enabled; bool radius; bool threshold; bool huecurve; }; -class ImpulseDenoiseParamsEdited -{ - -public: +struct ImpulseDenoiseParamsEdited { bool enabled; bool thresh; }; -class ColorAppearanceParamsEdited -{ - -public: +struct ColorAppearanceParamsEdited { bool curve; bool curve2; bool curve3; @@ -337,22 +261,16 @@ public: bool rstprotection; bool surrsource; bool gamut; -// bool badpix; bool datacie; bool tonecie; -// bool sharpcie; bool tempout; bool greenout; bool ybout; bool tempsc; bool greensc; - }; -class DirPyrDenoiseParamsEdited -{ - -public: +struct DirPyrDenoiseParamsEdited { bool enabled; bool enhance; bool median; @@ -365,7 +283,6 @@ public: bool lcurve; bool cccurve; -// bool perform; bool dmethod; bool Lmethod; bool Cmethod; @@ -375,12 +292,9 @@ public: bool methodmed; bool rgbmethod; bool passes; - }; -class EPDParamsEdited -{ -public: +struct EPDParamsEdited { bool enabled; bool strength; bool gamma; @@ -389,21 +303,14 @@ public: bool reweightingIterates; }; - -class FattalToneMappingParamsEdited -{ -public: +struct FattalToneMappingParamsEdited { bool enabled; bool threshold; bool amount; bool anchor; }; - -class SHParamsEdited -{ - -public: +struct SHParamsEdited { bool enabled; bool highlights; bool htonalwidth; @@ -413,10 +320,7 @@ public: bool lab; }; -class CropParamsEdited -{ - -public: +struct CropParamsEdited { bool enabled; bool x; bool y; @@ -428,58 +332,47 @@ public: bool guide; }; -class CoarseTransformParamsEdited -{ - -public: +struct CoarseTransformParamsEdited { bool rotate; bool hflip; bool vflip; }; -class CommonTransformParamsEdited -{ - -public: +struct CommonTransformParamsEdited { bool autofill; }; -class RotateParamsEdited -{ - -public: +struct RotateParamsEdited { bool degree; }; -class DistortionParamsEdited -{ - -public: +struct DistortionParamsEdited { bool amount; }; -class LensProfParamsEdited -{ -public: - bool lcpFile, useDist, useVign, useCA; - bool useLensfun, lfAutoMatch, lfCameraMake, lfCameraModel, lfLens; +struct LensProfParamsEdited { + bool lcpFile; + bool useDist; + bool useVign; + bool useCA; + + bool useLensfun; + bool lfAutoMatch; + bool lfCameraMake; + bool lfCameraModel; + bool lfLens; + bool lcMode; bool isUnchanged() const; }; -class PerspectiveParamsEdited -{ - -public: +struct PerspectiveParamsEdited { bool horizontal; bool vertical; }; -class GradientParamsEdited -{ - -public: +struct GradientParamsEdited { bool enabled; bool degree; bool feather; @@ -488,20 +381,14 @@ public: bool centerY; }; -class PCVignetteParamsEdited -{ - -public: +struct PCVignetteParamsEdited { bool enabled; bool strength; bool feather; bool roundness; }; -class VignettingParamsEdited -{ - -public: +struct VignettingParamsEdited { bool amount; bool radius; bool strength; @@ -509,20 +396,15 @@ public: bool centerY; }; -class ChannelMixerParamsEdited -{ - -public: +struct ChannelMixerParamsEdited { bool enabled; bool red[3]; bool green[3]; bool blue[3]; }; -class BlackWhiteParamsEdited -{ -public: +struct BlackWhiteParamsEdited { bool enabledcc; bool enabled; bool method; @@ -546,28 +428,14 @@ public: bool afterCurveMode; bool autoc; bool algo; - }; -class CACorrParamsEdited -{ - -public: +struct CACorrParamsEdited { bool red; bool blue; }; -/* -class HRecParamsEdited { - public: - bool enabled; - bool method; -}; -*/ -class ResizeParamsEdited -{ - -public: +struct ResizeParamsEdited { bool scale; bool appliesTo; bool method; @@ -578,10 +446,7 @@ public: bool allowUpscaling; }; -class ColorManagementParamsEdited -{ - -public: +struct ColorManagementParamsEdited { bool inputProfile; bool toneCurve; bool applyLookTable; @@ -598,10 +463,8 @@ public: bool outputIntent; bool outputBPC; }; -class WaveletParamsEdited -{ -public: +struct WaveletParamsEdited { bool enabled; bool strength; bool balance; @@ -685,13 +548,9 @@ public: bool expfinal; bool exptoning; bool expnoise; - }; -class DirPyrEqualizerParamsEdited -{ - -public: +struct DirPyrEqualizerParamsEdited { bool enabled; bool gamutlab; bool mult[6]; @@ -699,52 +558,35 @@ public: bool threshold; bool skinprotect; bool hueskin; - // bool algo; }; -class HSVEqualizerParamsEdited -{ - -public: +struct HSVEqualizerParamsEdited { bool enabled; bool hcurve; bool scurve; bool vcurve; }; -class FilmSimulationParamsEdited -{ -public: +struct FilmSimulationParamsEdited { bool enabled; bool clutFilename; bool strength; }; -class SoftLightParamsEdited -{ -public: +struct SoftLightParamsEdited { bool enabled; bool strength; }; -class DehazeParamsEdited -{ -public: +struct DehazeParamsEdited { bool enabled; bool strength; bool showDepthMap; bool depth; }; - -class RAWParamsEdited -{ - -public: - class BayerSensor - { - - public: +struct RAWParamsEdited { + struct BayerSensor { bool method; bool border; bool imageNum; @@ -774,7 +616,6 @@ public: bool pixelShiftNonGreenCross; bool pixelShiftDemosaicMethod; - //bool allEnhance; bool greenEq; bool linenoise; bool linenoiseDirection; @@ -783,10 +624,7 @@ public: bool isUnchanged() const; }; - class XTransSensor - { - - public: + struct XTransSensor { bool method; bool dualDemosaicAutoContrast; bool dualDemosaicContrast; @@ -823,66 +661,56 @@ public: }; -class MetaDataParamsEdited -{ -public: +struct MetaDataParamsEdited { bool mode; }; - -class ParamsEdited -{ - -public: - GeneralParamsEdited general; - ToneCurveParamsEdited toneCurve; - LCurveParamsEdited labCurve; - LocalContrastParamsEdited localContrast; - RGBCurvesParamsEdited rgbCurves; - ColorToningEdited colorToning; - RetinexParamsEdited retinex; - SharpeningParamsEdited sharpening; - SharpeningParamsEdited prsharpening; - SharpenEdgeParamsEdited sharpenEdge; - SharpenMicroParamsEdited sharpenMicro; - VibranceParamsEdited vibrance; - ColorAppearanceParamsEdited colorappearance; - //ColorBoostParamsEdited colorBoost; - WBParamsEdited wb; - //ColorShiftParamsEdited colorShift; - //LumaDenoiseParamsEdited lumaDenoise; - //ColorDenoiseParamsEdited colorDenoise; - DefringeParamsEdited defringe; - DirPyrDenoiseParamsEdited dirpyrDenoise; - EPDParamsEdited epd; +struct ParamsEdited { + GeneralParamsEdited general; + ToneCurveParamsEdited toneCurve; + LCurveParamsEdited labCurve; + LocalContrastParamsEdited localContrast; + RGBCurvesParamsEdited rgbCurves; + ColorToningEdited colorToning; + RetinexParamsEdited retinex; + SharpeningParamsEdited sharpening; + SharpeningParamsEdited prsharpening; + SharpenEdgeParamsEdited sharpenEdge; + SharpenMicroParamsEdited sharpenMicro; + VibranceParamsEdited vibrance; + ColorAppearanceParamsEdited colorappearance; + WBParamsEdited wb; + DefringeParamsEdited defringe; + DirPyrDenoiseParamsEdited dirpyrDenoise; + EPDParamsEdited epd; FattalToneMappingParamsEdited fattal; - ImpulseDenoiseParamsEdited impulseDenoise; - SHParamsEdited sh; - CropParamsEdited crop; - CoarseTransformParamsEdited coarse; - CommonTransformParamsEdited commonTrans; - RotateParamsEdited rotate; - DistortionParamsEdited distortion; - LensProfParamsEdited lensProf; - PerspectiveParamsEdited perspective; - GradientParamsEdited gradient; - PCVignetteParamsEdited pcvignette; - CACorrParamsEdited cacorrection; - VignettingParamsEdited vignetting; - ChannelMixerParamsEdited chmixer; - BlackWhiteParamsEdited blackwhite; - ResizeParamsEdited resize; - ColorManagementParamsEdited icm; - RAWParamsEdited raw; - DirPyrEqualizerParamsEdited dirpyrequalizer; - WaveletParamsEdited wavelet; - HSVEqualizerParamsEdited hsvequalizer; - FilmSimulationParamsEdited filmSimulation; - SoftLightParamsEdited softlight; - DehazeParamsEdited dehaze; - MetaDataParamsEdited metadata; - bool exif; - bool iptc; + ImpulseDenoiseParamsEdited impulseDenoise; + SHParamsEdited sh; + CropParamsEdited crop; + CoarseTransformParamsEdited coarse; + CommonTransformParamsEdited commonTrans; + RotateParamsEdited rotate; + DistortionParamsEdited distortion; + LensProfParamsEdited lensProf; + PerspectiveParamsEdited perspective; + GradientParamsEdited gradient; + PCVignetteParamsEdited pcvignette; + CACorrParamsEdited cacorrection; + VignettingParamsEdited vignetting; + ChannelMixerParamsEdited chmixer; + BlackWhiteParamsEdited blackwhite; + ResizeParamsEdited resize; + ColorManagementParamsEdited icm; + RAWParamsEdited raw; + DirPyrEqualizerParamsEdited dirpyrequalizer; + WaveletParamsEdited wavelet; + HSVEqualizerParamsEdited hsvequalizer; + FilmSimulationParamsEdited filmSimulation; + SoftLightParamsEdited softlight; + DehazeParamsEdited dehaze; + MetaDataParamsEdited metadata; + bool exif; + bool iptc; explicit ParamsEdited(bool value = false); @@ -890,4 +718,3 @@ public: void initFrom(const std::vector& src); void combine(rtengine::procparams::ProcParams& toEdit, const rtengine::procparams::ProcParams& mods, bool forceSet); }; -#endif diff --git a/rtgui/partialpastedlg.h b/rtgui/partialpastedlg.h index 9f92707bb..0325fa063 100644 --- a/rtgui/partialpastedlg.h +++ b/rtgui/partialpastedlg.h @@ -22,7 +22,7 @@ #include #include "../rtengine/rtengine.h" -class ParamsEdited; +struct ParamsEdited; class PartialPasteDlg : public Gtk::Dialog { diff --git a/rtgui/pcvignette.cc b/rtgui/pcvignette.cc index 3d668fed9..303ae5cfb 100644 --- a/rtgui/pcvignette.cc +++ b/rtgui/pcvignette.cc @@ -3,6 +3,8 @@ */ #include "pcvignette.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/perspective.cc b/rtgui/perspective.cc index db5e0c50b..db2f32248 100644 --- a/rtgui/perspective.cc +++ b/rtgui/perspective.cc @@ -17,8 +17,11 @@ * along with RawTherapee. If not, see . */ #include "perspective.h" + #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/preprocess.cc b/rtgui/preprocess.cc index 9ad0953af..0d8933a98 100644 --- a/rtgui/preprocess.cc +++ b/rtgui/preprocess.cc @@ -16,10 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "preprocess.h" -#include "guiutils.h" #include +#include "preprocess.h" + +#include "guiutils.h" + +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/previewhandler.h b/rtgui/previewhandler.h index 4c4a68afc..fcd0a0c5f 100644 --- a/rtgui/previewhandler.h +++ b/rtgui/previewhandler.h @@ -55,7 +55,7 @@ private: protected: rtengine::IImage8* image; - std::unique_ptr cropParams; + const std::unique_ptr cropParams; double previewScale; PreviewHandlerIdleHelper* pih; std::list listeners; diff --git a/rtgui/profilechangelistener.h b/rtgui/profilechangelistener.h index 8e8dc99b5..e333933ea 100644 --- a/rtgui/profilechangelistener.h +++ b/rtgui/profilechangelistener.h @@ -23,6 +23,18 @@ #include "../rtengine/rtengine.h" +namespace rtengine +{ + +namespace procparams +{ + +class PartialProfile; + +} + +} + class ProfileChangeListener { public: diff --git a/rtgui/profilepanel.cc b/rtgui/profilepanel.cc index a3a0f72b7..af39695fa 100644 --- a/rtgui/profilepanel.cc +++ b/rtgui/profilepanel.cc @@ -17,12 +17,15 @@ * along with RawTherapee. If not, see . */ #include "profilepanel.h" -#include "options.h" + #include "clipboard.h" #include "multilangmgr.h" +#include "options.h" #include "profilestorecombobox.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/profilestorecombobox.cc b/rtgui/profilestorecombobox.cc index e7d64f28b..96bbc32fa 100644 --- a/rtgui/profilestorecombobox.cc +++ b/rtgui/profilestorecombobox.cc @@ -24,9 +24,6 @@ #include "toolpanel.h" #include "guiutils.h" -using namespace rtengine; -using namespace rtengine::procparams; - ProfileStoreLabel::ProfileStoreLabel (const ProfileStoreEntry *entry) : Gtk::Label (entry->label), entry (entry) { set_alignment (0, 0.5); diff --git a/rtgui/rawcacorrection.cc b/rtgui/rawcacorrection.cc index 2daeb102f..57b8ff4ac 100644 --- a/rtgui/rawcacorrection.cc +++ b/rtgui/rawcacorrection.cc @@ -17,10 +17,13 @@ * along with RawTherapee. If not, see . */ #include "rawcacorrection.h" + #include "eventmapper.h" #include "guiutils.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/rawexposure.cc b/rtgui/rawexposure.cc index 0c5191476..6f08e64c7 100644 --- a/rtgui/rawexposure.cc +++ b/rtgui/rawexposure.cc @@ -16,10 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "rawexposure.h" -#include "guiutils.h" #include +#include "rawexposure.h" + +#include "guiutils.h" + +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/resize.cc b/rtgui/resize.cc index fc0f51191..4635dca50 100644 --- a/rtgui/resize.cc +++ b/rtgui/resize.cc @@ -17,8 +17,11 @@ * along with RawTherapee. If not, see . */ #include "resize.h" -#include "guiutils.h" + #include "eventmapper.h" +#include "guiutils.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/rgbcurves.cc b/rtgui/rgbcurves.cc index 1ffb8cc46..75af43508 100644 --- a/rtgui/rgbcurves.cc +++ b/rtgui/rgbcurves.cc @@ -18,6 +18,8 @@ */ #include "rgbcurves.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/rotate.cc b/rtgui/rotate.cc index 9f70010df..9f5d665d5 100644 --- a/rtgui/rotate.cc +++ b/rtgui/rotate.cc @@ -16,11 +16,15 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "rotate.h" #include + +#include "rotate.h" + #include "guiutils.h" #include "rtimage.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/sensorbayer.cc b/rtgui/sensorbayer.cc index 8bd36fe32..44afdd2e8 100644 --- a/rtgui/sensorbayer.cc +++ b/rtgui/sensorbayer.cc @@ -20,9 +20,6 @@ #include "guiutils.h" #include "rtimage.h" -using namespace rtengine; -using namespace rtengine::procparams; - SensorBayer::SensorBayer () : FoldableToolPanel(this, "sensorbayer", M("TP_RAW_SENSOR_BAYER_LABEL")) { diff --git a/rtgui/sensorxtrans.cc b/rtgui/sensorxtrans.cc index 3f93e050a..c0a704ebf 100644 --- a/rtgui/sensorxtrans.cc +++ b/rtgui/sensorxtrans.cc @@ -20,9 +20,6 @@ #include "guiutils.h" #include "rtimage.h" -using namespace rtengine; -using namespace rtengine::procparams; - SensorXTrans::SensorXTrans () : FoldableToolPanel(this, "sensorxtrans", M("TP_RAW_SENSOR_XTRANS_LABEL")) { diff --git a/rtgui/shadowshighlights.cc b/rtgui/shadowshighlights.cc index f4ed90138..6fdf6f2f3 100644 --- a/rtgui/shadowshighlights.cc +++ b/rtgui/shadowshighlights.cc @@ -17,8 +17,11 @@ * along with RawTherapee. If not, see . */ #include "shadowshighlights.h" + #include "eventmapper.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/sharpenedge.cc b/rtgui/sharpenedge.cc index 03675a3bf..b6528e4c9 100644 --- a/rtgui/sharpenedge.cc +++ b/rtgui/sharpenedge.cc @@ -16,10 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "sharpenedge.h" -#include "guiutils.h" -#include #include +#include + +#include "sharpenedge.h" + +#include "guiutils.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/sharpenmicro.cc b/rtgui/sharpenmicro.cc index 971f9247a..0b4142677 100644 --- a/rtgui/sharpenmicro.cc +++ b/rtgui/sharpenmicro.cc @@ -18,9 +18,13 @@ */ #include #include + #include "sharpenmicro.h" -#include "guiutils.h" + #include "eventmapper.h" +#include "guiutils.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/softlight.cc b/rtgui/softlight.cc index 072c45e98..0054f8f6d 100644 --- a/rtgui/softlight.cc +++ b/rtgui/softlight.cc @@ -17,10 +17,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "softlight.h" -#include "eventmapper.h" -#include #include +#include + +#include "softlight.h" + +#include "eventmapper.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/thresholdselector.cc b/rtgui/thresholdselector.cc index 891095e6f..2d94d43de 100644 --- a/rtgui/thresholdselector.cc +++ b/rtgui/thresholdselector.cc @@ -21,9 +21,12 @@ #include #include "thresholdselector.h" + #include "multilangmgr.h" #include "mycurve.h" +#include "../rtengine/procparams.h" + ThresholdSelector::ThresholdSelector(double minValueBottom, double maxValueBottom, double defBottom, Glib::ustring labelBottom, unsigned int precisionBottom, double minValueTop, double maxValueTop, double defTop, Glib::ustring labelTop, unsigned int precisionTop, ThresholdCurveProvider* curveProvider) diff --git a/rtgui/thumbnail.h b/rtgui/thumbnail.h index 99f5279ed..0bcdd470a 100644 --- a/rtgui/thumbnail.h +++ b/rtgui/thumbnail.h @@ -32,7 +32,7 @@ #include "threadutils.h" class CacheManager; -class ParamsEdited; +struct ParamsEdited; class Thumbnail { @@ -51,7 +51,7 @@ class Thumbnail float imgRatio; // hack to avoid rounding error // double scale; // portion of the sizes of the processed thumbnail image and the full scale image - std::unique_ptr pparams; + const std::unique_ptr pparams; bool pparamsValid; bool imageLoading; diff --git a/rtgui/tonecurve.cc b/rtgui/tonecurve.cc index 9b654e387..1bd8b2cbd 100644 --- a/rtgui/tonecurve.cc +++ b/rtgui/tonecurve.cc @@ -16,13 +16,18 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "tonecurve.h" -#include "adjuster.h" -#include #include -#include "ppversion.h" + +#include + +#include "tonecurve.h" + +#include "adjuster.h" #include "edit.h" #include "eventmapper.h" +#include "ppversion.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/toolpanel.cc b/rtgui/toolpanel.cc index c9c4f823c..1fe9808cd 100644 --- a/rtgui/toolpanel.cc +++ b/rtgui/toolpanel.cc @@ -20,6 +20,8 @@ #include "toolpanelcoord.h" #include "guiutils.h" +#include "../rtengine/procparams.h" + using namespace rtengine::procparams; diff --git a/rtgui/toolpanel.h b/rtgui/toolpanel.h index fbe87f5f0..521d52949 100644 --- a/rtgui/toolpanel.h +++ b/rtgui/toolpanel.h @@ -22,7 +22,6 @@ #include #include #include "../rtengine/rtengine.h" -#include "../rtengine/procparams.h" #include "guiutils.h" #include "multilangmgr.h" #include "paramsedited.h" diff --git a/rtgui/vignetting.cc b/rtgui/vignetting.cc index 34559ef21..799a4cff7 100644 --- a/rtgui/vignetting.cc +++ b/rtgui/vignetting.cc @@ -18,6 +18,8 @@ */ #include "vignetting.h" +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/xtransprocess.cc b/rtgui/xtransprocess.cc index 9639ce29d..866df06e4 100644 --- a/rtgui/xtransprocess.cc +++ b/rtgui/xtransprocess.cc @@ -16,10 +16,13 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "eventmapper.h" #include "xtransprocess.h" -#include "options.h" + +#include "eventmapper.h" #include "guiutils.h" +#include "options.h" + +#include "../rtengine/procparams.h" using namespace rtengine; using namespace rtengine::procparams; diff --git a/rtgui/xtransrawexposure.cc b/rtgui/xtransrawexposure.cc index 19fcb0c46..b58a6e72a 100644 --- a/rtgui/xtransrawexposure.cc +++ b/rtgui/xtransrawexposure.cc @@ -16,10 +16,14 @@ * You should have received a copy of the GNU General Public License * along with RawTherapee. If not, see . */ -#include "xtransrawexposure.h" -#include "guiutils.h" #include +#include "xtransrawexposure.h" + +#include "guiutils.h" + +#include "../rtengine/procparams.h" + using namespace rtengine; using namespace rtengine::procparams;