Turn almost all Listeners into abstract interfaces
This commit is contained in:
parent
2a9d3896bb
commit
2125f42116
@ -89,8 +89,7 @@ using LUTd = LUT<double>;
|
|||||||
using LUTuc = LUT<uint8_t>;
|
using LUTuc = LUT<uint8_t>;
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
class LUT :
|
class LUT
|
||||||
public rtengine::NonCopyable
|
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
// list of variables ordered to improve cache speed
|
// list of variables ordered to improve cache speed
|
||||||
@ -198,6 +197,8 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
explicit LUT(const LUT&) = delete;
|
||||||
|
|
||||||
void setClip(int flags)
|
void setClip(int flags)
|
||||||
{
|
{
|
||||||
clip = flags;
|
clip = flags;
|
||||||
@ -225,7 +226,7 @@ public:
|
|||||||
return size > 0 ? upperBound : 0;
|
return size > 0 ? upperBound : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LUT<T> & operator=(LUT<T> &rhs)
|
LUT<T> & operator=(const LUT<T>& rhs)
|
||||||
{
|
{
|
||||||
if (this != &rhs) {
|
if (this != &rhs) {
|
||||||
if (rhs.size > this->size) {
|
if (rhs.size > this->size) {
|
||||||
@ -257,7 +258,7 @@ public:
|
|||||||
|
|
||||||
// handy to sum up per thread histograms. #pragma omp simd speeds up the loop by about factor 3 for LUTu (uint32_t).
|
// handy to sum up per thread histograms. #pragma omp simd speeds up the loop by about factor 3 for LUTu (uint32_t).
|
||||||
template<typename U = T, typename = typename std::enable_if<std::is_same<U, std::uint32_t>::value>::type>
|
template<typename U = T, typename = typename std::enable_if<std::is_same<U, std::uint32_t>::value>::type>
|
||||||
LUT<T> & operator+=(LUT<T> &rhs)
|
LUT<T> & operator+=(const LUT<T>& rhs)
|
||||||
{
|
{
|
||||||
if (rhs.size == this->size) {
|
if (rhs.size == this->size) {
|
||||||
#ifdef _OPENMP
|
#ifdef _OPENMP
|
||||||
|
@ -139,10 +139,10 @@ void Crop::update(int todo)
|
|||||||
|
|
||||||
// give possibility to the listener to modify crop window (as the full image dimensions are already known at this point)
|
// give possibility to the listener to modify crop window (as the full image dimensions are already known at this point)
|
||||||
int wx, wy, ww, wh, ws;
|
int wx, wy, ww, wh, ws;
|
||||||
bool overrideWindow = false;
|
const bool overrideWindow = cropImageListener;
|
||||||
|
|
||||||
if (cropImageListener) {
|
if (overrideWindow) {
|
||||||
overrideWindow = cropImageListener->getWindow(wx, wy, ww, wh, ws);
|
cropImageListener->getWindow(wx, wy, ww, wh, ws);
|
||||||
}
|
}
|
||||||
|
|
||||||
// re-allocate sub-images and arrays if their dimensions changed
|
// re-allocate sub-images and arrays if their dimensions changed
|
||||||
|
@ -21,11 +21,11 @@
|
|||||||
//#include <giomm.h>
|
//#include <giomm.h>
|
||||||
#include <helpers.h>
|
#include <helpers.h>
|
||||||
|
|
||||||
class PListener : public rtengine::ProgressListener
|
class PListener :
|
||||||
|
public rtengine::ProgressListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void setProgressStr (Glib::ustring str)
|
void setProgressStr(const Glib::ustring& str)
|
||||||
{
|
{
|
||||||
std::cout << str << std::endl;
|
std::cout << str << std::endl;
|
||||||
}
|
}
|
||||||
@ -33,11 +33,16 @@ public:
|
|||||||
{
|
{
|
||||||
std::cout << p << std::endl;
|
std::cout << p << std::endl;
|
||||||
}
|
}
|
||||||
|
void setProgressState(bool inProcessing)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void error(const Glib::ustring& descr)
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (int argc, char* argv[])
|
int main (int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
if (argc < 4) {
|
if (argc < 4) {
|
||||||
std::cout << "Usage: rtcmd <infile> <paramfile> <outfile>" << std::endl;
|
std::cout << "Usage: rtcmd <infile> <paramfile> <outfile>" << std::endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -39,14 +39,14 @@ class ProfileStoreListener
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~ProfileStoreListener() {}
|
virtual ~ProfileStoreListener() = default;
|
||||||
|
|
||||||
/** @brief Called whenever the current value has to be stored before update. */
|
/** @brief Called whenever the current value has to be stored before update. */
|
||||||
virtual void storeCurrentValue() {}
|
virtual void storeCurrentValue() = 0;
|
||||||
/** @brief Called whenever the file list has been updated and the content of the listener has to be updated. */
|
/** @brief Called whenever the file list has been updated and the content of the listener has to be updated. */
|
||||||
virtual void updateProfileList() = 0;
|
virtual void updateProfileList() = 0;
|
||||||
/** @brief Called whenever the profile list has changed and the old value have to be restored (if possible). */
|
/** @brief Called whenever the profile list has changed and the old value have to be restored (if possible). */
|
||||||
virtual void restoreValue() {}
|
virtual void restoreValue() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// @brief ProfileStoreEntry type (folder or file)
|
/// @brief ProfileStoreEntry type (folder or file)
|
||||||
|
@ -154,21 +154,20 @@ public:
|
|||||||
/** This listener interface is used to indicate the progress of time consuming operations */
|
/** This listener interface is used to indicate the progress of time consuming operations */
|
||||||
class ProgressListener
|
class ProgressListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~ProgressListener() {}
|
virtual ~ProgressListener() = default;
|
||||||
/** This member function is called when the percentage of the progress has been changed.
|
/** This member function is called when the percentage of the progress has been changed.
|
||||||
* @param p is a number between 0 and 1 */
|
* @param p is a number between 0 and 1 */
|
||||||
virtual void setProgress (double p) {}
|
virtual void setProgress(double p) = 0;
|
||||||
/** This member function is called when a textual information corresponding to the progress has been changed.
|
/** This member function is called when a textual information corresponding to the progress has been changed.
|
||||||
* @param str is the textual information corresponding to the progress */
|
* @param str is the textual information corresponding to the progress */
|
||||||
virtual void setProgressStr (Glib::ustring str) {}
|
virtual void setProgressStr(const Glib::ustring& str) = 0;
|
||||||
/** This member function is called when the state of the processing has been changed.
|
/** This member function is called when the state of the processing has been changed.
|
||||||
* @param inProcessing =true if the processing has been started, =false if it has been stopped */
|
* @param inProcessing =true if the processing has been started, =false if it has been stopped */
|
||||||
virtual void setProgressState (bool inProcessing) {}
|
virtual void setProgressState(bool inProcessing) = 0;
|
||||||
/** This member function is called when an error occurs during the operation.
|
/** This member function is called when an error occurs during the operation.
|
||||||
* @param descr is the error message */
|
* @param descr is the error message */
|
||||||
virtual void error (Glib::ustring descr) {}
|
virtual void error(const Glib::ustring& descr) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ImageSource;
|
class ImageSource;
|
||||||
@ -219,20 +218,20 @@ public:
|
|||||||
class PreviewImageListener
|
class PreviewImageListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~PreviewImageListener() {}
|
virtual ~PreviewImageListener() = default;
|
||||||
/** With this member function the staged processor notifies the listener that it allocated a new
|
/** With this member function the staged processor notifies the listener that it allocated a new
|
||||||
* image to store the end result of the processing. It can be used in a shared manner.
|
* image to store the end result of the processing. It can be used in a shared manner.
|
||||||
* @param img is a pointer to the image
|
* @param img is a pointer to the image
|
||||||
* @param scale describes the current scaling applied compared to the 100% size (preview scale)
|
* @param scale describes the current scaling applied compared to the 100% size (preview scale)
|
||||||
* @param cp holds the coordinates of the current crop rectangle */
|
* @param cp holds the coordinates of the current crop rectangle */
|
||||||
virtual void setImage (IImage8* img, double scale, procparams::CropParams cp) {}
|
virtual void setImage(IImage8* img, double scale, const procparams::CropParams& cp) = 0;
|
||||||
/** With this member function the staged processor notifies the listener that the image passed as parameter
|
/** With this member function the staged processor notifies the listener that the image passed as parameter
|
||||||
* will be deleted, and no longer used to store the preview image.
|
* will be deleted, and no longer used to store the preview image.
|
||||||
* @param img the pointer to the image to be destroyed. The listener has to free the image! */
|
* @param img the pointer to the image to be destroyed. The listener has to free the image! */
|
||||||
virtual void delImage (IImage8* img) {}
|
virtual void delImage(IImage8* img) = 0;
|
||||||
/** With this member function the staged processor notifies the listener that the preview image has been updated.
|
/** With this member function the staged processor notifies the listener that the preview image has been updated.
|
||||||
* @param cp holds the coordinates of the current crop rectangle */
|
* @param cp holds the coordinates of the current crop rectangle */
|
||||||
virtual void imageReady (procparams::CropParams cp) {}
|
virtual void imageReady(const procparams::CropParams& cp) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** When the detailed crop image is ready for display during staged processing (thus the changes have been updated),
|
/** When the detailed crop image is ready for display during staged processing (thus the changes have been updated),
|
||||||
@ -242,52 +241,70 @@ public:
|
|||||||
class DetailedCropListener
|
class DetailedCropListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~DetailedCropListener() {}
|
virtual ~DetailedCropListener() = default;
|
||||||
/** With this member function the staged processor notifies the listener that the detailed crop image has been updated.
|
/** With this member function the staged processor notifies the listener that the detailed crop image has been updated.
|
||||||
* @param img is a pointer to the detailed crop image */
|
* @param img is a pointer to the detailed crop image */
|
||||||
virtual void setDetailedCrop (IImage8* img, IImage8* imgtrue, procparams::ColorManagementParams cmp,
|
virtual void setDetailedCrop(
|
||||||
procparams::CropParams cp, int cx, int cy, int cw, int ch, int skip) {}
|
IImage8* img,
|
||||||
virtual bool getWindow (int& cx, int& cy, int& cw, int& ch, int& skip)
|
IImage8* imgtrue,
|
||||||
{
|
const procparams::ColorManagementParams& cmp,
|
||||||
return false;
|
const procparams::CropParams& cp,
|
||||||
}
|
int cx,
|
||||||
// virtual void setPosition (int x, int y, bool update=true) {}
|
int cy,
|
||||||
|
int cw,
|
||||||
|
int ch,
|
||||||
|
int skip
|
||||||
|
) = 0;
|
||||||
|
virtual void getWindow(int& cx, int& cy, int& cw, int& ch, int& skip) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This listener is used when the full size of the final image has been changed (e.g. rotated by 90 deg.) */
|
/** This listener is used when the full size of the final image has been changed (e.g. rotated by 90 deg.) */
|
||||||
class SizeListener
|
class SizeListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~SizeListener() {}
|
virtual ~SizeListener() = default;
|
||||||
/** This member function is called when the size of the final image has been changed
|
/** This member function is called when the size of the final image has been changed
|
||||||
* @param w is the width of the final image (without cropping)
|
* @param w is the width of the final image (without cropping)
|
||||||
* @param h is the height of the final image (without cropping)
|
* @param h is the height of the final image (without cropping)
|
||||||
* @param ow is the width of the final image (without resizing and cropping)
|
* @param ow is the width of the final image (without resizing and cropping)
|
||||||
* @param oh is the height of the final image (without resizing and cropping) */
|
* @param oh is the height of the final image (without resizing and cropping) */
|
||||||
virtual void sizeChanged (int w, int h, int ow, int oh) {}
|
virtual void sizeChanged(int w, int h, int ow, int oh) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This listener is used when the histogram of the final image has changed. */
|
/** This listener is used when the histogram of the final image has changed. */
|
||||||
class HistogramListener
|
class HistogramListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~HistogramListener() {}
|
virtual ~HistogramListener() = default;
|
||||||
/** This member function is called when the histogram of the final image has changed.
|
/** This member function is called when the histogram of the final image has changed.
|
||||||
* @param histRed is the array of size 256 containing the histogram of the red channel
|
* @param histRed is the array of size 256 containing the histogram of the red channel
|
||||||
* @param histGreen is the array of size 256 containing the histogram of the green channel
|
* @param histGreen is the array of size 256 containing the histogram of the green channel
|
||||||
* @param histBlue is the array of size 256 containing the histogram of the blue channel
|
* @param histBlue is the array of size 256 containing the histogram of the blue channel
|
||||||
* @param histLuma is the array of size 256 containing the histogram of the luminance channel
|
* @param histLuma is the array of size 256 containing the histogram of the luminance channel
|
||||||
* other for curves backgrounds, histRAW is RAW without colors */
|
* other for curves backgrounds, histRAW is RAW without colors */
|
||||||
virtual void histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve,LUTu & histLLCurve, */LUTu & histLCAM, LUTu & histCCAM,
|
virtual void histogramChanged(
|
||||||
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw, LUTu & histChroma, LUTu & histLRETI) {}
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histToneCurve,
|
||||||
|
const LUTu& histLCurve,
|
||||||
|
const LUTu& histCCurve,
|
||||||
|
const LUTu& histLCAM,
|
||||||
|
const LUTu& histCCAM,
|
||||||
|
const LUTu& histRedRaw,
|
||||||
|
const LUTu& histGreenRaw,
|
||||||
|
const LUTu& histBlueRaw,
|
||||||
|
const LUTu& histChroma,
|
||||||
|
const LUTu& histLRETI
|
||||||
|
) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This listener is used when the auto exposure has been recomputed (e.g. when the clipping ratio changed). */
|
/** This listener is used when the auto exposure has been recomputed (e.g. when the clipping ratio changed). */
|
||||||
class AutoExpListener
|
class AutoExpListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~AutoExpListener() {}
|
virtual ~AutoExpListener() = default;
|
||||||
/** This member function is called when the auto exposure has been recomputed.
|
/** This member function is called when the auto exposure has been recomputed.
|
||||||
* @param brightness is the new brightness value (in logarithmic scale)
|
* @param brightness is the new brightness value (in logarithmic scale)
|
||||||
* @param bright is the new ...
|
* @param bright is the new ...
|
||||||
@ -296,84 +313,79 @@ public:
|
|||||||
* @param hlcompr is the new highlight recovery amount
|
* @param hlcompr is the new highlight recovery amount
|
||||||
* @param hlcomprthresh is the new threshold for hlcompr
|
* @param hlcomprthresh is the new threshold for hlcompr
|
||||||
* @param hlrecons set to true if HighLight Reconstruction is enabled */
|
* @param hlrecons set to true if HighLight Reconstruction is enabled */
|
||||||
virtual void autoExpChanged (double brightness, int bright, int contrast, int black, int hlcompr, int hlcomprthresh, bool hlrecons) {}
|
virtual void autoExpChanged(double brightness, int bright, int contrast, int black, int hlcompr, int hlcomprthresh, bool hlrecons) = 0;
|
||||||
|
|
||||||
virtual void autoMatchedToneCurveChanged(procparams::ToneCurveParams::TcMode curveMode, const std::vector<double> &curve) {}
|
virtual void autoMatchedToneCurveChanged(procparams::ToneCurveParams::TcMode curveMode, const std::vector<double>& curve) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AutoCamListener
|
class AutoCamListener
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
virtual ~AutoCamListener() {}
|
virtual ~AutoCamListener() = default;
|
||||||
virtual void autoCamChanged (double ccam, double ccamout) {}
|
virtual void autoCamChanged(double ccam, double ccamout) = 0;
|
||||||
virtual void adapCamChanged (double cadap) {}
|
virtual void adapCamChanged(double cadap) = 0;
|
||||||
virtual void ybCamChanged (int yb) {}
|
virtual void ybCamChanged(int yb) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AutoChromaListener
|
class AutoChromaListener
|
||||||
{
|
{
|
||||||
public :
|
public :
|
||||||
virtual ~AutoChromaListener() {}
|
virtual ~AutoChromaListener() = default;
|
||||||
virtual void chromaChanged (double autchroma, double autred, double autblue) {}
|
virtual void chromaChanged(double autchroma, double autred, double autblue) = 0;
|
||||||
virtual void noiseChanged (double nresid, double highresid) {}
|
virtual void noiseChanged(double nresid, double highresid) = 0;
|
||||||
virtual void noiseTilePrev (int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP) {}
|
virtual void noiseTilePrev(int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RetinexListener
|
class RetinexListener
|
||||||
{
|
{
|
||||||
public :
|
public:
|
||||||
virtual ~RetinexListener() {}
|
virtual ~RetinexListener() = default;
|
||||||
virtual void minmaxChanged (double cdma, double cdmin, double mini, double maxi, double Tmean, double Tsigma, double Tmin, double Tmax) {}
|
virtual void minmaxChanged(double cdma, double cdmin, double mini, double maxi, double Tmean, double Tsigma, double Tmin, double Tmax) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AutoColorTonListener
|
class AutoColorTonListener
|
||||||
{
|
{
|
||||||
public :
|
public:
|
||||||
virtual ~AutoColorTonListener() {}
|
virtual ~AutoColorTonListener() = default;
|
||||||
virtual void autoColorTonChanged (int bwct, int satthres, int satprot) {}
|
virtual void autoColorTonChanged(int bwct, int satthres, int satprot) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AutoBWListener
|
class AutoBWListener
|
||||||
{
|
{
|
||||||
public :
|
public:
|
||||||
virtual ~AutoBWListener() {}
|
virtual ~AutoBWListener() = default;
|
||||||
virtual void BWChanged (double redbw, double greenbw, double bluebw) {}
|
virtual void BWChanged(double redbw, double greenbw, double bluebw) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AutoWBListener
|
class AutoWBListener
|
||||||
{
|
{
|
||||||
public :
|
public:
|
||||||
virtual ~AutoWBListener() = default;
|
virtual ~AutoWBListener() = default;
|
||||||
virtual void WBChanged (double temp, double green) = 0;
|
virtual void WBChanged(double temp, double green) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FrameCountListener
|
class FrameCountListener
|
||||||
{
|
{
|
||||||
public :
|
public:
|
||||||
virtual ~FrameCountListener() = default;
|
virtual ~FrameCountListener() = default;
|
||||||
virtual void FrameCountChanged (int n, int frameNum) = 0;
|
virtual void FrameCountChanged(int n, int frameNum) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ImageTypeListener
|
class ImageTypeListener
|
||||||
{
|
{
|
||||||
public :
|
public:
|
||||||
virtual ~ImageTypeListener() = default;
|
virtual ~ImageTypeListener() = default;
|
||||||
virtual void imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans, bool is_Mono = false) = 0;
|
virtual void imageTypeChanged(bool isRaw, bool isBayer, bool isXtrans, bool is_Mono = false) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WaveletListener
|
class WaveletListener
|
||||||
{
|
{
|
||||||
public :
|
public:
|
||||||
virtual ~WaveletListener() {}
|
virtual ~WaveletListener() = default;
|
||||||
virtual void wavChanged (double nlevel) {}
|
virtual void wavChanged(double nlevel) = 0;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/** This class represents a detailed part of the image (looking through a kind of window).
|
/** This class represents a detailed part of the image (looking through a kind of window).
|
||||||
* It can be created and destroyed with the appropriate members of StagedImageProcessor.
|
* It can be created and destroyed with the appropriate members of StagedImageProcessor.
|
||||||
* Several crops can be assigned to the same image. */
|
* Several crops can be assigned to the same image. */
|
||||||
@ -554,8 +566,7 @@ public:
|
|||||||
* there is no jobs left.
|
* there is no jobs left.
|
||||||
* @param img is the result of the last ProcessingJob
|
* @param img is the result of the last ProcessingJob
|
||||||
* @return the next ProcessingJob to process */
|
* @return the next ProcessingJob to process */
|
||||||
virtual ProcessingJob* imageReady (IImagefloat* img) = 0;
|
virtual ProcessingJob* imageReady(IImagefloat* img) = 0;
|
||||||
virtual void error (Glib::ustring message) = 0;
|
|
||||||
};
|
};
|
||||||
/** This function performs all the image processing steps corresponding to the given ProcessingJob. It runs in the background, thus it returns immediately,
|
/** This function performs all the image processing steps corresponding to the given ProcessingJob. It runs in the background, thus it returns immediately,
|
||||||
* When it finishes, it calls the BatchProcessingListener with the resulting image and asks for the next job. It the listener gives a new job, it goes on
|
* When it finishes, it calls the BatchProcessingListener with the resulting image and asks for the next job. It the listener gives a new job, it goes on
|
||||||
|
@ -21,23 +21,28 @@
|
|||||||
//#include <giomm.h>
|
//#include <giomm.h>
|
||||||
#include <helpers.h>
|
#include <helpers.h>
|
||||||
|
|
||||||
class PListener : public rtengine::ProgressListener
|
class PListener :
|
||||||
|
public rtengine::ProgressListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void setProgressStr (Glib::ustring str)
|
void setProgressStr(const Glib::ustring& str)
|
||||||
{
|
{
|
||||||
std::cout << str << std::endl;
|
std::cout << str << std::endl;
|
||||||
}
|
}
|
||||||
void setProgress (double p)
|
void setProgress(double p)
|
||||||
{
|
{
|
||||||
std::cout << p << std::endl;
|
std::cout << p << std::endl;
|
||||||
}
|
}
|
||||||
|
void setProgressState(bool inProcessing)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
void error(const Glib::ustring& descr)
|
||||||
|
{
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
int main (int argc, char* argv[])
|
int main (int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
if (argc < 4) {
|
if (argc < 4) {
|
||||||
std::cout << "Usage: rtcmd <infile> <paramfile> <outfile>" << std::endl;
|
std::cout << "Usage: rtcmd <infile> <paramfile> <outfile>" << std::endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -24,13 +24,13 @@
|
|||||||
#include "guiutils.h"
|
#include "guiutils.h"
|
||||||
|
|
||||||
class Adjuster;
|
class Adjuster;
|
||||||
|
|
||||||
class AdjusterListener
|
class AdjusterListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~AdjusterListener() {};
|
virtual ~AdjusterListener() = default;
|
||||||
virtual void adjusterChanged (Adjuster* a, double newval) {}
|
virtual void adjusterChanged (Adjuster* a, double newval) = 0;
|
||||||
virtual void adjusterAutoToggled (Adjuster* a, bool newval) {}
|
virtual void adjusterAutoToggled (Adjuster* a, bool newval) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef double(*double2double_fun)(double val);
|
typedef double(*double2double_fun)(double val);
|
||||||
|
@ -39,6 +39,27 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace rtengine;
|
using namespace rtengine;
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
|
||||||
|
struct NLParams {
|
||||||
|
BatchQueueListener* listener;
|
||||||
|
int qsize;
|
||||||
|
bool queueEmptied;
|
||||||
|
bool queueError;
|
||||||
|
Glib::ustring queueErrorMessage;
|
||||||
|
};
|
||||||
|
|
||||||
|
int bqnotifylistenerUI (void* data)
|
||||||
|
{
|
||||||
|
NLParams* params = static_cast<NLParams*>(data);
|
||||||
|
params->listener->queueSizeChanged (params->qsize, params->queueEmptied, params->queueError, params->queueErrorMessage);
|
||||||
|
delete params;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(nullptr), fileCatalog(aFileCatalog), sequence(0), listener(nullptr)
|
BatchQueue::BatchQueue (FileCatalog* aFileCatalog) : processing(nullptr), fileCatalog(aFileCatalog), sequence(0), listener(nullptr)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -580,9 +601,54 @@ void BatchQueue::startProcessing ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rtengine::ProcessingJob* BatchQueue::imageReady (rtengine::IImagefloat* img)
|
void BatchQueue::setProgress(double p)
|
||||||
{
|
{
|
||||||
|
if (processing) {
|
||||||
|
processing->progress = p;
|
||||||
|
}
|
||||||
|
|
||||||
|
// No need to acquire the GUI, setProgressUI will do it
|
||||||
|
const auto func = [](gpointer data) -> gboolean {
|
||||||
|
static_cast<BatchQueue*>(data)->redraw();
|
||||||
|
return FALSE;
|
||||||
|
};
|
||||||
|
|
||||||
|
idle_register.add(func, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchQueue::setProgressStr(const Glib::ustring& str)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchQueue::setProgressState(bool inProcessing)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void BatchQueue::error(const Glib::ustring& descr)
|
||||||
|
{
|
||||||
|
if (processing && processing->processing) {
|
||||||
|
// restore failed thumb
|
||||||
|
BatchQueueButtonSet* bqbs = new BatchQueueButtonSet (processing);
|
||||||
|
bqbs->setButtonListener (this);
|
||||||
|
processing->addButtonSet (bqbs);
|
||||||
|
processing->processing = false;
|
||||||
|
processing->job = rtengine::ProcessingJob::create(processing->filename, processing->thumbnail->getType() == FT_Raw, processing->params);
|
||||||
|
processing = nullptr;
|
||||||
|
redraw ();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (listener) {
|
||||||
|
NLParams* params = new NLParams;
|
||||||
|
params->listener = listener;
|
||||||
|
params->queueEmptied = false;
|
||||||
|
params->queueError = true;
|
||||||
|
params->queueErrorMessage = descr;
|
||||||
|
idle_register.add(bqnotifylistenerUI, params);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rtengine::ProcessingJob* BatchQueue::imageReady(rtengine::IImagefloat* img)
|
||||||
|
{
|
||||||
// save image img
|
// save image img
|
||||||
Glib::ustring fname;
|
Glib::ustring fname;
|
||||||
SaveFormat saveFormat;
|
SaveFormat saveFormat;
|
||||||
@ -892,22 +958,6 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void BatchQueue::setProgress (double p)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (processing) {
|
|
||||||
processing->progress = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
// No need to acquire the GUI, setProgressUI will do it
|
|
||||||
const auto func = [](gpointer data) -> gboolean {
|
|
||||||
static_cast<BatchQueue*>(data)->redraw();
|
|
||||||
return FALSE;
|
|
||||||
};
|
|
||||||
|
|
||||||
idle_register.add(func, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void BatchQueue::buttonPressed (LWButton* button, int actionCode, void* actionData)
|
void BatchQueue::buttonPressed (LWButton* button, int actionCode, void* actionData)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -923,22 +973,6 @@ void BatchQueue::buttonPressed (LWButton* button, int actionCode, void* actionDa
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct NLParams {
|
|
||||||
BatchQueueListener* listener;
|
|
||||||
int qsize;
|
|
||||||
bool queueEmptied;
|
|
||||||
bool queueError;
|
|
||||||
Glib::ustring queueErrorMessage;
|
|
||||||
};
|
|
||||||
|
|
||||||
int bqnotifylistenerUI (void* data)
|
|
||||||
{
|
|
||||||
NLParams* params = static_cast<NLParams*>(data);
|
|
||||||
params->listener->queueSizeChanged (params->qsize, params->queueEmptied, params->queueError, params->queueErrorMessage);
|
|
||||||
delete params;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void BatchQueue::notifyListener (bool queueEmptied)
|
void BatchQueue::notifyListener (bool queueEmptied)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -960,27 +994,3 @@ void BatchQueue::redrawNeeded (LWButton* button)
|
|||||||
GThreadLock lock;
|
GThreadLock lock;
|
||||||
queue_draw ();
|
queue_draw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BatchQueue::error (Glib::ustring msg)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (processing && processing->processing) {
|
|
||||||
// restore failed thumb
|
|
||||||
BatchQueueButtonSet* bqbs = new BatchQueueButtonSet (processing);
|
|
||||||
bqbs->setButtonListener (this);
|
|
||||||
processing->addButtonSet (bqbs);
|
|
||||||
processing->processing = false;
|
|
||||||
processing->job = rtengine::ProcessingJob::create(processing->filename, processing->thumbnail->getType() == FT_Raw, processing->params);
|
|
||||||
processing = nullptr;
|
|
||||||
redraw ();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (listener) {
|
|
||||||
NLParams* params = new NLParams;
|
|
||||||
params->listener = listener;
|
|
||||||
params->queueEmptied = false;
|
|
||||||
params->queueError = true;
|
|
||||||
params->queueErrorMessage = msg;
|
|
||||||
idle_register.add(bqnotifylistenerUI, params);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -30,9 +30,9 @@ class BatchQueueListener
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~BatchQueueListener () {}
|
virtual ~BatchQueueListener() = default;
|
||||||
virtual void queueSizeChanged (int qsize, bool queueEmptied, bool queueError, Glib::ustring queueErrorMessage) = 0;
|
virtual void queueSizeChanged(int qsize, bool queueEmptied, bool queueError, const Glib::ustring& queueErrorMessage) = 0;
|
||||||
virtual bool canStartNext () = 0;
|
virtual bool canStartNext() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FileCatalog;
|
class FileCatalog;
|
||||||
@ -62,9 +62,12 @@ public:
|
|||||||
return (!fd.empty());
|
return (!fd.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
rtengine::ProcessingJob* imageReady (rtengine::IImagefloat* img);
|
void setProgress(double p);
|
||||||
void error (Glib::ustring msg);
|
void setProgressStr(const Glib::ustring& str);
|
||||||
void setProgress (double p);
|
void setProgressState(bool inProcessing);
|
||||||
|
void error(const Glib::ustring& descr);
|
||||||
|
rtengine::ProcessingJob* imageReady(rtengine::IImagefloat* img);
|
||||||
|
|
||||||
void rightClicked (ThumbBrowserEntryBase* entry);
|
void rightClicked (ThumbBrowserEntryBase* entry);
|
||||||
void doubleClicked (ThumbBrowserEntryBase* entry);
|
void doubleClicked (ThumbBrowserEntryBase* entry);
|
||||||
bool keyPressed (GdkEventKey* event);
|
bool keyPressed (GdkEventKey* event);
|
||||||
|
@ -245,9 +245,9 @@ void BatchQueuePanel::updateTab (int qsize, int forceOrientation)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BatchQueuePanel::queueSizeChanged (int qsize, bool queueEmptied, bool queueError, Glib::ustring queueErrorMessage)
|
void BatchQueuePanel::queueSizeChanged(int qsize, bool queueEmptied, bool queueError, const Glib::ustring& queueErrorMessage)
|
||||||
{
|
{
|
||||||
updateTab ( qsize);
|
updateTab (qsize);
|
||||||
|
|
||||||
if (qsize == 0 || (qsize == 1 && !fdir->get_sensitive())) {
|
if (qsize == 0 || (qsize == 1 && !fdir->get_sensitive())) {
|
||||||
qStartStop->set_sensitive(false);
|
qStartStop->set_sensitive(false);
|
||||||
@ -311,10 +311,9 @@ void BatchQueuePanel::stopBatchProc ()
|
|||||||
updateTab (batchQueue->getEntries().size());
|
updateTab (batchQueue->getEntries().size());
|
||||||
}
|
}
|
||||||
|
|
||||||
void BatchQueuePanel::addBatchQueueJobs ( std::vector<BatchQueueEntry*> &entries, bool head)
|
void BatchQueuePanel::addBatchQueueJobs(const std::vector<BatchQueueEntry*>& entries, bool head)
|
||||||
{
|
{
|
||||||
|
batchQueue->addEntries(entries, head);
|
||||||
batchQueue->addEntries (entries, head);
|
|
||||||
|
|
||||||
if (!qStartStop->get_active() && qAutoStart->get_active()) {
|
if (!qStartStop->get_active() && qAutoStart->get_active()) {
|
||||||
startBatchProc ();
|
startBatchProc ();
|
||||||
|
@ -59,11 +59,11 @@ public:
|
|||||||
|
|
||||||
void init (RTWindow* parent);
|
void init (RTWindow* parent);
|
||||||
|
|
||||||
void addBatchQueueJobs (std::vector<BatchQueueEntry*> &entries , bool head = false);
|
void addBatchQueueJobs(const std::vector<BatchQueueEntry*>& entries , bool head = false);
|
||||||
|
|
||||||
// batchqueuelistener interface
|
// batchqueuelistener interface
|
||||||
void queueSizeChanged (int qsize, bool queueEmptied, bool queueError, Glib::ustring queueErrorMessage);
|
void queueSizeChanged(int qsize, bool queueEmptied, bool queueError, const Glib::ustring& queueErrorMessage);
|
||||||
bool canStartNext ();
|
bool canStartNext();
|
||||||
|
|
||||||
void startBatchProc ();
|
void startBatchProc ();
|
||||||
void stopBatchProc ();
|
void stopBatchProc ();
|
||||||
|
@ -134,6 +134,10 @@ void BayerPreProcess::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BayerPreProcess::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void BayerPreProcess::setBatchMode(bool batchMode)
|
void BayerPreProcess::setBatchMode(bool batchMode)
|
||||||
{
|
{
|
||||||
ToolPanel::setBatchMode (batchMode);
|
ToolPanel::setBatchMode (batchMode);
|
||||||
|
@ -46,7 +46,9 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged(Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
|
|
||||||
void hotDeadPixelChanged();
|
void hotDeadPixelChanged();
|
||||||
void setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd);
|
void setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
|
@ -539,6 +539,10 @@ void BayerProcess::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BayerProcess::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void BayerProcess::methodChanged ()
|
void BayerProcess::methodChanged ()
|
||||||
{
|
{
|
||||||
const int currentSelection = method->get_active_row_number();
|
const int currentSelection = method->get_active_row_number();
|
||||||
|
@ -80,6 +80,7 @@ public:
|
|||||||
void methodChanged();
|
void methodChanged();
|
||||||
void imageNumberChanged();
|
void imageNumberChanged();
|
||||||
void adjusterChanged(Adjuster* a, double newval);
|
void adjusterChanged(Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||||
void checkBoxToggled(CheckBox* c, CheckValue newval);
|
void checkBoxToggled(CheckBox* c, CheckValue newval);
|
||||||
void pixelShiftMotionMethodChanged();
|
void pixelShiftMotionMethodChanged();
|
||||||
void pixelShiftDemosaicMethodChanged();
|
void pixelShiftDemosaicMethodChanged();
|
||||||
|
@ -121,7 +121,7 @@ void BayerRAWExposure::write( rtengine::procparams::ProcParams* pp, ParamsEdited
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BayerRAWExposure::adjusterChanged (Adjuster* a, double newval)
|
void BayerRAWExposure::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
if (listener) {
|
if (listener) {
|
||||||
Glib::ustring value = a->getTextValue();
|
Glib::ustring value = a->getTextValue();
|
||||||
@ -148,6 +148,10 @@ void BayerRAWExposure::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BayerRAWExposure::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void BayerRAWExposure::checkBoxToggled (CheckBox* c, CheckValue newval)
|
void BayerRAWExposure::checkBoxToggled (CheckBox* c, CheckValue newval)
|
||||||
{
|
{
|
||||||
if (c == PextwoGreen) {
|
if (c == PextwoGreen) {
|
||||||
|
@ -43,6 +43,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||||
void checkBoxToggled (CheckBox* c, CheckValue newval);
|
void checkBoxToggled (CheckBox* c, CheckValue newval);
|
||||||
void setAdjusterBehavior (bool pexblackadd);
|
void setAdjusterBehavior (bool pexblackadd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
|
@ -1094,9 +1094,8 @@ void BlackWhite::autoch_toggled ()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlackWhite::adjusterChanged (Adjuster* a, double newval)
|
void BlackWhite::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Checking "listener" to avoid "autoch" getting toggled off because it has to change the sliders when toggling on
|
// Checking "listener" to avoid "autoch" getting toggled off because it has to change the sliders when toggling on
|
||||||
if (listener && (a == mixerRed || a == mixerGreen || a == mixerBlue || a == mixerOrange || a == mixerYellow || a == mixerMagenta || a == mixerPurple || a == mixerCyan) ) {
|
if (listener && (a == mixerRed || a == mixerGreen || a == mixerBlue || a == mixerOrange || a == mixerYellow || a == mixerMagenta || a == mixerPurple || a == mixerCyan) ) {
|
||||||
if (multiImage && autoch->get_inconsistent()) {
|
if (multiImage && autoch->get_inconsistent()) {
|
||||||
@ -1147,6 +1146,10 @@ void BlackWhite::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BlackWhite::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void BlackWhite::updateRGBLabel ()
|
void BlackWhite::updateRGBLabel ()
|
||||||
{
|
{
|
||||||
if (!batchMode) {
|
if (!batchMode) {
|
||||||
|
@ -53,6 +53,7 @@ public:
|
|||||||
|
|
||||||
void updateRGBLabel ();
|
void updateRGBLabel ();
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||||
void setAdjusterBehavior (bool bwadd, bool bwgadd);
|
void setAdjusterBehavior (bool bwadd, bool bwgadd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
void enabledcc_toggled ();
|
void enabledcc_toggled ();
|
||||||
|
@ -28,8 +28,8 @@ class BQEntryUpdateListener
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~BQEntryUpdateListener () {}
|
virtual ~BQEntryUpdateListener() = default;
|
||||||
virtual void updateImage (guint8* img, int w, int h, int origw, int origh, guint8* newOPreview) {}
|
virtual void updateImage(guint8* img, int w, int h, int origw, int origh, guint8* newOPreview) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BatchQueueEntryUpdater
|
class BatchQueueEntryUpdater
|
||||||
|
@ -97,6 +97,10 @@ void CACorrection::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CACorrection::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void CACorrection::setAdjusterBehavior (bool badd)
|
void CACorrection::setAdjusterBehavior (bool badd)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void setAdjusterBehavior (bool badd);
|
void setAdjusterBehavior (bool badd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
};
|
};
|
||||||
|
@ -33,10 +33,9 @@ enum class CheckValue {
|
|||||||
|
|
||||||
class CheckBoxListener
|
class CheckBoxListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~CheckBoxListener() {};
|
virtual ~CheckBoxListener() = default;
|
||||||
virtual void checkBoxToggled (CheckBox* c, CheckValue newval) {}
|
virtual void checkBoxToggled(CheckBox* c, CheckValue newval) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ void ChMixer::setDefaults (const ProcParams* defParams, const ParamsEdited* pedi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChMixer::adjusterChanged (Adjuster* a, double newval)
|
void ChMixer::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
@ -179,6 +179,9 @@ void ChMixer::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChMixer::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void ChMixer::enabledChanged()
|
void ChMixer::enabledChanged()
|
||||||
{
|
{
|
||||||
|
@ -42,6 +42,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void setAdjusterBehavior (bool rgbadd);
|
void setAdjusterBehavior (bool rgbadd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
void enabledChanged();
|
void enabledChanged();
|
||||||
|
@ -1544,9 +1544,8 @@ void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller:
|
|||||||
caller->ccBlue = double (B);
|
caller->ccBlue = double (B);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorAppearance::adjusterChanged (Adjuster* a, double newval)
|
void ColorAppearance::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (listener && (multiImage || getEnabled()) ) {
|
if (listener && (multiImage || getEnabled()) ) {
|
||||||
if (a == degree) {
|
if (a == degree) {
|
||||||
listener->panelChanged (EvCATDegree, a->getTextValue());
|
listener->panelChanged (EvCATDegree, a->getTextValue());
|
||||||
@ -1594,9 +1593,8 @@ void ColorAppearance::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorAppearance::adjusterAutoToggled (Adjuster* a, bool newval)
|
void ColorAppearance::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
if (degree->getAutoInconsistent()) {
|
if (degree->getAutoInconsistent()) {
|
||||||
degree->setAutoInconsistent (false);
|
degree->setAutoInconsistent (false);
|
||||||
@ -1844,11 +1842,21 @@ void ColorAppearance::setBatchMode (bool batchMode)
|
|||||||
curveEditorG3->setBatchMode (batchMode);
|
curveEditorG3->setBatchMode (batchMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorAppearance::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI)
|
void ColorAppearance::updateCurveBackgroundHistogram(
|
||||||
|
const LUTu& histToneCurve,
|
||||||
|
const LUTu& histLCurve,
|
||||||
|
const LUTu& histCCurve,
|
||||||
|
const LUTu& histLCAM,
|
||||||
|
const LUTu& histCCAM,
|
||||||
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histLRETI
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
shape->updateBackgroundHistogram(histLCAM);
|
||||||
shape->updateBackgroundHistogram (histLCAM);
|
shape3->updateBackgroundHistogram(histCCAM);
|
||||||
shape3->updateBackgroundHistogram (histCCAM);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,7 +80,18 @@ public:
|
|||||||
|
|
||||||
void setAdjusterBehavior (bool degreeadd, bool adapscenadd, bool adaplumadd, bool badpixsladd, bool jlightadd, bool chromaadd, bool contrastadd, bool rstprotectionadd, bool qbrightadd, bool qcontrastadd, bool schromaadd, bool mchromaadd, bool colorhadd);
|
void setAdjusterBehavior (bool degreeadd, bool adapscenadd, bool adaplumadd, bool badpixsladd, bool jlightadd, bool chromaadd, bool contrastadd, bool rstprotectionadd, bool qbrightadd, bool qcontrastadd, bool schromaadd, bool mchromaadd, bool colorhadd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
void updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI);
|
void updateCurveBackgroundHistogram(
|
||||||
|
const LUTu& histToneCurve,
|
||||||
|
const LUTu& histLCurve,
|
||||||
|
const LUTu& histCCurve,
|
||||||
|
const LUTu& histLCAM,
|
||||||
|
const LUTu& histCCAM,
|
||||||
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histLRETI
|
||||||
|
);
|
||||||
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller);
|
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller);
|
||||||
void updateToolState (std::vector<int> &tpOpen);
|
void updateToolState (std::vector<int> &tpOpen);
|
||||||
void writeOptions (std::vector<int> &tpOpen);
|
void writeOptions (std::vector<int> &tpOpen);
|
||||||
|
@ -688,13 +688,6 @@ void ColorToning::setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorToning::adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop)
|
|
||||||
{
|
|
||||||
if (listener && getEnabled())
|
|
||||||
listener->panelChanged (a == hlColSat ? EvColorToningHighights : EvColorToningShadows,
|
|
||||||
Glib::ustring::compose(Glib::ustring(M("TP_COLORTONING_HUE") + ": %1" + "\n" + M("TP_COLORTONING_STRENGTH") + ": %2"), int(newTop), int(newBottom)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ColorToning::autoColorTonChanged(int bwct, int satthres, int satprot)
|
void ColorToning::autoColorTonChanged(int bwct, int satthres, int satprot)
|
||||||
{
|
{
|
||||||
nextbw = bwct;
|
nextbw = bwct;
|
||||||
@ -731,40 +724,32 @@ bool ColorToning::CTComp_ ()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColorToning::adjusterChanged (Adjuster* a, double newval)
|
void ColorToning::adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop)
|
||||||
{
|
{
|
||||||
|
if (listener && getEnabled()) {
|
||||||
if (!listener || !getEnabled()) {
|
listener->panelChanged(
|
||||||
return;
|
a == hlColSat
|
||||||
|
? EvColorToningHighights
|
||||||
|
: EvColorToningShadows,
|
||||||
|
Glib::ustring::compose(Glib::ustring(M("TP_COLORTONING_HUE") + ": %1" + "\n" + M("TP_COLORTONING_STRENGTH") + ": %2"), int(newTop), int(newBottom))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (a == redlow) {
|
void ColorToning::adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight)
|
||||||
listener->panelChanged (EvColorToningredlow, redlow->getTextValue());
|
{
|
||||||
} else if (a == greenlow) {
|
}
|
||||||
listener->panelChanged (EvColorToninggreenlow, greenlow->getTextValue());
|
|
||||||
} else if (a == bluelow) {
|
void ColorToning::adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop)
|
||||||
listener->panelChanged (EvColorToningbluelow, bluelow->getTextValue());
|
{
|
||||||
} else if (a == redmed) {
|
}
|
||||||
listener->panelChanged (EvColorToningredmed, redmed->getTextValue());
|
|
||||||
} else if (a == greenmed) {
|
void ColorToning::adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight)
|
||||||
listener->panelChanged (EvColorToninggreenmed, greenmed->getTextValue());
|
{
|
||||||
} else if (a == bluemed) {
|
}
|
||||||
listener->panelChanged (EvColorToningbluemed, bluemed->getTextValue());
|
|
||||||
} else if (a == redhigh) {
|
void ColorToning::adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR)
|
||||||
listener->panelChanged (EvColorToningredhigh, redhigh->getTextValue());
|
{
|
||||||
} else if (a == greenhigh) {
|
|
||||||
listener->panelChanged (EvColorToninggreenhigh, greenhigh->getTextValue());
|
|
||||||
} else if (a == bluehigh) {
|
|
||||||
listener->panelChanged (EvColorToningbluehigh, bluehigh->getTextValue());
|
|
||||||
} else if (a == balance) {
|
|
||||||
listener->panelChanged (EvColorToningbalance, balance->getTextValue());
|
|
||||||
} else if (a == satProtectionThreshold) {
|
|
||||||
listener->panelChanged (EvColorToningSatThreshold, a->getTextValue());
|
|
||||||
} else if (a == saturatedOpacity) {
|
|
||||||
listener->panelChanged (EvColorToningSatProtection, a->getTextValue());
|
|
||||||
} else if (a == strength) {
|
|
||||||
listener->panelChanged (EvColorToningStrength, a->getTextValue());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Two Color changed
|
//Two Color changed
|
||||||
@ -1141,6 +1126,45 @@ void ColorToning::trimValues (rtengine::procparams::ProcParams* pp)
|
|||||||
bluehigh->trimValue(pp->colorToning.bluehigh);
|
bluehigh->trimValue(pp->colorToning.bluehigh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ColorToning::adjusterChanged(Adjuster* a, double newval)
|
||||||
|
{
|
||||||
|
if (!listener || !getEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (a == redlow) {
|
||||||
|
listener->panelChanged (EvColorToningredlow, redlow->getTextValue());
|
||||||
|
} else if (a == greenlow) {
|
||||||
|
listener->panelChanged (EvColorToninggreenlow, greenlow->getTextValue());
|
||||||
|
} else if (a == bluelow) {
|
||||||
|
listener->panelChanged (EvColorToningbluelow, bluelow->getTextValue());
|
||||||
|
} else if (a == redmed) {
|
||||||
|
listener->panelChanged (EvColorToningredmed, redmed->getTextValue());
|
||||||
|
} else if (a == greenmed) {
|
||||||
|
listener->panelChanged (EvColorToninggreenmed, greenmed->getTextValue());
|
||||||
|
} else if (a == bluemed) {
|
||||||
|
listener->panelChanged (EvColorToningbluemed, bluemed->getTextValue());
|
||||||
|
} else if (a == redhigh) {
|
||||||
|
listener->panelChanged (EvColorToningredhigh, redhigh->getTextValue());
|
||||||
|
} else if (a == greenhigh) {
|
||||||
|
listener->panelChanged (EvColorToninggreenhigh, greenhigh->getTextValue());
|
||||||
|
} else if (a == bluehigh) {
|
||||||
|
listener->panelChanged (EvColorToningbluehigh, bluehigh->getTextValue());
|
||||||
|
} else if (a == balance) {
|
||||||
|
listener->panelChanged (EvColorToningbalance, balance->getTextValue());
|
||||||
|
} else if (a == satProtectionThreshold) {
|
||||||
|
listener->panelChanged (EvColorToningSatThreshold, a->getTextValue());
|
||||||
|
} else if (a == saturatedOpacity) {
|
||||||
|
listener->panelChanged (EvColorToningSatProtection, a->getTextValue());
|
||||||
|
} else if (a == strength) {
|
||||||
|
listener->panelChanged (EvColorToningStrength, a->getTextValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ColorToning::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void ColorToning::setBatchMode (bool batchMode)
|
void ColorToning::setBatchMode (bool batchMode)
|
||||||
{
|
{
|
||||||
ToolPanel::setBatchMode (batchMode);
|
ToolPanel::setBatchMode (batchMode);
|
||||||
|
@ -32,13 +32,19 @@ public:
|
|||||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
void adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop);
|
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||||
void setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool satOpacityAdd, bool strprotectAdd, bool balanceAdd);
|
void setAdjusterBehavior (bool splitAdd, bool satThresholdAdd, bool satOpacityAdd, bool strprotectAdd, bool balanceAdd);
|
||||||
void neutral_pressed ();
|
void neutral_pressed ();
|
||||||
//void neutralCurves_pressed ();
|
//void neutralCurves_pressed ();
|
||||||
void autoColorTonChanged (int bwct, int satthres, int satprot);
|
void autoColorTonChanged (int bwct, int satthres, int satprot);
|
||||||
bool CTComp_ ();
|
bool CTComp_ ();
|
||||||
|
|
||||||
|
void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop);
|
||||||
|
void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight);
|
||||||
|
void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop);
|
||||||
|
void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight);
|
||||||
|
void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR);
|
||||||
|
|
||||||
void enabledChanged ();
|
void enabledChanged ();
|
||||||
void curveChanged (CurveEditor* ce);
|
void curveChanged (CurveEditor* ce);
|
||||||
void autosatChanged ();
|
void autosatChanged ();
|
||||||
|
@ -728,7 +728,7 @@ void Crop::setDimensions (int mw, int mh)
|
|||||||
refreshSize ();
|
refreshSize ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Crop::sizeChanged (int x, int y, int ow, int oh)
|
void Crop::sizeChanged(int x, int y, int ow, int oh)
|
||||||
{
|
{
|
||||||
struct Params {
|
struct Params {
|
||||||
Crop* crop;
|
Crop* crop;
|
||||||
@ -1261,9 +1261,8 @@ void Crop::cropManipReady ()
|
|||||||
idle_register.add(notifyListenerUI, this);
|
idle_register.add(notifyListenerUI, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
double Crop::getRatio ()
|
double Crop::getRatio () const
|
||||||
{
|
{
|
||||||
|
|
||||||
double r = -1.0;
|
double r = -1.0;
|
||||||
|
|
||||||
if (!fixr->get_active()) {
|
if (!fixr->get_active()) {
|
||||||
|
@ -76,7 +76,7 @@ public:
|
|||||||
void cropResized (int &x, int &y, int& x2, int& y2);
|
void cropResized (int &x, int &y, int& x2, int& y2);
|
||||||
void cropManipReady ();
|
void cropManipReady ();
|
||||||
bool inImageArea (int x, int y);
|
bool inImageArea (int x, int y);
|
||||||
double getRatio ();
|
double getRatio () const;
|
||||||
|
|
||||||
void setCropPanelListener (CropPanelListener* cl)
|
void setCropPanelListener (CropPanelListener* cl)
|
||||||
{
|
{
|
||||||
|
@ -23,21 +23,21 @@ class CropGUIListener
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~CropGUIListener() {}
|
virtual ~CropGUIListener() = default;
|
||||||
virtual void cropMoved (int &x, int &y, int &w, int &h) = 0;
|
virtual void cropMoved(int &x, int &y, int &w, int &h) = 0;
|
||||||
virtual void cropWidth1Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0;
|
virtual void cropWidth1Resized(int &x, int &y, int &w, int &h, float custom_ratio = 0.f) = 0;
|
||||||
virtual void cropWidth2Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0;
|
virtual void cropWidth2Resized(int &x, int &y, int &w, int &h, float custom_ratio = 0.f) = 0;
|
||||||
virtual void cropHeight1Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0;
|
virtual void cropHeight1Resized(int &x, int &y, int &w, int &h, float custom_ratio = 0.f) = 0;
|
||||||
virtual void cropHeight2Resized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0;
|
virtual void cropHeight2Resized(int &x, int &y, int &w, int &h, float custom_ratio = 0.f) = 0;
|
||||||
virtual void cropTopLeftResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0;
|
virtual void cropTopLeftResized(int &x, int &y, int &w, int &h, float custom_ratio = 0.f) = 0;
|
||||||
virtual void cropTopRightResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0;
|
virtual void cropTopRightResized(int &x, int &y, int &w, int &h, float custom_ratio = 0.f) = 0;
|
||||||
virtual void cropBottomLeftResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0;
|
virtual void cropBottomLeftResized(int &x, int &y, int &w, int &h, float custom_ratio = 0.f) = 0;
|
||||||
virtual void cropBottomRightResized (int &x, int &y, int &w, int &h, float custom_ratio=0.f) = 0;
|
virtual void cropBottomRightResized(int &x, int &y, int &w, int &h, float custom_ratio = 0.f) = 0;
|
||||||
virtual void cropInit (int &x, int &y, int &w, int &h) = 0;
|
virtual void cropInit(int &x, int &y, int &w, int &h) = 0;
|
||||||
virtual void cropResized (int &x, int &y, int& x2, int& y2) = 0;
|
virtual void cropResized(int &x, int &y, int& x2, int& y2) = 0;
|
||||||
virtual void cropManipReady () = 0;
|
virtual void cropManipReady() = 0;
|
||||||
virtual bool inImageArea (int x, int y) = 0;
|
virtual bool inImageArea(int x, int y) = 0;
|
||||||
virtual double getRatio () = 0;
|
virtual double getRatio() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,15 +106,9 @@ void CropHandler::newImage (StagedImageProcessor* ipc_, bool isDetailWindow)
|
|||||||
initial = true;
|
initial = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CropHandler::sizeChanged (int x, int y, int ow, int oh) // the ipc notifies it to keep track size changes like rotation
|
void CropHandler::sizeChanged(int x, int y, int ow, int oh) // the ipc notifies it to keep track size changes like rotation
|
||||||
{
|
{
|
||||||
|
|
||||||
compDim ();
|
compDim ();
|
||||||
|
|
||||||
// this should be put into an idle source!!!
|
|
||||||
/* if (listener)
|
|
||||||
listener->cropWindowChanged ();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CropHandler::isFullDisplay ()
|
bool CropHandler::isFullDisplay ()
|
||||||
@ -300,10 +294,18 @@ void CropHandler::getPosition (int& x, int& y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procparams::ColorManagementParams cmp,
|
void CropHandler::setDetailedCrop(
|
||||||
rtengine::procparams::CropParams cp, int ax, int ay, int aw, int ah, int askip)
|
IImage8* im,
|
||||||
|
IImage8* imtrue,
|
||||||
|
const rtengine::procparams::ColorManagementParams& cmp,
|
||||||
|
const rtengine::procparams::CropParams& cp,
|
||||||
|
int ax,
|
||||||
|
int ay,
|
||||||
|
int aw,
|
||||||
|
int ah,
|
||||||
|
int askip
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -406,9 +408,8 @@ void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procp
|
|||||||
cimg.unlock ();
|
cimg.unlock ();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CropHandler::getWindow (int& cwx, int& cwy, int& cww, int& cwh, int& cskip)
|
void CropHandler::getWindow(int& cwx, int& cwy, int& cww, int& cwh, int& cskip)
|
||||||
{
|
{
|
||||||
|
|
||||||
cwx = cropX;
|
cwx = cropX;
|
||||||
cwy = cropY;
|
cwy = cropY;
|
||||||
cww = cropW;
|
cww = cropW;
|
||||||
@ -424,8 +425,6 @@ bool CropHandler::getWindow (int& cwx, int& cwy, int& cww, int& cwh, int& cskip)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cskip = zoom >= 1000 ? 1 : zoom/10;
|
cskip = zoom >= 1000 ? 1 : zoom/10;
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CropHandler::update ()
|
void CropHandler::update ()
|
||||||
|
@ -86,9 +86,19 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DetailedCropListener interface
|
// DetailedCropListener interface
|
||||||
void setDetailedCrop (rtengine::IImage8* im, rtengine::IImage8* imworking, rtengine::procparams::ColorManagementParams cmp,
|
void setDetailedCrop(
|
||||||
rtengine::procparams::CropParams cp, int cx, int cy, int cw, int ch, int skip);
|
rtengine::IImage8* im,
|
||||||
bool getWindow (int& cwx, int& cwy, int& cww, int& cwh, int& cskip);
|
rtengine::IImage8* imworking,
|
||||||
|
const rtengine::procparams::ColorManagementParams& cmp,
|
||||||
|
const rtengine::procparams::CropParams& cp,
|
||||||
|
int cx,
|
||||||
|
int cy,
|
||||||
|
int cw,
|
||||||
|
int ch,
|
||||||
|
int skip
|
||||||
|
);
|
||||||
|
void getWindow(int& cwx, int& cwy, int& cww, int& cwh, int& cskip);
|
||||||
|
|
||||||
// SizeListener interface
|
// SizeListener interface
|
||||||
void sizeChanged (int w, int h, int ow, int oh);
|
void sizeChanged (int w, int h, int ow, int oh);
|
||||||
|
|
||||||
|
@ -32,15 +32,15 @@
|
|||||||
#include "edit.h"
|
#include "edit.h"
|
||||||
|
|
||||||
class CropWindow;
|
class CropWindow;
|
||||||
|
|
||||||
class CropWindowListener
|
class CropWindowListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~CropWindowListener() {}
|
virtual ~CropWindowListener() = default;
|
||||||
virtual void cropPositionChanged (CropWindow*) {}
|
virtual void cropPositionChanged(CropWindow*) = 0;
|
||||||
virtual void cropWindowSizeChanged (CropWindow*) {}
|
virtual void cropWindowSizeChanged(CropWindow*) = 0;
|
||||||
virtual void cropZoomChanged (CropWindow*) {}
|
virtual void cropZoomChanged(CropWindow*) = 0;
|
||||||
virtual void initialImageArrived () {}
|
virtual void initialImageArrived() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ImageArea;
|
class ImageArea;
|
||||||
|
@ -254,7 +254,7 @@ void CurveEditor::setUnChanged (bool uc)
|
|||||||
/*
|
/*
|
||||||
* Update the backgrounds histograms
|
* Update the backgrounds histograms
|
||||||
*/
|
*/
|
||||||
void CurveEditor::updateBackgroundHistogram (LUTu & hist)
|
void CurveEditor::updateBackgroundHistogram(const LUTu& hist)
|
||||||
{
|
{
|
||||||
// Copy the histogram in the curve editor cache
|
// Copy the histogram in the curve editor cache
|
||||||
if (hist) {
|
if (hist) {
|
||||||
@ -265,7 +265,7 @@ void CurveEditor::updateBackgroundHistogram (LUTu & hist)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Then call the curve editor group to eventually update the histogram
|
// Then call the curve editor group to eventually update the histogram
|
||||||
subGroup->updateBackgroundHistogram (this);
|
subGroup->updateBackgroundHistogram(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Open up the curve if it has modifications and it's not already opened
|
// Open up the curve if it has modifications and it's not already opened
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
void curveTypeToggled();
|
void curveTypeToggled();
|
||||||
bool isUnChanged ();
|
bool isUnChanged ();
|
||||||
void setUnChanged (bool uc);
|
void setUnChanged (bool uc);
|
||||||
void updateBackgroundHistogram (LUTu & hist);
|
void updateBackgroundHistogram(const LUTu& hist);
|
||||||
|
|
||||||
void setLeftBarColorProvider(ColorProvider* cp, int callerId);
|
void setLeftBarColorProvider(ColorProvider* cp, int callerId);
|
||||||
void setBottomBarColorProvider(ColorProvider* cp, int callerId);
|
void setBottomBarColorProvider(ColorProvider* cp, int callerId);
|
||||||
|
@ -149,9 +149,8 @@ void Defringe::curveChanged ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Defringe::adjusterChanged (Adjuster* a, double newval)
|
void Defringe::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
|
|
||||||
if (a == radius) {
|
if (a == radius) {
|
||||||
@ -162,6 +161,10 @@ void Defringe::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Defringe::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void Defringe::enabledChanged ()
|
void Defringe::enabledChanged ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -50,6 +50,7 @@ public:
|
|||||||
void curveChanged ();
|
void curveChanged ();
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged ();
|
void enabledChanged ();
|
||||||
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
||||||
|
|
||||||
|
@ -1154,14 +1154,17 @@ void DiagonalCurveEditorSubGroup::shcChanged ()
|
|||||||
/*
|
/*
|
||||||
* Listener
|
* Listener
|
||||||
*/
|
*/
|
||||||
void DiagonalCurveEditorSubGroup::adjusterChanged (Adjuster* a, double newval)
|
void DiagonalCurveEditorSubGroup::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
paramCurve->setPoints (getCurveFromGUI(DCT_Parametric));
|
paramCurve->setPoints (getCurveFromGUI(DCT_Parametric));
|
||||||
storeDisplayedCurve();
|
storeDisplayedCurve();
|
||||||
parent->curveChanged ();
|
parent->curveChanged ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DiagonalCurveEditorSubGroup::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Listener called when the mouse is over a parametric curve's slider
|
* Listener called when the mouse is over a parametric curve's slider
|
||||||
*/
|
*/
|
||||||
|
@ -105,6 +105,7 @@ protected:
|
|||||||
const std::vector<double> getCurveFromGUI (int type);
|
const std::vector<double> getCurveFromGUI (int type);
|
||||||
void shcChanged ();
|
void shcChanged ();
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
bool adjusterEntered (GdkEventCrossing* ev, int ac);
|
bool adjusterEntered (GdkEventCrossing* ev, int ac);
|
||||||
bool adjusterLeft (GdkEventCrossing* ev, int ac);
|
bool adjusterLeft (GdkEventCrossing* ev, int ac);
|
||||||
void setSubGroupRangeLabels(Glib::ustring r1, Glib::ustring r2, Glib::ustring r3, Glib::ustring r4);
|
void setSubGroupRangeLabels(Glib::ustring r1, Glib::ustring r2, Glib::ustring r3, Glib::ustring r4);
|
||||||
|
@ -1009,11 +1009,9 @@ void DirPyrDenoise::setDefaults (const ProcParams* defParams, const ParamsEdited
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirPyrDenoise::adjusterChanged (Adjuster* a, double newval)
|
void DirPyrDenoise::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
const Glib::ustring costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
|
||||||
Glib::ustring costr;
|
|
||||||
costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
|
|
||||||
|
|
||||||
if (listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
if (a == Ldetail) {
|
if (a == Ldetail) {
|
||||||
@ -1034,6 +1032,10 @@ void DirPyrDenoise::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DirPyrDenoise::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void DirPyrDenoise::enabledChanged ()
|
void DirPyrDenoise::enabledChanged ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -49,6 +49,7 @@ public:
|
|||||||
void autoOpenCurve ();
|
void autoOpenCurve ();
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged ();
|
void enabledChanged ();
|
||||||
void medianChanged ();
|
void medianChanged ();
|
||||||
void chromaChanged (double autchroma, double autred, double autblue);
|
void chromaChanged (double autchroma, double autred, double autblue);
|
||||||
|
@ -297,13 +297,28 @@ void DirPyrEqualizer::setDefaults (const ProcParams* defParams, const ParamsEdit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DirPyrEqualizer::adjusterChanged (ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight)
|
void DirPyrEqualizer::adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void DirPyrEqualizer::adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void DirPyrEqualizer::adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void DirPyrEqualizer::adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight)
|
||||||
{
|
{
|
||||||
if (listener && (multiImage || getEnabled()) ) {
|
if (listener && (multiImage || getEnabled()) ) {
|
||||||
listener->panelChanged (EvDirPyrEqualizerHueskin, hueskin->getHistoryString());
|
listener->panelChanged (EvDirPyrEqualizerHueskin, hueskin->getHistoryString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DirPyrEqualizer::adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void DirPyrEqualizer::setBatchMode (bool batchMode)
|
void DirPyrEqualizer::setBatchMode (bool batchMode)
|
||||||
{
|
{
|
||||||
@ -330,9 +345,8 @@ void DirPyrEqualizer::cbdlMethodChanged()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void DirPyrEqualizer::adjusterChanged (Adjuster* a, double newval)
|
void DirPyrEqualizer::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
if (a == threshold) {
|
if (a == threshold) {
|
||||||
listener->panelChanged (EvDirPyrEqualizerThreshold,
|
listener->panelChanged (EvDirPyrEqualizerThreshold,
|
||||||
@ -359,6 +373,10 @@ void DirPyrEqualizer::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DirPyrEqualizer::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void DirPyrEqualizer::enabledChanged ()
|
void DirPyrEqualizer::enabledChanged ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -63,15 +63,20 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool skinadd);
|
void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool skinadd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
void adjusterChanged (ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight);
|
|
||||||
// void algoChanged ();
|
|
||||||
void cbdlMethodChanged();
|
void cbdlMethodChanged();
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged();
|
void enabledChanged();
|
||||||
void gamutlabToggled ();
|
void gamutlabToggled ();
|
||||||
void lumaneutralPressed ();
|
void lumaneutralPressed ();
|
||||||
void lumacontrastPlusPressed ();
|
void lumacontrastPlusPressed ();
|
||||||
void lumacontrastMinusPressed ();
|
void lumacontrastMinusPressed ();
|
||||||
|
|
||||||
|
void adjusterChanged(ThresholdAdjuster* a, double newBottom, double newTop);
|
||||||
|
void adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight);
|
||||||
|
void adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop);
|
||||||
|
void adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight);
|
||||||
|
void adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -84,14 +84,17 @@ void Distortion::setDefaults (const ProcParams* defParams, const ParamsEdited* p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Distortion::adjusterChanged (Adjuster* a, double newval)
|
void Distortion::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (listener) {
|
if (listener) {
|
||||||
listener->panelChanged (EvDISTAmount, Glib::ustring::format (std::setw(4), std::fixed, std::setprecision(3), a->getValue()));
|
listener->panelChanged (EvDISTAmount, Glib::ustring::format (std::setw(4), std::fixed, std::setprecision(3), a->getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Distortion::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void Distortion::setBatchMode (bool batchMode)
|
void Distortion::setBatchMode (bool batchMode)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||||
void setAdjusterBehavior (bool vadd);
|
void setAdjusterBehavior (bool vadd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
void idPressed ();
|
void idPressed ();
|
||||||
|
@ -1159,7 +1159,12 @@ Glib::ustring EditorPanel::getFileName ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO!!!
|
// TODO!!!
|
||||||
void EditorPanel::procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited)
|
void EditorPanel::procParamsChanged(
|
||||||
|
const rtengine::procparams::ProcParams* params,
|
||||||
|
const rtengine::ProcEvent& ev,
|
||||||
|
const Glib::ustring& descr,
|
||||||
|
const ParamsEdited* paramsEdited
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
// if (ev!=EvPhotoLoaded)
|
// if (ev!=EvPhotoLoaded)
|
||||||
@ -1178,7 +1183,28 @@ void EditorPanel::procParamsChanged (rtengine::procparams::ProcParams* params, r
|
|||||||
info_toggled();
|
info_toggled();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorPanel::setProgressState (bool inProcessing)
|
void EditorPanel::clearParamChanges()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorPanel::setProgress(double p)
|
||||||
|
{
|
||||||
|
spparams *s = new spparams;
|
||||||
|
s->val = p;
|
||||||
|
s->pProgress = progressLabel;
|
||||||
|
idle_register.add(setprogressStrUI, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorPanel::setProgressStr(const Glib::ustring& str)
|
||||||
|
{
|
||||||
|
spparams *s = new spparams;
|
||||||
|
s->str = str;
|
||||||
|
s->val = -1;
|
||||||
|
s->pProgress = progressLabel;
|
||||||
|
idle_register.add(setprogressStrUI, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorPanel::setProgressState(bool inProcessing)
|
||||||
{
|
{
|
||||||
struct spsparams {
|
struct spsparams {
|
||||||
bool inProcessing;
|
bool inProcessing;
|
||||||
@ -1217,21 +1243,63 @@ void EditorPanel::setProgressState (bool inProcessing)
|
|||||||
idle_register.add (func, p);
|
idle_register.add (func, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorPanel::setProgress (double p)
|
void EditorPanel::error(const Glib::ustring& descr)
|
||||||
{
|
{
|
||||||
spparams *s = new spparams;
|
|
||||||
s->val = p;
|
|
||||||
s->pProgress = progressLabel;
|
|
||||||
idle_register.add (setprogressStrUI, s);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorPanel::setProgressStr (Glib::ustring str)
|
void EditorPanel::error(const Glib::ustring& title, const Glib::ustring& descr)
|
||||||
{
|
{
|
||||||
spparams *s = new spparams;
|
struct errparams {
|
||||||
s->str = str;
|
Glib::ustring descr;
|
||||||
s->val = -1;
|
Glib::ustring title;
|
||||||
s->pProgress = progressLabel;
|
EditorPanelIdleHelper* epih;
|
||||||
idle_register.add (setprogressStrUI, s);
|
};
|
||||||
|
|
||||||
|
epih->pending++;
|
||||||
|
errparams* const p = new errparams;
|
||||||
|
p->descr = descr;
|
||||||
|
p->title = title;
|
||||||
|
p->epih = epih;
|
||||||
|
|
||||||
|
const auto func = [] (gpointer data) -> gboolean {
|
||||||
|
errparams* const p = static_cast<errparams*> (data);
|
||||||
|
|
||||||
|
if (p->epih->destroyed)
|
||||||
|
{
|
||||||
|
if (p->epih->pending == 1) {
|
||||||
|
delete p->epih;
|
||||||
|
} else {
|
||||||
|
p->epih->pending--;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete p;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p->epih->epanel->displayError (p->title, p->descr);
|
||||||
|
p->epih->pending--;
|
||||||
|
delete p;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
};
|
||||||
|
|
||||||
|
idle_register.add (func, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
void EditorPanel::displayError(const Glib::ustring& title, const Glib::ustring& descr)
|
||||||
|
{
|
||||||
|
GtkWidget* msgd = gtk_message_dialog_new_with_markup (nullptr,
|
||||||
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
GTK_MESSAGE_ERROR,
|
||||||
|
GTK_BUTTONS_OK,
|
||||||
|
"<b>%s</b>",
|
||||||
|
descr.data());
|
||||||
|
gtk_window_set_title ((GtkWindow*)msgd, title.data());
|
||||||
|
g_signal_connect_swapped (msgd, "response",
|
||||||
|
G_CALLBACK (gtk_widget_destroy),
|
||||||
|
msgd);
|
||||||
|
gtk_widget_show_all (msgd);
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is only called from the ThreadUI, so within the gtk thread
|
// This is only called from the ThreadUI, so within the gtk thread
|
||||||
@ -1286,61 +1354,6 @@ void EditorPanel::refreshProcessingState (bool inProcessingP)
|
|||||||
setprogressStrUI (s);
|
setprogressStrUI (s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorPanel::displayError (Glib::ustring title, Glib::ustring descr)
|
|
||||||
{
|
|
||||||
GtkWidget* msgd = gtk_message_dialog_new_with_markup (nullptr,
|
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
|
||||||
GTK_MESSAGE_ERROR,
|
|
||||||
GTK_BUTTONS_OK,
|
|
||||||
"<b>%s</b>",
|
|
||||||
descr.data());
|
|
||||||
gtk_window_set_title ((GtkWindow*)msgd, title.data());
|
|
||||||
g_signal_connect_swapped (msgd, "response",
|
|
||||||
G_CALLBACK (gtk_widget_destroy),
|
|
||||||
msgd);
|
|
||||||
gtk_widget_show_all (msgd);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EditorPanel::error (Glib::ustring title, Glib::ustring descr)
|
|
||||||
{
|
|
||||||
struct errparams {
|
|
||||||
Glib::ustring descr;
|
|
||||||
Glib::ustring title;
|
|
||||||
EditorPanelIdleHelper* epih;
|
|
||||||
};
|
|
||||||
|
|
||||||
epih->pending++;
|
|
||||||
errparams* const p = new errparams;
|
|
||||||
p->descr = descr;
|
|
||||||
p->title = title;
|
|
||||||
p->epih = epih;
|
|
||||||
|
|
||||||
const auto func = [] (gpointer data) -> gboolean {
|
|
||||||
errparams* const p = static_cast<errparams*> (data);
|
|
||||||
|
|
||||||
if (p->epih->destroyed)
|
|
||||||
{
|
|
||||||
if (p->epih->pending == 1) {
|
|
||||||
delete p->epih;
|
|
||||||
} else {
|
|
||||||
p->epih->pending--;
|
|
||||||
}
|
|
||||||
|
|
||||||
delete p;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->epih->epanel->displayError (p->title, p->descr);
|
|
||||||
p->epih->pending--;
|
|
||||||
delete p;
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
};
|
|
||||||
|
|
||||||
idle_register.add (func, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
void EditorPanel::info_toggled ()
|
void EditorPanel::info_toggled ()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -2249,15 +2262,28 @@ void EditorPanel::tbBeforeLock_toggled ()
|
|||||||
tbBeforeLock->get_active() ? tbBeforeLock->set_image (*iBeforeLockON) : tbBeforeLock->set_image (*iBeforeLockOFF);
|
tbBeforeLock->get_active() ? tbBeforeLock->set_image (*iBeforeLockON) : tbBeforeLock->set_image (*iBeforeLockOFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorPanel::histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve, /*LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM,
|
void EditorPanel::histogramChanged(
|
||||||
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw, LUTu & histChroma, LUTu & histLRETI)
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histToneCurve,
|
||||||
|
const LUTu& histLCurve,
|
||||||
|
const LUTu& histCCurve,
|
||||||
|
const LUTu& histLCAM,
|
||||||
|
const LUTu& histCCAM,
|
||||||
|
const LUTu& histRedRaw,
|
||||||
|
const LUTu& histGreenRaw,
|
||||||
|
const LUTu& histBlueRaw,
|
||||||
|
const LUTu& histChroma,
|
||||||
|
const LUTu& histLRETI
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (histogramPanel) {
|
if (histogramPanel) {
|
||||||
histogramPanel->histogramChanged (histRed, histGreen, histBlue, histLuma, histChroma, histRedRaw, histGreenRaw, histBlueRaw);
|
histogramPanel->histogramChanged(histRed, histGreen, histBlue, histLuma, histChroma, histRedRaw, histGreenRaw, histBlueRaw);
|
||||||
}
|
}
|
||||||
|
|
||||||
tpc->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
tpc->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve, histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EditorPanel::CheckSidePanelsVisibility()
|
bool EditorPanel::CheckSidePanelsVisibility()
|
||||||
|
@ -45,6 +45,7 @@ struct EditorPanelIdleHelper {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class RTWindow;
|
class RTWindow;
|
||||||
|
|
||||||
class EditorPanel final :
|
class EditorPanel final :
|
||||||
public Gtk::VBox,
|
public Gtk::VBox,
|
||||||
public PParamsChangeListener,
|
public PParamsChangeListener,
|
||||||
@ -81,16 +82,24 @@ public:
|
|||||||
{
|
{
|
||||||
return realized;
|
return realized;
|
||||||
}
|
}
|
||||||
// progresslistener interface
|
// ProgressListener interface
|
||||||
void setProgress (double p);
|
void setProgress(double p);
|
||||||
void setProgressStr (Glib::ustring str);
|
void setProgressStr(const Glib::ustring& str);
|
||||||
void setProgressState (bool inProcessing);
|
void setProgressState(bool inProcessing);
|
||||||
void error (Glib::ustring title, Glib::ustring descr);
|
void error(const Glib::ustring& descr);
|
||||||
void displayError (Glib::ustring title, Glib::ustring descr); // this is called by error in the gtk thread
|
|
||||||
|
void error(const Glib::ustring& title, const Glib::ustring& descr);
|
||||||
|
void displayError(const Glib::ustring& title, const Glib::ustring& descr); // this is called by error in the gtk thread
|
||||||
void refreshProcessingState (bool inProcessing); // this is called by setProcessingState in the gtk thread
|
void refreshProcessingState (bool inProcessing); // this is called by setProcessingState in the gtk thread
|
||||||
|
|
||||||
// PParamsChangeListener interface
|
// PParamsChangeListener interface
|
||||||
void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr);
|
void procParamsChanged(
|
||||||
|
const rtengine::procparams::ProcParams* params,
|
||||||
|
const rtengine::ProcEvent& ev,
|
||||||
|
const Glib::ustring& descr,
|
||||||
|
const ParamsEdited* paramsEdited = nullptr
|
||||||
|
);
|
||||||
|
void clearParamChanges();
|
||||||
|
|
||||||
// thumbnaillistener interface
|
// thumbnaillistener interface
|
||||||
void procParamsChanged (Thumbnail* thm, int whoChangedIt);
|
void procParamsChanged (Thumbnail* thm, int whoChangedIt);
|
||||||
@ -99,8 +108,22 @@ public:
|
|||||||
void historyBeforeLineChanged (const rtengine::procparams::ProcParams& params);
|
void historyBeforeLineChanged (const rtengine::procparams::ProcParams& params);
|
||||||
|
|
||||||
// HistogramListener
|
// HistogramListener
|
||||||
void histogramChanged (LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM,
|
void histogramChanged(
|
||||||
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw, LUTu & histChroma, LUTu & histLRETI);
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histToneCurve,
|
||||||
|
const LUTu& histLCurve,
|
||||||
|
const LUTu& histCCurve,
|
||||||
|
const LUTu& histLCAM,
|
||||||
|
const LUTu& histCCAM,
|
||||||
|
const LUTu& histRedRaw,
|
||||||
|
const LUTu& histGreenRaw,
|
||||||
|
const LUTu& histBlueRaw,
|
||||||
|
const LUTu& histChroma,
|
||||||
|
const LUTu& histLRETI
|
||||||
|
);
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
void info_toggled ();
|
void info_toggled ();
|
||||||
|
@ -143,7 +143,7 @@ void EdgePreservingDecompositionUI::setDefaults(const ProcParams *defParams, con
|
|||||||
|
|
||||||
void EdgePreservingDecompositionUI::adjusterChanged(Adjuster* a, double newval)
|
void EdgePreservingDecompositionUI::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
if(listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
if(a == strength) {
|
if(a == strength) {
|
||||||
listener->panelChanged(EvEPDStrength, Glib::ustring::format(std::setw(2), std::fixed, std::setprecision(2), a->getValue()));
|
listener->panelChanged(EvEPDStrength, Glib::ustring::format(std::setw(2), std::fixed, std::setprecision(2), a->getValue()));
|
||||||
} else if(a == gamma) {
|
} else if(a == gamma) {
|
||||||
@ -158,6 +158,10 @@ void EdgePreservingDecompositionUI::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EdgePreservingDecompositionUI::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void EdgePreservingDecompositionUI::enabledChanged ()
|
void EdgePreservingDecompositionUI::enabledChanged ()
|
||||||
{
|
{
|
||||||
if (listener) {
|
if (listener) {
|
||||||
|
@ -42,6 +42,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged ();
|
void enabledChanged ();
|
||||||
void setAdjusterBehavior (bool stAdd, bool gAdd, bool esAdd, bool scAdd, bool rAdd);
|
void setAdjusterBehavior (bool stAdd, bool gAdd, bool esAdd, bool scAdd, bool rAdd);
|
||||||
};
|
};
|
||||||
|
@ -26,9 +26,10 @@
|
|||||||
|
|
||||||
class ExportPanelListener
|
class ExportPanelListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void exportRequested () {}
|
virtual ~ExportPanelListener() = default;
|
||||||
|
|
||||||
|
virtual void exportRequested() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExportPanel : public Gtk::VBox
|
class ExportPanel : public Gtk::VBox
|
||||||
|
@ -113,6 +113,10 @@ void FattalToneMapping::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FattalToneMapping::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void FattalToneMapping::enabledChanged ()
|
void FattalToneMapping::enabledChanged ()
|
||||||
{
|
{
|
||||||
if (listener) {
|
if (listener) {
|
||||||
|
@ -42,6 +42,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged ();
|
void enabledChanged ();
|
||||||
void setAdjusterBehavior(bool amountAdd, bool thresholdAdd, bool anchorAdd);
|
void setAdjusterBehavior(bool amountAdd, bool thresholdAdd, bool anchorAdd);
|
||||||
};
|
};
|
||||||
|
@ -1991,7 +1991,11 @@ void FileBrowser::setExportPanel (ExportPanel* expanel)
|
|||||||
exportPanel->setExportPanelListener (this);
|
exportPanel->setExportPanelListener (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileBrowser::updateProfileList ()
|
void FileBrowser::storeCurrentValue()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileBrowser::updateProfileList()
|
||||||
{
|
{
|
||||||
// submenu applmenu
|
// submenu applmenu
|
||||||
int p = 0;
|
int p = 0;
|
||||||
@ -2085,6 +2089,10 @@ void FileBrowser::updateProfileList ()
|
|||||||
subMenuList.clear();
|
subMenuList.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileBrowser::restoreValue()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void FileBrowser::openRequested( std::vector<FileBrowserEntry*> mselected)
|
void FileBrowser::openRequested( std::vector<FileBrowserEntry*> mselected)
|
||||||
{
|
{
|
||||||
std::vector<Thumbnail*> entries;
|
std::vector<Thumbnail*> entries;
|
||||||
|
@ -34,23 +34,20 @@
|
|||||||
class ProfileStoreLabel;
|
class ProfileStoreLabel;
|
||||||
class FileBrowser;
|
class FileBrowser;
|
||||||
class FileBrowserEntry;
|
class FileBrowserEntry;
|
||||||
|
|
||||||
class FileBrowserListener
|
class FileBrowserListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~FileBrowserListener () {}
|
virtual ~FileBrowserListener() = default;
|
||||||
virtual void filterApplied () {}
|
virtual void filterApplied() = 0;
|
||||||
virtual void openRequested (std::vector<Thumbnail*> tbe) {}
|
virtual void openRequested(const std::vector<Thumbnail*>& tbe) = 0;
|
||||||
virtual void developRequested (std::vector<FileBrowserEntry*> tbe, bool fastmode) {}
|
virtual void developRequested(const std::vector<FileBrowserEntry*>& tbe, bool fastmode) = 0;
|
||||||
virtual void renameRequested (std::vector<FileBrowserEntry*> tbe) {}
|
virtual void renameRequested(const std::vector<FileBrowserEntry*>& tbe) = 0;
|
||||||
virtual void deleteRequested (std::vector<FileBrowserEntry*> tbe, bool inclBatchProcessed) {}
|
virtual void deleteRequested(const std::vector<FileBrowserEntry*>& tbe, bool inclBatchProcessed) = 0;
|
||||||
virtual void copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool moveRequested) {}
|
virtual void copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, bool moveRequested) = 0;
|
||||||
virtual void selectionChanged (std::vector<Thumbnail*> tbe) {}
|
virtual void selectionChanged(const std::vector<Thumbnail*>& tbe) = 0;
|
||||||
virtual void clearFromCacheRequested(std::vector<FileBrowserEntry*> tbe, bool leavenotrace) {}
|
virtual void clearFromCacheRequested(const std::vector<FileBrowserEntry*>& tbe, bool leavenotrace) = 0;
|
||||||
virtual bool isInTabMode ()
|
virtual bool isInTabMode() const = 0;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -203,7 +200,9 @@ public:
|
|||||||
// exportpanel interface
|
// exportpanel interface
|
||||||
void exportRequested();
|
void exportRequested();
|
||||||
|
|
||||||
void updateProfileList ();
|
void storeCurrentValue();
|
||||||
|
void updateProfileList();
|
||||||
|
void restoreValue();
|
||||||
|
|
||||||
type_trash_changed trash_changed();
|
type_trash_changed trash_changed();
|
||||||
};
|
};
|
||||||
|
@ -209,7 +209,7 @@ void FileBrowserEntry::procParamsChanged (Thumbnail* thm, int whoChangedIt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cropParams)
|
void FileBrowserEntry::updateImage(rtengine::IImage8* img, double scale, const rtengine::procparams::CropParams& cropParams)
|
||||||
{
|
{
|
||||||
if (!feih) {
|
if (!feih) {
|
||||||
return;
|
return;
|
||||||
@ -260,7 +260,7 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi
|
|||||||
idle_register.add(func, param, priority);
|
idle_register.add(func, param, priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileBrowserEntry::_updateImage (rtengine::IImage8* img, double s, rtengine::procparams::CropParams cropParams)
|
void FileBrowserEntry::_updateImage(rtengine::IImage8* img, double s, const rtengine::procparams::CropParams& cropParams)
|
||||||
{
|
{
|
||||||
MYWRITERLOCK(l, lockRW);
|
MYWRITERLOCK(l, lockRW);
|
||||||
|
|
||||||
|
@ -99,8 +99,8 @@ public:
|
|||||||
// thumbnaillistener interface
|
// thumbnaillistener interface
|
||||||
void procParamsChanged (Thumbnail* thm, int whoChangedIt);
|
void procParamsChanged (Thumbnail* thm, int whoChangedIt);
|
||||||
// thumbimageupdatelistener interface
|
// thumbimageupdatelistener interface
|
||||||
void updateImage (rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cropParams);
|
void updateImage(rtengine::IImage8* img, double scale, const rtengine::procparams::CropParams& cropParams);
|
||||||
void _updateImage (rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cropParams); // inside gtk thread
|
void _updateImage(rtengine::IImage8* img, double scale, const rtengine::procparams::CropParams& cropParams); // inside gtk thread
|
||||||
|
|
||||||
virtual bool motionNotify (int x, int y);
|
virtual bool motionNotify (int x, int y);
|
||||||
virtual bool pressNotify (int button, int type, int bstate, int x, int y);
|
virtual bool pressNotify (int button, int type, int bstate, int x, int y);
|
||||||
|
@ -749,18 +749,6 @@ void FileCatalog::_refreshProgressBar ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileCatalog::filterApplied()
|
|
||||||
{
|
|
||||||
const auto func = [](gpointer data) -> gboolean {
|
|
||||||
static_cast<FileCatalog*>(data)->_refreshProgressBar();
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
};
|
|
||||||
|
|
||||||
idle_register.add(func, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void FileCatalog::previewReady (int dir_id, FileBrowserEntry* fdn)
|
void FileCatalog::previewReady (int dir_id, FileBrowserEntry* fdn)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -962,9 +950,19 @@ int openRequestedUI (void* p)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileCatalog::openRequested (std::vector<Thumbnail*> tmb)
|
void FileCatalog::filterApplied()
|
||||||
{
|
{
|
||||||
|
const auto func = [](gpointer data) -> gboolean {
|
||||||
|
static_cast<FileCatalog*>(data)->_refreshProgressBar();
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
};
|
||||||
|
|
||||||
|
idle_register.add(func, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCatalog::openRequested(const std::vector<Thumbnail*>& tmb)
|
||||||
|
{
|
||||||
FCOIParams* params = new FCOIParams;
|
FCOIParams* params = new FCOIParams;
|
||||||
params->catalog = this;
|
params->catalog = this;
|
||||||
params->tmb = tmb;
|
params->tmb = tmb;
|
||||||
@ -976,9 +974,8 @@ void FileCatalog::openRequested (std::vector<Thumbnail*> tmb)
|
|||||||
idle_register.add(openRequestedUI, params);
|
idle_register.add(openRequestedUI, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileCatalog::deleteRequested (std::vector<FileBrowserEntry*> tbe, bool inclBatchProcessed)
|
void FileCatalog::deleteRequested(const std::vector<FileBrowserEntry*>& tbe, bool inclBatchProcessed)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (tbe.empty()) {
|
if (tbe.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1017,15 +1014,12 @@ void FileCatalog::deleteRequested (std::vector<FileBrowserEntry*> tbe, bool inc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileCatalog::copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, bool moveRequested)
|
||||||
void FileCatalog::copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool moveRequested)
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (tbe.empty()) {
|
if (tbe.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Glib::ustring fc_title;
|
Glib::ustring fc_title;
|
||||||
|
|
||||||
if (moveRequested) {
|
if (moveRequested) {
|
||||||
@ -1129,9 +1123,9 @@ void FileCatalog::copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool m
|
|||||||
_refreshProgressBar();
|
_refreshProgressBar();
|
||||||
} // Gtk::RESPONSE_OK
|
} // Gtk::RESPONSE_OK
|
||||||
}
|
}
|
||||||
void FileCatalog::developRequested (std::vector<FileBrowserEntry*> tbe, bool fastmode)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
void FileCatalog::developRequested(const std::vector<FileBrowserEntry*>& tbe, bool fastmode)
|
||||||
|
{
|
||||||
if (listener) {
|
if (listener) {
|
||||||
std::vector<BatchQueueEntry*> entries;
|
std::vector<BatchQueueEntry*> entries;
|
||||||
|
|
||||||
@ -1262,23 +1256,8 @@ void FileCatalog::developRequested (std::vector<FileBrowserEntry*> tbe, bool fas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileCatalog::exportRequested ()
|
void FileCatalog::renameRequested(const std::vector<FileBrowserEntry*>& tbe)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileCatalog::setExportPanel (ExportPanel* expanel)
|
|
||||||
{
|
|
||||||
|
|
||||||
exportPanel = expanel;
|
|
||||||
exportPanel->set_sensitive (false);
|
|
||||||
exportPanel->setExportPanelListener (this);
|
|
||||||
fileBrowser->setExportPanel(expanel);
|
|
||||||
}
|
|
||||||
|
|
||||||
void FileCatalog::renameRequested (std::vector<FileBrowserEntry*> tbe)
|
|
||||||
{
|
|
||||||
|
|
||||||
RenameDialog* renameDlg = new RenameDialog ((Gtk::Window*)get_toplevel());
|
RenameDialog* renameDlg = new RenameDialog ((Gtk::Window*)get_toplevel());
|
||||||
|
|
||||||
for (size_t i = 0; i < tbe.size(); i++) {
|
for (size_t i = 0; i < tbe.size(); i++) {
|
||||||
@ -1333,9 +1312,15 @@ void FileCatalog::renameRequested (std::vector<FileBrowserEntry*> tbe)
|
|||||||
delete renameDlg;
|
delete renameDlg;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileCatalog::clearFromCacheRequested (std::vector<FileBrowserEntry*> tbe, bool leavenotrace)
|
void FileCatalog::selectionChanged(const std::vector<Thumbnail*>& tbe)
|
||||||
{
|
{
|
||||||
|
if (fslistener) {
|
||||||
|
fslistener->selectionChanged (tbe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FileCatalog::clearFromCacheRequested(const std::vector<FileBrowserEntry*>& tbe, bool leavenotrace)
|
||||||
|
{
|
||||||
if (tbe.empty()) {
|
if (tbe.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1347,6 +1332,11 @@ void FileCatalog::clearFromCacheRequested (std::vector<FileBrowserEntry*> tbe,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FileCatalog::isInTabMode() const
|
||||||
|
{
|
||||||
|
return inTabMode;
|
||||||
|
}
|
||||||
|
|
||||||
void FileCatalog::categoryButtonToggled (Gtk::ToggleButton* b, bool isMouseClick)
|
void FileCatalog::categoryButtonToggled (Gtk::ToggleButton* b, bool isMouseClick)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1966,12 +1956,8 @@ void FileCatalog::refreshEditedState (const std::set<Glib::ustring>& efiles)
|
|||||||
fileBrowser->refreshEditedState (efiles);
|
fileBrowser->refreshEditedState (efiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileCatalog::selectionChanged (std::vector<Thumbnail*> tbe)
|
void FileCatalog::exportRequested()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (fslistener) {
|
|
||||||
fslistener->selectionChanged (tbe);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called within GTK UI thread
|
// Called within GTK UI thread
|
||||||
@ -1991,6 +1977,15 @@ void FileCatalog::setFilterPanel (FilterPanel* fpanel)
|
|||||||
filterPanel->set_sensitive (false);
|
filterPanel->set_sensitive (false);
|
||||||
filterPanel->setFilterPanelListener (this);
|
filterPanel->setFilterPanelListener (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileCatalog::setExportPanel(ExportPanel* expanel)
|
||||||
|
{
|
||||||
|
exportPanel = expanel;
|
||||||
|
exportPanel->set_sensitive (false);
|
||||||
|
exportPanel->setExportPanelListener (this);
|
||||||
|
fileBrowser->setExportPanel(expanel);
|
||||||
|
}
|
||||||
|
|
||||||
void FileCatalog::trashChanged ()
|
void FileCatalog::trashChanged ()
|
||||||
{
|
{
|
||||||
if (trashIsEmpty()) {
|
if (trashIsEmpty()) {
|
||||||
|
@ -212,13 +212,16 @@ public:
|
|||||||
void refreshThumbImages ();
|
void refreshThumbImages ();
|
||||||
void refreshHeight ();
|
void refreshHeight ();
|
||||||
|
|
||||||
void openRequested (std::vector<Thumbnail*> tbe);
|
void filterApplied();
|
||||||
void deleteRequested (std::vector<FileBrowserEntry*> tbe, bool inclBatchProcessed);
|
void openRequested(const std::vector<Thumbnail*>& tbe);
|
||||||
void copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool moveRequested);
|
void deleteRequested(const std::vector<FileBrowserEntry*>& tbe, bool inclBatchProcessed);
|
||||||
void developRequested (std::vector<FileBrowserEntry*> tbe, bool fastmode);
|
void copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, bool moveRequested);
|
||||||
void renameRequested (std::vector<FileBrowserEntry*> tbe);
|
void developRequested(const std::vector<FileBrowserEntry*>& tbe, bool fastmode);
|
||||||
void clearFromCacheRequested(std::vector<FileBrowserEntry*> tbe, bool leavenotrace);
|
void renameRequested(const std::vector<FileBrowserEntry*>& tbe);
|
||||||
void selectionChanged (std::vector<Thumbnail*> tbe);
|
void selectionChanged(const std::vector<Thumbnail*>& tbe);
|
||||||
|
void clearFromCacheRequested(const std::vector<FileBrowserEntry*>& tbe, bool leavenotrace);
|
||||||
|
bool isInTabMode() const;
|
||||||
|
|
||||||
void emptyTrash ();
|
void emptyTrash ();
|
||||||
bool trashIsEmpty ();
|
bool trashIsEmpty ();
|
||||||
|
|
||||||
@ -277,11 +280,6 @@ public:
|
|||||||
|
|
||||||
bool handleShortcutKey (GdkEventKey* event);
|
bool handleShortcutKey (GdkEventKey* event);
|
||||||
|
|
||||||
bool isInTabMode()
|
|
||||||
{
|
|
||||||
return inTabMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CheckSidePanelsVisibility();
|
bool CheckSidePanelsVisibility();
|
||||||
void toggleSidePanels();
|
void toggleSidePanels();
|
||||||
void toggleLeftPanel();
|
void toggleLeftPanel();
|
||||||
@ -289,7 +287,6 @@ public:
|
|||||||
|
|
||||||
void showToolBar();
|
void showToolBar();
|
||||||
void hideToolBar();
|
void hideToolBar();
|
||||||
void filterApplied();
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
void on_dir_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, bool internal);
|
void on_dir_changed (const Glib::RefPtr<Gio::File>& file, const Glib::RefPtr<Gio::File>& other_file, Gio::FileMonitorEvent event_type, bool internal);
|
||||||
|
@ -228,7 +228,6 @@ void FilePanel::on_NB_switch_page(Gtk::Widget* page, guint page_num)
|
|||||||
|
|
||||||
bool FilePanel::fileSelected (Thumbnail* thm)
|
bool FilePanel::fileSelected (Thumbnail* thm)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -258,6 +257,16 @@ bool FilePanel::fileSelected (Thumbnail* thm)
|
|||||||
sigc::bind(sigc::mem_fun(*this, &FilePanel::imageLoaded), thm, ld) );
|
sigc::bind(sigc::mem_fun(*this, &FilePanel::imageLoaded), thm, ld) );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FilePanel::addBatchQueueJobs(const std::vector<BatchQueueEntry*>& entries)
|
||||||
|
{
|
||||||
|
if (parent) {
|
||||||
|
parent->addBatchQueueJobs (entries);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnector<rtengine::InitialImage*> *pc )
|
bool FilePanel::imageLoaded( Thumbnail* thm, ProgressConnector<rtengine::InitialImage*> *pc )
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -365,16 +374,6 @@ void FilePanel::open (const Glib::ustring& d)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FilePanel::addBatchQueueJobs ( std::vector<BatchQueueEntry*> &entries )
|
|
||||||
{
|
|
||||||
|
|
||||||
if (parent) {
|
|
||||||
parent->addBatchQueueJobs (entries);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void FilePanel::optionsChanged ()
|
void FilePanel::optionsChanged ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -36,8 +36,7 @@ class RTWindow;
|
|||||||
|
|
||||||
class FilePanel final :
|
class FilePanel final :
|
||||||
public Gtk::HPaned,
|
public Gtk::HPaned,
|
||||||
public FileSelectionListener,
|
public FileSelectionListener
|
||||||
public PParamsChangeListener
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FilePanel ();
|
FilePanel ();
|
||||||
@ -72,8 +71,8 @@ public:
|
|||||||
void saveOptions ();
|
void saveOptions ();
|
||||||
|
|
||||||
// interface fileselectionlistener
|
// interface fileselectionlistener
|
||||||
bool fileSelected (Thumbnail* thm);
|
bool fileSelected(Thumbnail* thm);
|
||||||
bool addBatchQueueJobs ( std::vector<BatchQueueEntry*> &entries );
|
bool addBatchQueueJobs(const std::vector<BatchQueueEntry*>& entries);
|
||||||
|
|
||||||
void optionsChanged ();
|
void optionsChanged ();
|
||||||
bool imageLoaded( Thumbnail* thm, ProgressConnector<rtengine::InitialImage*> * );
|
bool imageLoaded( Thumbnail* thm, ProgressConnector<rtengine::InitialImage*> * );
|
||||||
|
@ -19,13 +19,13 @@
|
|||||||
#ifndef _FILESELECTIONCHANGELISTENER_
|
#ifndef _FILESELECTIONCHANGELISTENER_
|
||||||
#define _FILESELECTIONCHANGELISTENER_
|
#define _FILESELECTIONCHANGELISTENER_
|
||||||
|
|
||||||
#include "thumbnail.h"
|
class Thumbnail;
|
||||||
|
|
||||||
class FileSelectionChangeListener
|
class FileSelectionChangeListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void selectionChanged (const std::vector<Thumbnail*>& selected) {}
|
virtual ~FileSelectionChangeListener() = default;
|
||||||
|
virtual void selectionChanged(const std::vector<Thumbnail*>& selected) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,15 +19,15 @@
|
|||||||
#ifndef _FILESELECTIONLISTENER_
|
#ifndef _FILESELECTIONLISTENER_
|
||||||
#define _FILESELECTIONLISTENER_
|
#define _FILESELECTIONLISTENER_
|
||||||
|
|
||||||
#include "thumbnail.h"
|
class Thumbnail;
|
||||||
#include "batchqueueentry.h"
|
class BatchQueueEntry;
|
||||||
|
|
||||||
class FileSelectionListener
|
class FileSelectionListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool fileSelected (Thumbnail* thm) = 0;
|
virtual ~FileSelectionListener() = default;
|
||||||
virtual bool addBatchQueueJobs ( std::vector<BatchQueueEntry*> &entries ) = 0;
|
virtual bool fileSelected(Thumbnail* thm) = 0;
|
||||||
|
virtual bool addBatchQueueJobs(const std::vector<BatchQueueEntry*>& entries) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -106,14 +106,18 @@ void FilmSimulation::enabledChanged ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FilmSimulation::adjusterChanged( Adjuster* a, double newval )
|
void FilmSimulation::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
if (listener && (multiImage || getEnabled()) ) {
|
if (listener && (multiImage || getEnabled())) {
|
||||||
Glib::ustring value = a->getTextValue();
|
const Glib::ustring value = a->getTextValue();
|
||||||
listener->panelChanged ( EvFilmSimulationStrength, value );
|
listener->panelChanged(EvFilmSimulationStrength, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FilmSimulation::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void FilmSimulation::setBatchMode( bool batchMode )
|
void FilmSimulation::setBatchMode( bool batchMode )
|
||||||
{
|
{
|
||||||
ToolPanel::setBatchMode( batchMode );
|
ToolPanel::setBatchMode( batchMode );
|
||||||
|
@ -53,12 +53,13 @@ class FilmSimulation : public ToolParamBlock, public AdjusterListener, public Fo
|
|||||||
public:
|
public:
|
||||||
FilmSimulation();
|
FilmSimulation();
|
||||||
|
|
||||||
void adjusterChanged( Adjuster* a, double newval );
|
void adjusterChanged(Adjuster* a, double newval);
|
||||||
void setBatchMode( bool batchMode );
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void read( const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr );
|
void setBatchMode(bool batchMode);
|
||||||
void write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr );
|
void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr);
|
||||||
void setAdjusterBehavior( bool strength );
|
void write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr);
|
||||||
void trimValues( rtengine::procparams::ProcParams* pp );
|
void setAdjusterBehavior(bool strength);
|
||||||
|
void trimValues(rtengine::procparams::ProcParams* pp);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void onClutSelected();
|
void onClutSelected();
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
|
|
||||||
class FilterPanelListener
|
class FilterPanelListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void exifFilterChanged () {}
|
virtual ~FilterPanelListener() = default;
|
||||||
|
virtual void exifFilterChanged () = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FilterPanel : public Gtk::VBox
|
class FilterPanel : public Gtk::VBox
|
||||||
|
@ -232,11 +232,10 @@ void FlatField::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedit
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlatField::adjusterChanged (Adjuster* a, double newval)
|
void FlatField::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
if (listener) {
|
if (listener) {
|
||||||
|
const Glib::ustring value = a->getTextValue();
|
||||||
Glib::ustring value = a->getTextValue();
|
|
||||||
|
|
||||||
if (a == flatFieldBlurRadius) {
|
if (a == flatFieldBlurRadius) {
|
||||||
listener->panelChanged (EvFlatFieldBlurRadius, value);
|
listener->panelChanged (EvFlatFieldBlurRadius, value);
|
||||||
@ -248,7 +247,6 @@ void FlatField::adjusterChanged (Adjuster* a, double newval)
|
|||||||
|
|
||||||
void FlatField::adjusterAutoToggled (Adjuster* a, bool newval)
|
void FlatField::adjusterAutoToggled (Adjuster* a, bool newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (multiImage) {
|
if (multiImage) {
|
||||||
if (flatFieldClipControl->getAutoInconsistent()) {
|
if (flatFieldClipControl->getAutoInconsistent()) {
|
||||||
flatFieldClipControl->setAutoInconsistent(false);
|
flatFieldClipControl->setAutoInconsistent(false);
|
||||||
|
@ -247,10 +247,9 @@ void Gradient::setDefaults (const ProcParams* defParams, const ParamsEdited* ped
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gradient::adjusterChanged (Adjuster* a, double newval)
|
void Gradient::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
updateGeometry(int(centerX->getValue()), int(centerY->getValue()), feather->getValue(), degree->getValue());
|
||||||
updateGeometry (int(centerX->getValue()), int(centerY->getValue()), feather->getValue(), degree->getValue());
|
|
||||||
|
|
||||||
if (listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
|
|
||||||
@ -266,6 +265,10 @@ void Gradient::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Gradient::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void Gradient::enabledChanged ()
|
void Gradient::enabledChanged ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged ();
|
void enabledChanged ();
|
||||||
void setAdjusterBehavior (bool degreeadd, bool featheradd, bool strengthadd, bool centeradd);
|
void setAdjusterBehavior (bool degreeadd, bool featheradd, bool strengthadd, bool centeradd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
|
@ -345,7 +345,7 @@ void HistogramPanel::reorder (Gtk::PositionType align)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// DrawModeListener interface:
|
// DrawModeListener interface:
|
||||||
void HistogramPanel::toggle_button_mode ()
|
void HistogramPanel::toggleButtonMode ()
|
||||||
{
|
{
|
||||||
if (options.histogramDrawMode == 0)
|
if (options.histogramDrawMode == 0)
|
||||||
showMode->set_image(*mode0Image);
|
showMode->set_image(*mode0Image);
|
||||||
@ -734,7 +734,16 @@ void HistogramArea::updateOptions (bool r, bool g, bool b, bool l, bool c, bool
|
|||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistogramArea::update (LUTu &histRed, LUTu &histGreen, LUTu &histBlue, LUTu &histLuma, LUTu &histChroma, LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw)
|
void HistogramArea::update(
|
||||||
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histChroma,
|
||||||
|
const LUTu& histRedRaw,
|
||||||
|
const LUTu& histGreenRaw,
|
||||||
|
const LUTu& histBlueRaw
|
||||||
|
)
|
||||||
{
|
{
|
||||||
if (histRed) {
|
if (histRed) {
|
||||||
rhist = histRed;
|
rhist = histRed;
|
||||||
@ -1042,7 +1051,7 @@ bool HistogramArea::on_button_press_event (GdkEventButton* event)
|
|||||||
options.histogramDrawMode = (options.histogramDrawMode + 1) % 3;
|
options.histogramDrawMode = (options.histogramDrawMode + 1) % 3;
|
||||||
|
|
||||||
if (myDrawModeListener) {
|
if (myDrawModeListener) {
|
||||||
myDrawModeListener->toggle_button_mode ();
|
myDrawModeListener->toggleButtonMode ();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateBackBuffer ();
|
updateBackBuffer ();
|
||||||
|
@ -110,8 +110,8 @@ private:
|
|||||||
class DrawModeListener
|
class DrawModeListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~DrawModeListener() {}
|
virtual ~DrawModeListener() = default;
|
||||||
virtual void toggle_button_mode () {}
|
virtual void toggleButtonMode() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HistogramArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling
|
class HistogramArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling
|
||||||
@ -144,7 +144,16 @@ public:
|
|||||||
~HistogramArea();
|
~HistogramArea();
|
||||||
|
|
||||||
void updateBackBuffer ();
|
void updateBackBuffer ();
|
||||||
void update (LUTu &histRed, LUTu &histGreen, LUTu &histBlue, LUTu &histLuma, LUTu &histChroma, LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw);
|
void update(
|
||||||
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histChroma,
|
||||||
|
const LUTu& histRedRaw,
|
||||||
|
const LUTu& histGreenRaw,
|
||||||
|
const LUTu& histBlueRaw
|
||||||
|
);
|
||||||
void updateOptions (bool r, bool g, bool b, bool l, bool c, bool raw, int mode);
|
void updateOptions (bool r, bool g, bool b, bool l, bool c, bool raw, int mode);
|
||||||
void on_realize();
|
void on_realize();
|
||||||
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr);
|
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr);
|
||||||
@ -209,9 +218,17 @@ public:
|
|||||||
HistogramPanel ();
|
HistogramPanel ();
|
||||||
~HistogramPanel ();
|
~HistogramPanel ();
|
||||||
|
|
||||||
void histogramChanged (LUTu &histRed, LUTu &histGreen, LUTu &histBlue, LUTu &histLuma, LUTu &histChroma, LUTu &histRedRaw, LUTu &histGreenRaw, LUTu &histBlueRaw)
|
void histogramChanged(
|
||||||
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histChroma,
|
||||||
|
const LUTu& histRedRaw,
|
||||||
|
const LUTu& histGreenRaw,
|
||||||
|
const LUTu& histBlueRaw)
|
||||||
{
|
{
|
||||||
histogramArea->update (histRed, histGreen, histBlue, histLuma, histChroma, histRedRaw, histGreenRaw, histBlueRaw);
|
histogramArea->update(histRed, histGreen, histBlue, histLuma, histChroma, histRedRaw, histGreenRaw, histBlueRaw);
|
||||||
}
|
}
|
||||||
// pointermotionlistener interface
|
// pointermotionlistener interface
|
||||||
void pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw = false);
|
void pointerMoved (bool validPos, const Glib::ustring &profile, const Glib::ustring &profileW, int x, int y, int r, int g, int b, bool isRaw = false);
|
||||||
@ -232,7 +249,7 @@ public:
|
|||||||
void resized (Gtk::Allocation& req);
|
void resized (Gtk::Allocation& req);
|
||||||
|
|
||||||
// drawModeListener interface
|
// drawModeListener interface
|
||||||
void toggle_button_mode ();
|
void toggleButtonMode ();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -154,12 +154,6 @@ void History::initHistory ()
|
|||||||
bookmarkModel->clear ();
|
bookmarkModel->clear ();
|
||||||
}
|
}
|
||||||
|
|
||||||
void History::clearParamChanges ()
|
|
||||||
{
|
|
||||||
|
|
||||||
initHistory ();
|
|
||||||
}
|
|
||||||
|
|
||||||
void History::historySelectionChanged ()
|
void History::historySelectionChanged ()
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -216,9 +210,13 @@ void History::bookmarkSelectionChanged ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited)
|
void History::procParamsChanged(
|
||||||
|
const ProcParams* params,
|
||||||
|
const ProcEvent& ev,
|
||||||
|
const Glib::ustring& descr,
|
||||||
|
const ParamsEdited* paramsEdited
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
// to prevent recursion, we filter out the events triggered by the history and events that should not be registered
|
// to prevent recursion, we filter out the events triggered by the history and events that should not be registered
|
||||||
if (ev == EvHistoryBrowsed || ev == EvMonitorTransform) {
|
if (ev == EvHistoryBrowsed || ev == EvMonitorTransform) {
|
||||||
return;
|
return;
|
||||||
@ -300,6 +298,11 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring
|
|||||||
selchangebm.block (false);
|
selchangebm.block (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void History::clearParamChanges ()
|
||||||
|
{
|
||||||
|
initHistory ();
|
||||||
|
}
|
||||||
|
|
||||||
void History::addBookmarkWithText (Glib::ustring text)
|
void History::addBookmarkWithText (Glib::ustring text)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
|
|
||||||
class HistoryBeforeLineListener
|
class HistoryBeforeLineListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void historyBeforeLineChanged (const rtengine::procparams::ProcParams& params) {}
|
virtual ~HistoryBeforeLineListener() = default;
|
||||||
|
virtual void historyBeforeLineChanged(const rtengine::procparams::ProcParams& params) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class History : public Gtk::VBox, public PParamsChangeListener
|
class History : public Gtk::VBox, public PParamsChangeListener
|
||||||
@ -106,7 +106,12 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// pparamschangelistener interface
|
// pparamschangelistener interface
|
||||||
void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr);
|
void procParamsChanged(
|
||||||
|
const rtengine::procparams::ProcParams* params,
|
||||||
|
const rtengine::ProcEvent& ev,
|
||||||
|
const Glib::ustring& descr,
|
||||||
|
const ParamsEdited* paramsEdited = nullptr
|
||||||
|
);
|
||||||
void clearParamChanges ();
|
void clearParamChanges ();
|
||||||
|
|
||||||
void historySelectionChanged ();
|
void historySelectionChanged ();
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include "colorprovider.h"
|
#include "colorprovider.h"
|
||||||
|
|
||||||
|
|
||||||
class HSVEqualizer : public ToolParamBlock, public AdjusterListener, public FoldableToolPanel, public CurveListener, public ColorProvider
|
class HSVEqualizer : public ToolParamBlock, public FoldableToolPanel, public CurveListener, public ColorProvider
|
||||||
{
|
{
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -363,7 +363,7 @@ void ICCProfileCreator::updateICCVersion()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ICCProfileCreator::adjusterChanged (Adjuster* a, double newval)
|
void ICCProfileCreator::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
if (a == aPrimariesRedX || a == aPrimariesRedY ||
|
if (a == aPrimariesRedX || a == aPrimariesRedY ||
|
||||||
a == aPrimariesGreenX || a == aPrimariesGreenY ||
|
a == aPrimariesGreenX || a == aPrimariesGreenY ||
|
||||||
@ -382,6 +382,10 @@ void ICCProfileCreator::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ICCProfileCreator::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void ICCProfileCreator::primariesChanged()
|
void ICCProfileCreator::primariesChanged()
|
||||||
{
|
{
|
||||||
if (primaries->get_active_row_number() > 0) {
|
if (primaries->get_active_row_number() > 0) {
|
||||||
|
@ -91,7 +91,8 @@ private:
|
|||||||
void primariesChanged();
|
void primariesChanged();
|
||||||
void illuminantChanged();
|
void illuminantChanged();
|
||||||
void trcPresetsChanged();
|
void trcPresetsChanged();
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged(Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
static std::vector<Glib::ustring> getGamma();
|
static std::vector<Glib::ustring> getGamma();
|
||||||
Glib::ustring getPrimariesPresetName(const Glib::ustring &preset);
|
Glib::ustring getPrimariesPresetName(const Glib::ustring &preset);
|
||||||
void getPrimaries(const Glib::ustring &preset, float *p, ColorTemp &temp);
|
void getPrimaries(const Glib::ustring &preset, float *p, ColorTemp &temp);
|
||||||
|
@ -698,6 +698,10 @@ void ICMPanel::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ICMPanel::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void ICMPanel::wpChanged()
|
void ICMPanel::wpChanged()
|
||||||
{
|
{
|
||||||
if (listener) {
|
if (listener) {
|
||||||
|
@ -30,10 +30,9 @@
|
|||||||
|
|
||||||
class ICMPanelListener
|
class ICMPanelListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~ICMPanelListener() {}
|
virtual ~ICMPanelListener() = default;
|
||||||
virtual void saveInputICCReference(Glib::ustring fname, bool apply_wb) {}
|
virtual void saveInputICCReference(const Glib::ustring& fname, bool apply_wb) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ICMPanel :
|
class ICMPanel :
|
||||||
@ -127,6 +126,7 @@ public:
|
|||||||
void setBatchMode(bool batchMode);
|
void setBatchMode(bool batchMode);
|
||||||
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||||
void adjusterChanged(Adjuster* a, double newval);
|
void adjusterChanged(Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
|
|
||||||
void wpChanged();
|
void wpChanged();
|
||||||
void wtrcinChanged();
|
void wtrcinChanged();
|
||||||
|
@ -27,23 +27,14 @@ class ImageAreaToolListener
|
|||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~ImageAreaToolListener() {}
|
virtual ~ImageAreaToolListener() = default;
|
||||||
virtual void spotWBselected (int x, int y, Thumbnail* thm = nullptr) {}
|
virtual void spotWBselected(int x, int y, Thumbnail* thm = nullptr) = 0;
|
||||||
virtual void sharpMaskSelected (bool sharpMask) {}
|
virtual void sharpMaskSelected(bool sharpMask) = 0;
|
||||||
virtual int getSpotWBRectSize ()
|
virtual int getSpotWBRectSize() const = 0;
|
||||||
{
|
virtual void cropSelectionReady() = 0;
|
||||||
return 8;
|
virtual void rotateSelectionReady(double rotate_deg, Thumbnail* thm = nullptr) = 0;
|
||||||
}
|
virtual ToolBar* getToolBar() const = 0;
|
||||||
virtual void cropSelectionReady () {}
|
virtual CropGUIListener* startCropEditing(Thumbnail* thm = nullptr) = 0;
|
||||||
virtual void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr) {}
|
|
||||||
virtual ToolBar* getToolBar ()
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
virtual CropGUIListener* startCropEditing (Thumbnail* thm = nullptr)
|
|
||||||
{
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -77,15 +77,17 @@ void ImpulseDenoise::setDefaults (const ProcParams* defParams, const ParamsEdite
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImpulseDenoise::adjusterChanged (Adjuster* a, double newval)
|
void ImpulseDenoise::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
|
|
||||||
listener->panelChanged (EvIDNThresh, Glib::ustring::format (std::setw(2), std::fixed, std::setprecision(1), a->getValue()));
|
listener->panelChanged (EvIDNThresh, Glib::ustring::format (std::setw(2), std::fixed, std::setprecision(1), a->getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ImpulseDenoise::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void ImpulseDenoise::enabledChanged ()
|
void ImpulseDenoise::enabledChanged ()
|
||||||
{
|
{
|
||||||
if (listener) {
|
if (listener) {
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged ();
|
void enabledChanged ();
|
||||||
|
|
||||||
void setAdjusterBehavior (bool threshadd);
|
void setAdjusterBehavior (bool threshadd);
|
||||||
|
@ -521,9 +521,8 @@ void LCurve::curveChanged (CurveEditor* ce)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LCurve::adjusterChanged (Adjuster* a, double newval)
|
void LCurve::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
Glib::ustring costr;
|
Glib::ustring costr;
|
||||||
|
|
||||||
if (a == brightness) {
|
if (a == brightness) {
|
||||||
@ -565,6 +564,10 @@ void LCurve::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LCurve::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
void LCurve::colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller *caller)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -642,14 +645,21 @@ void LCurve::setBatchMode (bool batchMode)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LCurve::updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI)
|
void LCurve::updateCurveBackgroundHistogram(
|
||||||
|
const LUTu& histToneCurve,
|
||||||
|
const LUTu& histLCurve,
|
||||||
|
const LUTu& histCCurve,
|
||||||
|
const LUTu& histLCAM,
|
||||||
|
const LUTu& histCCAM,
|
||||||
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histLRETI
|
||||||
|
)
|
||||||
{
|
{
|
||||||
|
|
||||||
lshape->updateBackgroundHistogram (histLCurve);
|
lshape->updateBackgroundHistogram (histLCurve);
|
||||||
ccshape->updateBackgroundHistogram (histCCurve);
|
ccshape->updateBackgroundHistogram (histCCurve);
|
||||||
// clshape->updateBackgroundHistogram (histCLurve);
|
|
||||||
// lcshape->updateBackgroundHistogram (histLLCurve);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LCurve::setAdjusterBehavior (bool bradd, bool contradd, bool satadd)
|
void LCurve::setAdjusterBehavior (bool bradd, bool contradd, bool satadd)
|
||||||
|
@ -75,10 +75,22 @@ public:
|
|||||||
|
|
||||||
void curveChanged (CurveEditor* ce);
|
void curveChanged (CurveEditor* ce);
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void avoidcolorshift_toggled ();
|
void avoidcolorshift_toggled ();
|
||||||
void lcredsk_toggled();
|
void lcredsk_toggled();
|
||||||
|
|
||||||
void updateCurveBackgroundHistogram (LUTu & histToneCurve, LUTu & histLCurve, LUTu & histCCurve,/* LUTu & histCLurve, LUTu & histLLCurve,*/ LUTu & histLCAM, LUTu & histCCAM, LUTu & histRed, LUTu & histGreen, LUTu & histBlue, LUTu & histLuma, LUTu & histLRETI);
|
void updateCurveBackgroundHistogram(
|
||||||
|
const LUTu& histToneCurve,
|
||||||
|
const LUTu& histLCurve,
|
||||||
|
const LUTu& histCCurve,
|
||||||
|
const LUTu& histLCAM,
|
||||||
|
const LUTu& histCCAM,
|
||||||
|
const LUTu& histRed,
|
||||||
|
const LUTu& histGreen,
|
||||||
|
const LUTu& histBlue,
|
||||||
|
const LUTu& histLuma,
|
||||||
|
const LUTu& histLRETI
|
||||||
|
);
|
||||||
|
|
||||||
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
class LensGeomListener
|
class LensGeomListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
virtual ~LensGeomListener() = default;
|
||||||
virtual void straightenRequested () = 0;
|
virtual void straightenRequested () = 0;
|
||||||
virtual void autoCropRequested () = 0;
|
virtual void autoCropRequested () = 0;
|
||||||
virtual double autoDistorRequested () = 0;
|
virtual double autoDistorRequested () = 0;
|
||||||
|
@ -115,7 +115,6 @@ void LocalContrast::setDefaults(const ProcParams *defParams, const ParamsEdited
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void LocalContrast::adjusterChanged(Adjuster* a, double newval)
|
void LocalContrast::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
if (listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
@ -131,6 +130,9 @@ void LocalContrast::adjusterChanged(Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LocalContrast::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void LocalContrast::enabledChanged ()
|
void LocalContrast::enabledChanged ()
|
||||||
{
|
{
|
||||||
|
@ -47,6 +47,7 @@ public:
|
|||||||
void setBatchMode(bool batchMode);
|
void setBatchMode(bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged(Adjuster *a, double newval);
|
void adjusterChanged(Adjuster *a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged();
|
void enabledChanged();
|
||||||
void setAdjusterBehavior(bool radiusAdd, bool amountAdd, bool darknessAdd, bool lightnessAdd);
|
void setAdjusterBehavior(bool radiusAdd, bool amountAdd, bool darknessAdd, bool lightnessAdd);
|
||||||
};
|
};
|
||||||
|
@ -27,12 +27,13 @@
|
|||||||
|
|
||||||
class CropWindow;
|
class CropWindow;
|
||||||
|
|
||||||
class LockablePickerToolListener {
|
class LockablePickerToolListener
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~LockablePickerToolListener () {}
|
virtual ~LockablePickerToolListener () = default;
|
||||||
|
|
||||||
/// Callback on Color Picker's visibility switch
|
/// Callback on Color Picker's visibility switch
|
||||||
virtual void switchPickerVisibility (bool isVisible) {}
|
virtual void switchPickerVisibility(bool isVisible) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LockableColorPicker : BackBuffer
|
class LockableColorPicker : BackBuffer
|
||||||
|
@ -22,13 +22,13 @@
|
|||||||
#include <gtkmm.h>
|
#include <gtkmm.h>
|
||||||
|
|
||||||
class LWButton;
|
class LWButton;
|
||||||
|
|
||||||
class LWButtonListener
|
class LWButtonListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~LWButtonListener () {}
|
virtual ~LWButtonListener() = default;
|
||||||
virtual void buttonPressed (LWButton* button, int actionCode, void* actionData) {}
|
virtual void buttonPressed(LWButton* button, int actionCode, void* actionData) = 0;
|
||||||
virtual void redrawNeeded (LWButton* button) {}
|
virtual void redrawNeeded(LWButton* button) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LWButton
|
class LWButton
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
* This file is part of RawTherapee.
|
|
||||||
*
|
|
||||||
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
|
|
||||||
*
|
|
||||||
* 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/>.
|
|
||||||
*/
|
|
||||||
#ifndef _MOUNTSELECTIONLISTENER_
|
|
||||||
#define _MOUNTSELECTIONLISTENER_
|
|
||||||
|
|
||||||
#include <glibmm.h>
|
|
||||||
|
|
||||||
class MountSelectionListener
|
|
||||||
{
|
|
||||||
|
|
||||||
public:
|
|
||||||
virtual void mountSelectionChanged (Glib::ustring mountRoot) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
@ -78,9 +78,8 @@ void PCVignette::setDefaults (const ProcParams* defParams, const ParamsEdited* p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PCVignette::adjusterChanged (Adjuster* a, double newval)
|
void PCVignette::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (listener && getEnabled()) {
|
if (listener && getEnabled()) {
|
||||||
if (a == strength) {
|
if (a == strength) {
|
||||||
listener->panelChanged (EvPCVignetteStrength, strength->getTextValue());
|
listener->panelChanged (EvPCVignetteStrength, strength->getTextValue());
|
||||||
@ -92,6 +91,10 @@ void PCVignette::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PCVignette::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void PCVignette::enabledChanged ()
|
void PCVignette::enabledChanged ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void enabledChanged ();
|
void enabledChanged ();
|
||||||
void setAdjusterBehavior (bool strengthadd, bool featheradd, bool roundnessadd);
|
void setAdjusterBehavior (bool strengthadd, bool featheradd, bool roundnessadd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
|
@ -88,14 +88,17 @@ void PerspCorrection::setDefaults (const ProcParams* defParams, const ParamsEdit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PerspCorrection::adjusterChanged (Adjuster* a, double newval)
|
void PerspCorrection::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (listener) {
|
if (listener) {
|
||||||
listener->panelChanged (EvPerspCorr, Glib::ustring::compose ("%1=%3\n%2=%4", M("TP_PERSPECTIVE_HORIZONTAL"), M("TP_PERSPECTIVE_VERTICAL"), horiz->getValue(), vert->getValue()));
|
listener->panelChanged (EvPerspCorr, Glib::ustring::compose ("%1=%3\n%2=%4", M("TP_PERSPECTIVE_HORIZONTAL"), M("TP_PERSPECTIVE_VERTICAL"), horiz->getValue(), vert->getValue()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PerspCorrection::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void PerspCorrection::setAdjusterBehavior (bool badd)
|
void PerspCorrection::setAdjusterBehavior (bool badd)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
void setBatchMode (bool batchMode);
|
void setBatchMode (bool batchMode);
|
||||||
|
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
void setAdjusterBehavior (bool badd);
|
void setAdjusterBehavior (bool badd);
|
||||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||||
};
|
};
|
||||||
|
@ -25,20 +25,23 @@
|
|||||||
|
|
||||||
class PParamsChangeListener
|
class PParamsChangeListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~PParamsChangeListener() {}
|
virtual ~PParamsChangeListener() = default;
|
||||||
virtual void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr) {}
|
virtual void procParamsChanged(
|
||||||
virtual void clearParamChanges () {}
|
const rtengine::procparams::ProcParams* params,
|
||||||
|
const rtengine::ProcEvent& ev,
|
||||||
|
const Glib::ustring& descr,
|
||||||
|
const ParamsEdited* paramsEdited = nullptr
|
||||||
|
) = 0;
|
||||||
|
virtual void clearParamChanges() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BatchPParamsChangeListener
|
class BatchPParamsChangeListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~BatchPParamsChangeListener() {}
|
virtual ~BatchPParamsChangeListener() = default;
|
||||||
virtual void beginBatchPParamsChange(int numberOfEntries) {}
|
virtual void beginBatchPParamsChange(int numberOfEntries) = 0;
|
||||||
virtual void endBatchPParamsChange() {}
|
virtual void endBatchPParamsChange() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -87,7 +87,7 @@ void PreProcess::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreProcess::adjusterChanged (Adjuster* a, double newval)
|
void PreProcess::adjusterChanged(Adjuster* a, double newval)
|
||||||
{
|
{
|
||||||
if (listener) {
|
if (listener) {
|
||||||
if (a == hdThreshold) {
|
if (a == hdThreshold) {
|
||||||
@ -96,6 +96,10 @@ void PreProcess::adjusterChanged (Adjuster* a, double newval)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PreProcess::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void PreProcess::hotPixelChanged ()
|
void PreProcess::hotPixelChanged ()
|
||||||
{
|
{
|
||||||
if (batchMode) {
|
if (batchMode) {
|
||||||
|
@ -47,7 +47,8 @@ public:
|
|||||||
|
|
||||||
void hotPixelChanged();
|
void hotPixelChanged();
|
||||||
void deadPixelChanged();
|
void deadPixelChanged();
|
||||||
void adjusterChanged (Adjuster* a, double newval);
|
void adjusterChanged(Adjuster* a, double newval);
|
||||||
|
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||||
|
|
||||||
|
|
||||||
//void adjusterChanged (Adjuster* a, double newval);
|
//void adjusterChanged (Adjuster* a, double newval);
|
||||||
|
@ -57,7 +57,7 @@ PreviewHandler::~PreviewHandler ()
|
|||||||
|
|
||||||
//----------------previewimagelistener functions--------------------
|
//----------------previewimagelistener functions--------------------
|
||||||
|
|
||||||
void PreviewHandler::setImage (rtengine::IImage8* i, double scale, rtengine::procparams::CropParams cp)
|
void PreviewHandler::setImage(rtengine::IImage8* i, double scale, const rtengine::procparams::CropParams& cp)
|
||||||
{
|
{
|
||||||
pih->pending++;
|
pih->pending++;
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ void PreviewHandler::setImage (rtengine::IImage8* i, double scale, rtengine::pro
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PreviewHandler::delImage (IImage8* i)
|
void PreviewHandler::delImage(IImage8* i)
|
||||||
{
|
{
|
||||||
pih->pending++;
|
pih->pending++;
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ void PreviewHandler::delImage (IImage8* i)
|
|||||||
idle_register.add(func, iap);
|
idle_register.add(func, iap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewHandler::imageReady (CropParams cp)
|
void PreviewHandler::imageReady(const rtengine::procparams::CropParams& cp)
|
||||||
{
|
{
|
||||||
pih->pending++;
|
pih->pending++;
|
||||||
iaimgpar* iap = new iaimgpar;
|
iaimgpar* iap = new iaimgpar;
|
||||||
|
@ -30,13 +30,13 @@
|
|||||||
|
|
||||||
class PreviewListener
|
class PreviewListener
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~PreviewListener () {}
|
virtual ~PreviewListener() = default;
|
||||||
virtual void previewImageChanged () {}
|
virtual void previewImageChanged() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PreviewHandler;
|
class PreviewHandler;
|
||||||
|
|
||||||
struct PreviewHandlerIdleHelper {
|
struct PreviewHandlerIdleHelper {
|
||||||
PreviewHandler* phandler;
|
PreviewHandler* phandler;
|
||||||
bool destroyed;
|
bool destroyed;
|
||||||
@ -72,9 +72,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
// previewimagelistener
|
// previewimagelistener
|
||||||
void setImage (rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cp);
|
void setImage(rtengine::IImage8* img, double scale, const rtengine::procparams::CropParams& cp);
|
||||||
void delImage (rtengine::IImage8* img);
|
void delImage(rtengine::IImage8* img);
|
||||||
void imageReady (rtengine::procparams::CropParams cp);
|
void imageReady(const rtengine::procparams::CropParams& cp);
|
||||||
|
|
||||||
// this function is called when a new preview image arrives from rtengine
|
// this function is called when a new preview image arrives from rtengine
|
||||||
void previewImageChanged ();
|
void previewImageChanged ();
|
||||||
|
@ -29,9 +29,7 @@
|
|||||||
class PreviewLoaderListener
|
class PreviewLoaderListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~PreviewLoaderListener()
|
virtual ~PreviewLoaderListener() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief a preview is ready
|
* @brief a preview is ready
|
||||||
@ -39,16 +37,12 @@ public:
|
|||||||
* @param dir_id directory ID this is for
|
* @param dir_id directory ID this is for
|
||||||
* @param fd entry
|
* @param fd entry
|
||||||
*/
|
*/
|
||||||
virtual void previewReady(int dir_id, FileBrowserEntry* fd)
|
virtual void previewReady(int dir_id, FileBrowserEntry* fd) = 0;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief all previews have finished loading
|
* @brief all previews have finished loading
|
||||||
*/
|
*/
|
||||||
virtual void previewsFinished(int dir_id_)
|
virtual void previewsFinished(int dir_id_) = 0;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PreviewLoader :
|
class PreviewLoader :
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user