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>;
|
||||
|
||||
template<typename T>
|
||||
class LUT :
|
||||
public rtengine::NonCopyable
|
||||
class LUT
|
||||
{
|
||||
protected:
|
||||
// list of variables ordered to improve cache speed
|
||||
@ -198,6 +197,8 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
explicit LUT(const LUT&) = delete;
|
||||
|
||||
void setClip(int flags)
|
||||
{
|
||||
clip = flags;
|
||||
@ -225,7 +226,7 @@ public:
|
||||
return size > 0 ? upperBound : 0;
|
||||
}
|
||||
|
||||
LUT<T> & operator=(LUT<T> &rhs)
|
||||
LUT<T> & operator=(const LUT<T>& rhs)
|
||||
{
|
||||
if (this != &rhs) {
|
||||
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).
|
||||
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) {
|
||||
#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)
|
||||
int wx, wy, ww, wh, ws;
|
||||
bool overrideWindow = false;
|
||||
const bool overrideWindow = cropImageListener;
|
||||
|
||||
if (cropImageListener) {
|
||||
overrideWindow = cropImageListener->getWindow(wx, wy, ww, wh, ws);
|
||||
if (overrideWindow) {
|
||||
cropImageListener->getWindow(wx, wy, ww, wh, ws);
|
||||
}
|
||||
|
||||
// re-allocate sub-images and arrays if their dimensions changed
|
||||
|
@ -21,11 +21,11 @@
|
||||
//#include <giomm.h>
|
||||
#include <helpers.h>
|
||||
|
||||
class PListener : public rtengine::ProgressListener
|
||||
class PListener :
|
||||
public rtengine::ProgressListener
|
||||
{
|
||||
|
||||
public:
|
||||
void setProgressStr (Glib::ustring str)
|
||||
void setProgressStr(const Glib::ustring& str)
|
||||
{
|
||||
std::cout << str << std::endl;
|
||||
}
|
||||
@ -33,11 +33,16 @@ public:
|
||||
{
|
||||
std::cout << p << std::endl;
|
||||
}
|
||||
void setProgressState(bool inProcessing)
|
||||
{
|
||||
}
|
||||
void error(const Glib::ustring& descr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
|
||||
if (argc < 4) {
|
||||
std::cout << "Usage: rtcmd <infile> <paramfile> <outfile>" << std::endl;
|
||||
exit(1);
|
||||
|
@ -39,14 +39,14 @@ class ProfileStoreListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~ProfileStoreListener() {}
|
||||
virtual ~ProfileStoreListener() = default;
|
||||
|
||||
/** @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. */
|
||||
virtual void updateProfileList() = 0;
|
||||
/** @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)
|
||||
|
@ -154,21 +154,20 @@ public:
|
||||
/** This listener interface is used to indicate the progress of time consuming operations */
|
||||
class ProgressListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~ProgressListener() {}
|
||||
virtual ~ProgressListener() = default;
|
||||
/** This member function is called when the percentage of the progress has been changed.
|
||||
* @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.
|
||||
* @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.
|
||||
* @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.
|
||||
* @param descr is the error message */
|
||||
virtual void error (Glib::ustring descr) {}
|
||||
virtual void error(const Glib::ustring& descr) = 0;
|
||||
};
|
||||
|
||||
class ImageSource;
|
||||
@ -219,20 +218,20 @@ public:
|
||||
class PreviewImageListener
|
||||
{
|
||||
public:
|
||||
virtual ~PreviewImageListener() {}
|
||||
virtual ~PreviewImageListener() = default;
|
||||
/** 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.
|
||||
* @param img is a pointer to the image
|
||||
* @param scale describes the current scaling applied compared to the 100% size (preview scale)
|
||||
* @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
|
||||
* 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! */
|
||||
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.
|
||||
* @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),
|
||||
@ -242,52 +241,70 @@ public:
|
||||
class DetailedCropListener
|
||||
{
|
||||
public:
|
||||
virtual ~DetailedCropListener() {}
|
||||
virtual ~DetailedCropListener() = default;
|
||||
/** 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 */
|
||||
virtual void setDetailedCrop (IImage8* img, IImage8* imgtrue, procparams::ColorManagementParams cmp,
|
||||
procparams::CropParams cp, int cx, int cy, int cw, int ch, int skip) {}
|
||||
virtual bool getWindow (int& cx, int& cy, int& cw, int& ch, int& skip)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// virtual void setPosition (int x, int y, bool update=true) {}
|
||||
|
||||
virtual void setDetailedCrop(
|
||||
IImage8* img,
|
||||
IImage8* imgtrue,
|
||||
const procparams::ColorManagementParams& cmp,
|
||||
const procparams::CropParams& cp,
|
||||
int cx,
|
||||
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.) */
|
||||
class SizeListener
|
||||
{
|
||||
public:
|
||||
virtual ~SizeListener() {}
|
||||
virtual ~SizeListener() = default;
|
||||
/** 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 h is the height of the final image (without 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) */
|
||||
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. */
|
||||
class HistogramListener
|
||||
{
|
||||
public:
|
||||
virtual ~HistogramListener() {}
|
||||
virtual ~HistogramListener() = default;
|
||||
/** 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 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 histLuma is the array of size 256 containing the histogram of the luminance channel
|
||||
* 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,
|
||||
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw, LUTu & histChroma, LUTu & histLRETI) {}
|
||||
virtual void histogramChanged(
|
||||
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). */
|
||||
class AutoExpListener
|
||||
{
|
||||
public:
|
||||
virtual ~AutoExpListener() {}
|
||||
virtual ~AutoExpListener() = default;
|
||||
/** This member function is called when the auto exposure has been recomputed.
|
||||
* @param brightness is the new brightness value (in logarithmic scale)
|
||||
* @param bright is the new ...
|
||||
@ -296,84 +313,79 @@ public:
|
||||
* @param hlcompr is the new highlight recovery amount
|
||||
* @param hlcomprthresh is the new threshold for hlcompr
|
||||
* @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
|
||||
{
|
||||
public :
|
||||
virtual ~AutoCamListener() {}
|
||||
virtual void autoCamChanged (double ccam, double ccamout) {}
|
||||
virtual void adapCamChanged (double cadap) {}
|
||||
virtual void ybCamChanged (int yb) {}
|
||||
|
||||
virtual ~AutoCamListener() = default;
|
||||
virtual void autoCamChanged(double ccam, double ccamout) = 0;
|
||||
virtual void adapCamChanged(double cadap) = 0;
|
||||
virtual void ybCamChanged(int yb) = 0;
|
||||
};
|
||||
|
||||
class AutoChromaListener
|
||||
{
|
||||
public :
|
||||
virtual ~AutoChromaListener() {}
|
||||
virtual void chromaChanged (double autchroma, double autred, double autblue) {}
|
||||
virtual void noiseChanged (double nresid, double highresid) {}
|
||||
virtual void noiseTilePrev (int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP) {}
|
||||
|
||||
virtual ~AutoChromaListener() = default;
|
||||
virtual void chromaChanged(double autchroma, double autred, double autblue) = 0;
|
||||
virtual void noiseChanged(double nresid, double highresid) = 0;
|
||||
virtual void noiseTilePrev(int tileX, int tileY, int prevX, int prevY, int sizeT, int sizeP) = 0;
|
||||
};
|
||||
|
||||
class RetinexListener
|
||||
{
|
||||
public :
|
||||
virtual ~RetinexListener() {}
|
||||
virtual void minmaxChanged (double cdma, double cdmin, double mini, double maxi, double Tmean, double Tsigma, double Tmin, double Tmax) {}
|
||||
|
||||
public:
|
||||
virtual ~RetinexListener() = default;
|
||||
virtual void minmaxChanged(double cdma, double cdmin, double mini, double maxi, double Tmean, double Tsigma, double Tmin, double Tmax) = 0;
|
||||
};
|
||||
|
||||
class AutoColorTonListener
|
||||
{
|
||||
public :
|
||||
virtual ~AutoColorTonListener() {}
|
||||
virtual void autoColorTonChanged (int bwct, int satthres, int satprot) {}
|
||||
public:
|
||||
virtual ~AutoColorTonListener() = default;
|
||||
virtual void autoColorTonChanged(int bwct, int satthres, int satprot) = 0;
|
||||
};
|
||||
|
||||
class AutoBWListener
|
||||
{
|
||||
public :
|
||||
virtual ~AutoBWListener() {}
|
||||
virtual void BWChanged (double redbw, double greenbw, double bluebw) {}
|
||||
|
||||
public:
|
||||
virtual ~AutoBWListener() = default;
|
||||
virtual void BWChanged(double redbw, double greenbw, double bluebw) = 0;
|
||||
};
|
||||
|
||||
class AutoWBListener
|
||||
{
|
||||
public :
|
||||
public:
|
||||
virtual ~AutoWBListener() = default;
|
||||
virtual void WBChanged (double temp, double green) = 0;
|
||||
virtual void WBChanged(double temp, double green) = 0;
|
||||
};
|
||||
|
||||
class FrameCountListener
|
||||
{
|
||||
public :
|
||||
public:
|
||||
virtual ~FrameCountListener() = default;
|
||||
virtual void FrameCountChanged (int n, int frameNum) = 0;
|
||||
virtual void FrameCountChanged(int n, int frameNum) = 0;
|
||||
};
|
||||
|
||||
class ImageTypeListener
|
||||
{
|
||||
public :
|
||||
public:
|
||||
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
|
||||
{
|
||||
public :
|
||||
virtual ~WaveletListener() {}
|
||||
virtual void wavChanged (double nlevel) {}
|
||||
public:
|
||||
virtual ~WaveletListener() = default;
|
||||
virtual void wavChanged(double nlevel) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
/** 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.
|
||||
* Several crops can be assigned to the same image. */
|
||||
@ -554,8 +566,7 @@ public:
|
||||
* there is no jobs left.
|
||||
* @param img is the result of the last ProcessingJob
|
||||
* @return the next ProcessingJob to process */
|
||||
virtual ProcessingJob* imageReady (IImagefloat* img) = 0;
|
||||
virtual void error (Glib::ustring message) = 0;
|
||||
virtual ProcessingJob* imageReady(IImagefloat* img) = 0;
|
||||
};
|
||||
/** 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
|
||||
|
@ -21,23 +21,28 @@
|
||||
//#include <giomm.h>
|
||||
#include <helpers.h>
|
||||
|
||||
class PListener : public rtengine::ProgressListener
|
||||
class PListener :
|
||||
public rtengine::ProgressListener
|
||||
{
|
||||
|
||||
public:
|
||||
void setProgressStr (Glib::ustring str)
|
||||
void setProgressStr(const Glib::ustring& str)
|
||||
{
|
||||
std::cout << str << std::endl;
|
||||
}
|
||||
void setProgress (double p)
|
||||
void setProgress(double p)
|
||||
{
|
||||
std::cout << p << std::endl;
|
||||
}
|
||||
void setProgressState(bool inProcessing)
|
||||
{
|
||||
}
|
||||
void error(const Glib::ustring& descr)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
|
||||
if (argc < 4) {
|
||||
std::cout << "Usage: rtcmd <infile> <paramfile> <outfile>" << std::endl;
|
||||
exit(1);
|
||||
|
@ -24,13 +24,13 @@
|
||||
#include "guiutils.h"
|
||||
|
||||
class Adjuster;
|
||||
|
||||
class AdjusterListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~AdjusterListener() {};
|
||||
virtual void adjusterChanged (Adjuster* a, double newval) {}
|
||||
virtual void adjusterAutoToggled (Adjuster* a, bool newval) {}
|
||||
virtual ~AdjusterListener() = default;
|
||||
virtual void adjusterChanged (Adjuster* a, double newval) = 0;
|
||||
virtual void adjusterAutoToggled (Adjuster* a, bool newval) = 0;
|
||||
};
|
||||
|
||||
typedef double(*double2double_fun)(double val);
|
||||
|
@ -39,6 +39,27 @@
|
||||
using namespace std;
|
||||
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)
|
||||
{
|
||||
|
||||
@ -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
|
||||
Glib::ustring fname;
|
||||
SaveFormat saveFormat;
|
||||
@ -892,22 +958,6 @@ Glib::ustring BatchQueue::autoCompleteFileName (const Glib::ustring& fileName, c
|
||||
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)
|
||||
{
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -960,27 +994,3 @@ void BatchQueue::redrawNeeded (LWButton* button)
|
||||
GThreadLock lock;
|
||||
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:
|
||||
virtual ~BatchQueueListener () {}
|
||||
virtual void queueSizeChanged (int qsize, bool queueEmptied, bool queueError, Glib::ustring queueErrorMessage) = 0;
|
||||
virtual bool canStartNext () = 0;
|
||||
virtual ~BatchQueueListener() = default;
|
||||
virtual void queueSizeChanged(int qsize, bool queueEmptied, bool queueError, const Glib::ustring& queueErrorMessage) = 0;
|
||||
virtual bool canStartNext() = 0;
|
||||
};
|
||||
|
||||
class FileCatalog;
|
||||
@ -62,9 +62,12 @@ public:
|
||||
return (!fd.empty());
|
||||
}
|
||||
|
||||
rtengine::ProcessingJob* imageReady (rtengine::IImagefloat* img);
|
||||
void error (Glib::ustring msg);
|
||||
void setProgress (double p);
|
||||
void setProgress(double p);
|
||||
void setProgressStr(const Glib::ustring& str);
|
||||
void setProgressState(bool inProcessing);
|
||||
void error(const Glib::ustring& descr);
|
||||
rtengine::ProcessingJob* imageReady(rtengine::IImagefloat* img);
|
||||
|
||||
void rightClicked (ThumbBrowserEntryBase* entry);
|
||||
void doubleClicked (ThumbBrowserEntryBase* entry);
|
||||
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())) {
|
||||
qStartStop->set_sensitive(false);
|
||||
@ -311,10 +311,9 @@ void BatchQueuePanel::stopBatchProc ()
|
||||
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()) {
|
||||
startBatchProc ();
|
||||
|
@ -59,11 +59,11 @@ public:
|
||||
|
||||
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
|
||||
void queueSizeChanged (int qsize, bool queueEmptied, bool queueError, Glib::ustring queueErrorMessage);
|
||||
bool canStartNext ();
|
||||
void queueSizeChanged(int qsize, bool queueEmptied, bool queueError, const Glib::ustring& queueErrorMessage);
|
||||
bool canStartNext();
|
||||
|
||||
void startBatchProc ();
|
||||
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)
|
||||
{
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
|
@ -46,7 +46,9 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
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 setAdjusterBehavior (bool linedenoiseadd, bool greenequiladd);
|
||||
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 ()
|
||||
{
|
||||
const int currentSelection = method->get_active_row_number();
|
||||
|
@ -80,6 +80,7 @@ public:
|
||||
void methodChanged();
|
||||
void imageNumberChanged();
|
||||
void adjusterChanged(Adjuster* a, double newval);
|
||||
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||
void checkBoxToggled(CheckBox* c, CheckValue newval);
|
||||
void pixelShiftMotionMethodChanged();
|
||||
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) {
|
||||
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)
|
||||
{
|
||||
if (c == PextwoGreen) {
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||
void checkBoxToggled (CheckBox* c, CheckValue newval);
|
||||
void setAdjusterBehavior (bool pexblackadd);
|
||||
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
|
||||
if (listener && (a == mixerRed || a == mixerGreen || a == mixerBlue || a == mixerOrange || a == mixerYellow || a == mixerMagenta || a == mixerPurple || a == mixerCyan) ) {
|
||||
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 ()
|
||||
{
|
||||
if (!batchMode) {
|
||||
|
@ -53,6 +53,7 @@ public:
|
||||
|
||||
void updateRGBLabel ();
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||
void setAdjusterBehavior (bool bwadd, bool bwgadd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
void enabledcc_toggled ();
|
||||
|
@ -28,8 +28,8 @@ class BQEntryUpdateListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~BQEntryUpdateListener () {}
|
||||
virtual void updateImage (guint8* img, int w, int h, int origw, int origh, guint8* newOPreview) {}
|
||||
virtual ~BQEntryUpdateListener() = default;
|
||||
virtual void updateImage(guint8* img, int w, int h, int origw, int origh, guint8* newOPreview) = 0;
|
||||
};
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void setAdjusterBehavior (bool badd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
};
|
||||
|
@ -33,10 +33,9 @@ enum class CheckValue {
|
||||
|
||||
class CheckBoxListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~CheckBoxListener() {};
|
||||
virtual void checkBoxToggled (CheckBox* c, CheckValue newval) {}
|
||||
virtual ~CheckBoxListener() = default;
|
||||
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()) {
|
||||
@ -179,6 +179,9 @@ void ChMixer::adjusterChanged (Adjuster* a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
void ChMixer::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
void ChMixer::enabledChanged()
|
||||
{
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void setAdjusterBehavior (bool rgbadd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
void enabledChanged();
|
||||
|
@ -1544,9 +1544,8 @@ void ColorAppearance::colorForValue (double valX, double valY, enum ColorCaller:
|
||||
caller->ccBlue = double (B);
|
||||
}
|
||||
|
||||
void ColorAppearance::adjusterChanged (Adjuster* a, double newval)
|
||||
void ColorAppearance::adjusterChanged(Adjuster* a, double newval)
|
||||
{
|
||||
|
||||
if (listener && (multiImage || getEnabled()) ) {
|
||||
if (a == degree) {
|
||||
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 (degree->getAutoInconsistent()) {
|
||||
degree->setAutoInconsistent (false);
|
||||
@ -1844,11 +1842,21 @@ void ColorAppearance::setBatchMode (bool 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);
|
||||
shape3->updateBackgroundHistogram (histCCAM);
|
||||
shape->updateBackgroundHistogram(histLCAM);
|
||||
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 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);
|
||||
void updateToolState (std::vector<int> &tpOpen);
|
||||
void writeOptions (std::vector<int> &tpOpen);
|
||||
|
@ -318,7 +318,7 @@ ColorToning::ColorToning () : FoldableToolPanel(this, "colortoning", M("TP_COLOR
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
// LAB grid
|
||||
auto m = ProcEventMapper::getInstance();
|
||||
auto m = ProcEventMapper::getInstance();
|
||||
EvColorToningLabGridValue = m->newEvent(RGBCURVE, "HISTORY_MSG_COLORTONING_LABGRID_VALUE");
|
||||
labgridBox = Gtk::manage(new Gtk::HBox());
|
||||
labgrid = Gtk::manage(new LabGrid(EvColorToningLabGridValue));
|
||||
@ -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)
|
||||
{
|
||||
nextbw = bwct;
|
||||
@ -731,40 +724,32 @@ bool ColorToning::CTComp_ ()
|
||||
return false;
|
||||
}
|
||||
|
||||
void ColorToning::adjusterChanged (Adjuster* a, double newval)
|
||||
void ColorToning::adjusterChanged (ThresholdAdjuster* a, double newBottom, double newTop)
|
||||
{
|
||||
|
||||
if (!listener || !getEnabled()) {
|
||||
return;
|
||||
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))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
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::adjusterChanged(ThresholdAdjuster* a, double newBottomLeft, double newTopLeft, double newBottomRight, double newTopRight)
|
||||
{
|
||||
}
|
||||
|
||||
void ColorToning::adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop)
|
||||
{
|
||||
}
|
||||
|
||||
void ColorToning::adjusterChanged(ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight)
|
||||
{
|
||||
}
|
||||
|
||||
void ColorToning::adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR)
|
||||
{
|
||||
}
|
||||
|
||||
//Two Color changed
|
||||
@ -829,7 +814,7 @@ void ColorToning::methodChanged ()
|
||||
|
||||
if (!batchMode) {
|
||||
labgridBox->hide();
|
||||
|
||||
|
||||
if (method->get_active_row_number() == 0) { // Lab
|
||||
colorSep->show();
|
||||
colorCurveEditorG->show();
|
||||
@ -1141,6 +1126,45 @@ void ColorToning::trimValues (rtengine::procparams::ProcParams* pp)
|
||||
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)
|
||||
{
|
||||
ToolPanel::setBatchMode (batchMode);
|
||||
|
@ -32,13 +32,19 @@ public:
|
||||
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
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 neutral_pressed ();
|
||||
//void neutralCurves_pressed ();
|
||||
void autoColorTonChanged (int bwct, int satthres, int satprot);
|
||||
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 curveChanged (CurveEditor* ce);
|
||||
void autosatChanged ();
|
||||
@ -51,7 +57,7 @@ public:
|
||||
void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
||||
|
||||
void setListener(ToolPanelListener *tpl);
|
||||
|
||||
|
||||
private:
|
||||
bool resetPressed(GdkEventButton* event);
|
||||
|
||||
|
@ -728,7 +728,7 @@ void Crop::setDimensions (int mw, int mh)
|
||||
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 {
|
||||
Crop* crop;
|
||||
@ -1261,9 +1261,8 @@ void Crop::cropManipReady ()
|
||||
idle_register.add(notifyListenerUI, this);
|
||||
}
|
||||
|
||||
double Crop::getRatio ()
|
||||
double Crop::getRatio () const
|
||||
{
|
||||
|
||||
double r = -1.0;
|
||||
|
||||
if (!fixr->get_active()) {
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
void cropResized (int &x, int &y, int& x2, int& y2);
|
||||
void cropManipReady ();
|
||||
bool inImageArea (int x, int y);
|
||||
double getRatio ();
|
||||
double getRatio () const;
|
||||
|
||||
void setCropPanelListener (CropPanelListener* cl)
|
||||
{
|
||||
|
@ -23,21 +23,21 @@ class CropGUIListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~CropGUIListener() {}
|
||||
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 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 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 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 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 cropResized (int &x, int &y, int& x2, int& y2) = 0;
|
||||
virtual void cropManipReady () = 0;
|
||||
virtual bool inImageArea (int x, int y) = 0;
|
||||
virtual double getRatio () = 0;
|
||||
virtual ~CropGUIListener() = default;
|
||||
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 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 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 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 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 cropResized(int &x, int &y, int& x2, int& y2) = 0;
|
||||
virtual void cropManipReady() = 0;
|
||||
virtual bool inImageArea(int x, int y) = 0;
|
||||
virtual double getRatio() const = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -106,15 +106,9 @@ void CropHandler::newImage (StagedImageProcessor* ipc_, bool isDetailWindow)
|
||||
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 ();
|
||||
|
||||
// this should be put into an idle source!!!
|
||||
/* if (listener)
|
||||
listener->cropWindowChanged ();
|
||||
*/
|
||||
}
|
||||
|
||||
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,
|
||||
rtengine::procparams::CropParams cp, int ax, int ay, int aw, int ah, int askip)
|
||||
void CropHandler::setDetailedCrop(
|
||||
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) {
|
||||
return;
|
||||
}
|
||||
@ -406,9 +408,8 @@ void CropHandler::setDetailedCrop (IImage8* im, IImage8* imtrue, rtengine::procp
|
||||
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;
|
||||
cwy = cropY;
|
||||
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;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void CropHandler::update ()
|
||||
|
@ -86,9 +86,19 @@ public:
|
||||
}
|
||||
|
||||
// DetailedCropListener interface
|
||||
void setDetailedCrop (rtengine::IImage8* im, rtengine::IImage8* imworking, rtengine::procparams::ColorManagementParams cmp,
|
||||
rtengine::procparams::CropParams cp, int cx, int cy, int cw, int ch, int skip);
|
||||
bool getWindow (int& cwx, int& cwy, int& cww, int& cwh, int& cskip);
|
||||
void setDetailedCrop(
|
||||
rtengine::IImage8* im,
|
||||
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
|
||||
void sizeChanged (int w, int h, int ow, int oh);
|
||||
|
||||
|
@ -32,15 +32,15 @@
|
||||
#include "edit.h"
|
||||
|
||||
class CropWindow;
|
||||
|
||||
class CropWindowListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~CropWindowListener() {}
|
||||
virtual void cropPositionChanged (CropWindow*) {}
|
||||
virtual void cropWindowSizeChanged (CropWindow*) {}
|
||||
virtual void cropZoomChanged (CropWindow*) {}
|
||||
virtual void initialImageArrived () {}
|
||||
virtual ~CropWindowListener() = default;
|
||||
virtual void cropPositionChanged(CropWindow*) = 0;
|
||||
virtual void cropWindowSizeChanged(CropWindow*) = 0;
|
||||
virtual void cropZoomChanged(CropWindow*) = 0;
|
||||
virtual void initialImageArrived() = 0;
|
||||
};
|
||||
|
||||
class ImageArea;
|
||||
|
@ -254,7 +254,7 @@ void CurveEditor::setUnChanged (bool uc)
|
||||
/*
|
||||
* Update the backgrounds histograms
|
||||
*/
|
||||
void CurveEditor::updateBackgroundHistogram (LUTu & hist)
|
||||
void CurveEditor::updateBackgroundHistogram(const LUTu& hist)
|
||||
{
|
||||
// Copy the histogram in the curve editor cache
|
||||
if (hist) {
|
||||
@ -265,7 +265,7 @@ void CurveEditor::updateBackgroundHistogram (LUTu & hist)
|
||||
}
|
||||
|
||||
// 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
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
void curveTypeToggled();
|
||||
bool isUnChanged ();
|
||||
void setUnChanged (bool uc);
|
||||
void updateBackgroundHistogram (LUTu & hist);
|
||||
void updateBackgroundHistogram(const LUTu& hist);
|
||||
|
||||
void setLeftBarColorProvider(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 (a == radius) {
|
||||
@ -162,6 +161,10 @@ void Defringe::adjusterChanged (Adjuster* a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
void Defringe::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
void Defringe::enabledChanged ()
|
||||
{
|
||||
|
||||
|
@ -50,6 +50,7 @@ public:
|
||||
void curveChanged ();
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged ();
|
||||
virtual void colorForValue (double valX, double valY, enum ColorCaller::ElemType elemType, int callerId, ColorCaller* caller);
|
||||
|
||||
|
@ -1154,14 +1154,17 @@ void DiagonalCurveEditorSubGroup::shcChanged ()
|
||||
/*
|
||||
* Listener
|
||||
*/
|
||||
void DiagonalCurveEditorSubGroup::adjusterChanged (Adjuster* a, double newval)
|
||||
void DiagonalCurveEditorSubGroup::adjusterChanged(Adjuster* a, double newval)
|
||||
{
|
||||
|
||||
paramCurve->setPoints (getCurveFromGUI(DCT_Parametric));
|
||||
storeDisplayedCurve();
|
||||
parent->curveChanged ();
|
||||
}
|
||||
|
||||
void DiagonalCurveEditorSubGroup::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* Listener called when the mouse is over a parametric curve's slider
|
||||
*/
|
||||
|
@ -105,6 +105,7 @@ protected:
|
||||
const std::vector<double> getCurveFromGUI (int type);
|
||||
void shcChanged ();
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
bool adjusterEntered (GdkEventCrossing* ev, int ac);
|
||||
bool adjusterLeft (GdkEventCrossing* ev, int ac);
|
||||
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)
|
||||
{
|
||||
|
||||
Glib::ustring costr;
|
||||
costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
|
||||
const Glib::ustring costr = Glib::ustring::format (std::setw(3), std::fixed, std::setprecision(2), a->getValue());
|
||||
|
||||
if (listener && getEnabled()) {
|
||||
if (a == Ldetail) {
|
||||
@ -1034,6 +1032,10 @@ void DirPyrDenoise::adjusterChanged (Adjuster* a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
void DirPyrDenoise::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
void DirPyrDenoise::enabledChanged ()
|
||||
{
|
||||
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
void autoOpenCurve ();
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged ();
|
||||
void medianChanged ();
|
||||
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()) ) {
|
||||
listener->panelChanged (EvDirPyrEqualizerHueskin, hueskin->getHistoryString());
|
||||
}
|
||||
}
|
||||
|
||||
void DirPyrEqualizer::adjusterChanged2(ThresholdAdjuster* a, int newBottomL, int newTopL, int newBottomR, int newTopR)
|
||||
{
|
||||
}
|
||||
|
||||
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 (a == threshold) {
|
||||
listener->panelChanged (EvDirPyrEqualizerThreshold,
|
||||
@ -359,6 +373,10 @@ void DirPyrEqualizer::adjusterChanged (Adjuster* a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
void DirPyrEqualizer::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
void DirPyrEqualizer::enabledChanged ()
|
||||
{
|
||||
|
||||
|
@ -63,15 +63,20 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
void setAdjusterBehavior (bool multiplieradd, bool thresholdadd, bool skinadd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
void adjusterChanged (ThresholdAdjuster* a, int newBottomLeft, int newTopLeft, int newBottomRight, int newTopRight);
|
||||
// void algoChanged ();
|
||||
void cbdlMethodChanged();
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged();
|
||||
void gamutlabToggled ();
|
||||
void lumaneutralPressed ();
|
||||
void lumacontrastPlusPressed ();
|
||||
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
|
||||
|
@ -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) {
|
||||
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)
|
||||
{
|
||||
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled (Adjuster* a, bool newval);
|
||||
void setAdjusterBehavior (bool vadd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
void idPressed ();
|
||||
|
@ -1159,7 +1159,12 @@ Glib::ustring EditorPanel::getFileName ()
|
||||
}
|
||||
|
||||
// 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)
|
||||
@ -1178,7 +1183,28 @@ void EditorPanel::procParamsChanged (rtengine::procparams::ProcParams* params, r
|
||||
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 {
|
||||
bool inProcessing;
|
||||
@ -1217,21 +1243,63 @@ void EditorPanel::setProgressState (bool inProcessing)
|
||||
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;
|
||||
s->str = str;
|
||||
s->val = -1;
|
||||
s->pProgress = progressLabel;
|
||||
idle_register.add (setprogressStrUI, s);
|
||||
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::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
|
||||
@ -1286,61 +1354,6 @@ void EditorPanel::refreshProcessingState (bool inProcessingP)
|
||||
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 ()
|
||||
{
|
||||
|
||||
@ -2249,15 +2262,28 @@ void EditorPanel::tbBeforeLock_toggled ()
|
||||
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,
|
||||
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw, LUTu & histChroma, LUTu & histLRETI)
|
||||
void EditorPanel::histogramChanged(
|
||||
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) {
|
||||
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()
|
||||
|
@ -45,13 +45,14 @@ struct EditorPanelIdleHelper {
|
||||
};
|
||||
|
||||
class RTWindow;
|
||||
|
||||
class EditorPanel final :
|
||||
public Gtk::VBox,
|
||||
public PParamsChangeListener,
|
||||
public rtengine::ProgressListener,
|
||||
public ThumbnailListener,
|
||||
public HistoryBeforeLineListener,
|
||||
public rtengine::HistogramListener
|
||||
public Gtk::VBox,
|
||||
public PParamsChangeListener,
|
||||
public rtengine::ProgressListener,
|
||||
public ThumbnailListener,
|
||||
public HistoryBeforeLineListener,
|
||||
public rtengine::HistogramListener
|
||||
{
|
||||
public:
|
||||
explicit EditorPanel (FilePanel* filePanel = nullptr);
|
||||
@ -81,16 +82,24 @@ public:
|
||||
{
|
||||
return realized;
|
||||
}
|
||||
// progresslistener interface
|
||||
void setProgress (double p);
|
||||
void setProgressStr (Glib::ustring str);
|
||||
void setProgressState (bool inProcessing);
|
||||
void error (Glib::ustring title, Glib::ustring descr);
|
||||
void displayError (Glib::ustring title, Glib::ustring descr); // this is called by error in the gtk thread
|
||||
// ProgressListener interface
|
||||
void setProgress(double p);
|
||||
void setProgressStr(const Glib::ustring& str);
|
||||
void setProgressState(bool inProcessing);
|
||||
void error(const Glib::ustring& descr);
|
||||
|
||||
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
|
||||
|
||||
// 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
|
||||
void procParamsChanged (Thumbnail* thm, int whoChangedIt);
|
||||
@ -99,8 +108,22 @@ public:
|
||||
void historyBeforeLineChanged (const rtengine::procparams::ProcParams& params);
|
||||
|
||||
// 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,
|
||||
LUTu & histRedRaw, LUTu & histGreenRaw, LUTu & histBlueRaw, LUTu & histChroma, LUTu & histLRETI);
|
||||
void histogramChanged(
|
||||
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
|
||||
void info_toggled ();
|
||||
|
@ -143,7 +143,7 @@ void EdgePreservingDecompositionUI::setDefaults(const ProcParams *defParams, con
|
||||
|
||||
void EdgePreservingDecompositionUI::adjusterChanged(Adjuster* a, double newval)
|
||||
{
|
||||
if(listener && getEnabled()) {
|
||||
if (listener && getEnabled()) {
|
||||
if(a == strength) {
|
||||
listener->panelChanged(EvEPDStrength, Glib::ustring::format(std::setw(2), std::fixed, std::setprecision(2), a->getValue()));
|
||||
} 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 ()
|
||||
{
|
||||
if (listener) {
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged ();
|
||||
void setAdjusterBehavior (bool stAdd, bool gAdd, bool esAdd, bool scAdd, bool rAdd);
|
||||
};
|
||||
|
@ -26,9 +26,10 @@
|
||||
|
||||
class ExportPanelListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual void exportRequested () {}
|
||||
virtual ~ExportPanelListener() = default;
|
||||
|
||||
virtual void exportRequested() = 0;
|
||||
};
|
||||
|
||||
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 ()
|
||||
{
|
||||
if (listener) {
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged ();
|
||||
void setAdjusterBehavior(bool amountAdd, bool thresholdAdd, bool anchorAdd);
|
||||
};
|
||||
|
@ -1991,7 +1991,11 @@ void FileBrowser::setExportPanel (ExportPanel* expanel)
|
||||
exportPanel->setExportPanelListener (this);
|
||||
}
|
||||
|
||||
void FileBrowser::updateProfileList ()
|
||||
void FileBrowser::storeCurrentValue()
|
||||
{
|
||||
}
|
||||
|
||||
void FileBrowser::updateProfileList()
|
||||
{
|
||||
// submenu applmenu
|
||||
int p = 0;
|
||||
@ -2085,6 +2089,10 @@ void FileBrowser::updateProfileList ()
|
||||
subMenuList.clear();
|
||||
}
|
||||
|
||||
void FileBrowser::restoreValue()
|
||||
{
|
||||
}
|
||||
|
||||
void FileBrowser::openRequested( std::vector<FileBrowserEntry*> mselected)
|
||||
{
|
||||
std::vector<Thumbnail*> entries;
|
||||
|
@ -34,23 +34,20 @@
|
||||
class ProfileStoreLabel;
|
||||
class FileBrowser;
|
||||
class FileBrowserEntry;
|
||||
|
||||
class FileBrowserListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~FileBrowserListener () {}
|
||||
virtual void filterApplied () {}
|
||||
virtual void openRequested (std::vector<Thumbnail*> tbe) {}
|
||||
virtual void developRequested (std::vector<FileBrowserEntry*> tbe, bool fastmode) {}
|
||||
virtual void renameRequested (std::vector<FileBrowserEntry*> tbe) {}
|
||||
virtual void deleteRequested (std::vector<FileBrowserEntry*> tbe, bool inclBatchProcessed) {}
|
||||
virtual void copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool moveRequested) {}
|
||||
virtual void selectionChanged (std::vector<Thumbnail*> tbe) {}
|
||||
virtual void clearFromCacheRequested(std::vector<FileBrowserEntry*> tbe, bool leavenotrace) {}
|
||||
virtual bool isInTabMode ()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
virtual ~FileBrowserListener() = default;
|
||||
virtual void filterApplied() = 0;
|
||||
virtual void openRequested(const std::vector<Thumbnail*>& tbe) = 0;
|
||||
virtual void developRequested(const std::vector<FileBrowserEntry*>& tbe, bool fastmode) = 0;
|
||||
virtual void renameRequested(const std::vector<FileBrowserEntry*>& tbe) = 0;
|
||||
virtual void deleteRequested(const std::vector<FileBrowserEntry*>& tbe, bool inclBatchProcessed) = 0;
|
||||
virtual void copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, bool moveRequested) = 0;
|
||||
virtual void selectionChanged(const std::vector<Thumbnail*>& tbe) = 0;
|
||||
virtual void clearFromCacheRequested(const std::vector<FileBrowserEntry*>& tbe, bool leavenotrace) = 0;
|
||||
virtual bool isInTabMode() const = 0;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -203,7 +200,9 @@ public:
|
||||
// exportpanel interface
|
||||
void exportRequested();
|
||||
|
||||
void updateProfileList ();
|
||||
void storeCurrentValue();
|
||||
void updateProfileList();
|
||||
void restoreValue();
|
||||
|
||||
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) {
|
||||
return;
|
||||
@ -260,7 +260,7 @@ void FileBrowserEntry::updateImage (rtengine::IImage8* img, double scale, rtengi
|
||||
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);
|
||||
|
||||
|
@ -99,8 +99,8 @@ public:
|
||||
// thumbnaillistener interface
|
||||
void procParamsChanged (Thumbnail* thm, int whoChangedIt);
|
||||
// thumbimageupdatelistener interface
|
||||
void updateImage (rtengine::IImage8* img, double scale, 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);
|
||||
void _updateImage(rtengine::IImage8* img, double scale, const rtengine::procparams::CropParams& cropParams); // inside gtk thread
|
||||
|
||||
virtual bool motionNotify (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)
|
||||
{
|
||||
|
||||
@ -962,9 +950,19 @@ int openRequestedUI (void* p)
|
||||
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;
|
||||
params->catalog = this;
|
||||
params->tmb = tmb;
|
||||
@ -976,9 +974,8 @@ void FileCatalog::openRequested (std::vector<Thumbnail*> tmb)
|
||||
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()) {
|
||||
return;
|
||||
}
|
||||
@ -1017,15 +1014,12 @@ void FileCatalog::deleteRequested (std::vector<FileBrowserEntry*> tbe, bool inc
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void FileCatalog::copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool moveRequested)
|
||||
void FileCatalog::copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, bool moveRequested)
|
||||
{
|
||||
|
||||
if (tbe.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Glib::ustring fc_title;
|
||||
|
||||
if (moveRequested) {
|
||||
@ -1129,9 +1123,9 @@ void FileCatalog::copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool m
|
||||
_refreshProgressBar();
|
||||
} // Gtk::RESPONSE_OK
|
||||
}
|
||||
void FileCatalog::developRequested (std::vector<FileBrowserEntry*> tbe, bool fastmode)
|
||||
{
|
||||
|
||||
void FileCatalog::developRequested(const std::vector<FileBrowserEntry*>& tbe, bool fastmode)
|
||||
{
|
||||
if (listener) {
|
||||
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());
|
||||
|
||||
for (size_t i = 0; i < tbe.size(); i++) {
|
||||
@ -1333,9 +1312,15 @@ void FileCatalog::renameRequested (std::vector<FileBrowserEntry*> tbe)
|
||||
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()) {
|
||||
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)
|
||||
{
|
||||
|
||||
@ -1966,12 +1956,8 @@ void FileCatalog::refreshEditedState (const std::set<Glib::ustring>& efiles)
|
||||
fileBrowser->refreshEditedState (efiles);
|
||||
}
|
||||
|
||||
void FileCatalog::selectionChanged (std::vector<Thumbnail*> tbe)
|
||||
void FileCatalog::exportRequested()
|
||||
{
|
||||
|
||||
if (fslistener) {
|
||||
fslistener->selectionChanged (tbe);
|
||||
}
|
||||
}
|
||||
|
||||
// Called within GTK UI thread
|
||||
@ -1991,6 +1977,15 @@ void FileCatalog::setFilterPanel (FilterPanel* fpanel)
|
||||
filterPanel->set_sensitive (false);
|
||||
filterPanel->setFilterPanelListener (this);
|
||||
}
|
||||
|
||||
void FileCatalog::setExportPanel(ExportPanel* expanel)
|
||||
{
|
||||
exportPanel = expanel;
|
||||
exportPanel->set_sensitive (false);
|
||||
exportPanel->setExportPanelListener (this);
|
||||
fileBrowser->setExportPanel(expanel);
|
||||
}
|
||||
|
||||
void FileCatalog::trashChanged ()
|
||||
{
|
||||
if (trashIsEmpty()) {
|
||||
|
@ -212,13 +212,16 @@ public:
|
||||
void refreshThumbImages ();
|
||||
void refreshHeight ();
|
||||
|
||||
void openRequested (std::vector<Thumbnail*> tbe);
|
||||
void deleteRequested (std::vector<FileBrowserEntry*> tbe, bool inclBatchProcessed);
|
||||
void copyMoveRequested (std::vector<FileBrowserEntry*> tbe, bool moveRequested);
|
||||
void developRequested (std::vector<FileBrowserEntry*> tbe, bool fastmode);
|
||||
void renameRequested (std::vector<FileBrowserEntry*> tbe);
|
||||
void clearFromCacheRequested(std::vector<FileBrowserEntry*> tbe, bool leavenotrace);
|
||||
void selectionChanged (std::vector<Thumbnail*> tbe);
|
||||
void filterApplied();
|
||||
void openRequested(const std::vector<Thumbnail*>& tbe);
|
||||
void deleteRequested(const std::vector<FileBrowserEntry*>& tbe, bool inclBatchProcessed);
|
||||
void copyMoveRequested(const std::vector<FileBrowserEntry*>& tbe, bool moveRequested);
|
||||
void developRequested(const std::vector<FileBrowserEntry*>& tbe, bool fastmode);
|
||||
void renameRequested(const std::vector<FileBrowserEntry*>& tbe);
|
||||
void selectionChanged(const std::vector<Thumbnail*>& tbe);
|
||||
void clearFromCacheRequested(const std::vector<FileBrowserEntry*>& tbe, bool leavenotrace);
|
||||
bool isInTabMode() const;
|
||||
|
||||
void emptyTrash ();
|
||||
bool trashIsEmpty ();
|
||||
|
||||
@ -277,11 +280,6 @@ public:
|
||||
|
||||
bool handleShortcutKey (GdkEventKey* event);
|
||||
|
||||
bool isInTabMode()
|
||||
{
|
||||
return inTabMode;
|
||||
}
|
||||
|
||||
bool CheckSidePanelsVisibility();
|
||||
void toggleSidePanels();
|
||||
void toggleLeftPanel();
|
||||
@ -289,7 +287,6 @@ public:
|
||||
|
||||
void showToolBar();
|
||||
void hideToolBar();
|
||||
void filterApplied();
|
||||
|
||||
#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);
|
||||
|
@ -228,7 +228,6 @@ void FilePanel::on_NB_switch_page(Gtk::Widget* page, guint page_num)
|
||||
|
||||
bool FilePanel::fileSelected (Thumbnail* thm)
|
||||
{
|
||||
|
||||
if (!parent) {
|
||||
return false;
|
||||
}
|
||||
@ -258,6 +257,16 @@ bool FilePanel::fileSelected (Thumbnail* thm)
|
||||
sigc::bind(sigc::mem_fun(*this, &FilePanel::imageLoaded), thm, ld) );
|
||||
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 )
|
||||
{
|
||||
|
||||
@ -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 ()
|
||||
{
|
||||
|
||||
|
@ -36,8 +36,7 @@ class RTWindow;
|
||||
|
||||
class FilePanel final :
|
||||
public Gtk::HPaned,
|
||||
public FileSelectionListener,
|
||||
public PParamsChangeListener
|
||||
public FileSelectionListener
|
||||
{
|
||||
public:
|
||||
FilePanel ();
|
||||
@ -72,8 +71,8 @@ public:
|
||||
void saveOptions ();
|
||||
|
||||
// interface fileselectionlistener
|
||||
bool fileSelected (Thumbnail* thm);
|
||||
bool addBatchQueueJobs ( std::vector<BatchQueueEntry*> &entries );
|
||||
bool fileSelected(Thumbnail* thm);
|
||||
bool addBatchQueueJobs(const std::vector<BatchQueueEntry*>& entries);
|
||||
|
||||
void optionsChanged ();
|
||||
bool imageLoaded( Thumbnail* thm, ProgressConnector<rtengine::InitialImage*> * );
|
||||
|
@ -19,13 +19,13 @@
|
||||
#ifndef _FILESELECTIONCHANGELISTENER_
|
||||
#define _FILESELECTIONCHANGELISTENER_
|
||||
|
||||
#include "thumbnail.h"
|
||||
class Thumbnail;
|
||||
|
||||
class FileSelectionChangeListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual void selectionChanged (const std::vector<Thumbnail*>& selected) {}
|
||||
virtual ~FileSelectionChangeListener() = default;
|
||||
virtual void selectionChanged(const std::vector<Thumbnail*>& selected) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -19,15 +19,15 @@
|
||||
#ifndef _FILESELECTIONLISTENER_
|
||||
#define _FILESELECTIONLISTENER_
|
||||
|
||||
#include "thumbnail.h"
|
||||
#include "batchqueueentry.h"
|
||||
class Thumbnail;
|
||||
class BatchQueueEntry;
|
||||
|
||||
class FileSelectionListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual bool fileSelected (Thumbnail* thm) = 0;
|
||||
virtual bool addBatchQueueJobs ( std::vector<BatchQueueEntry*> &entries ) = 0;
|
||||
virtual ~FileSelectionListener() = default;
|
||||
virtual bool fileSelected(Thumbnail* thm) = 0;
|
||||
virtual bool addBatchQueueJobs(const std::vector<BatchQueueEntry*>& entries) = 0;
|
||||
};
|
||||
|
||||
#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()) ) {
|
||||
Glib::ustring value = a->getTextValue();
|
||||
listener->panelChanged ( EvFilmSimulationStrength, value );
|
||||
if (listener && (multiImage || getEnabled())) {
|
||||
const Glib::ustring value = a->getTextValue();
|
||||
listener->panelChanged(EvFilmSimulationStrength, value);
|
||||
}
|
||||
}
|
||||
|
||||
void FilmSimulation::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
void FilmSimulation::setBatchMode( bool batchMode )
|
||||
{
|
||||
ToolPanel::setBatchMode( batchMode );
|
||||
|
@ -53,12 +53,13 @@ class FilmSimulation : public ToolParamBlock, public AdjusterListener, public Fo
|
||||
public:
|
||||
FilmSimulation();
|
||||
|
||||
void adjusterChanged( Adjuster* a, double newval );
|
||||
void setBatchMode( bool batchMode );
|
||||
void read( const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr );
|
||||
void write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr );
|
||||
void setAdjusterBehavior( bool strength );
|
||||
void trimValues( rtengine::procparams::ProcParams* pp );
|
||||
void adjusterChanged(Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void setBatchMode(bool batchMode);
|
||||
void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr);
|
||||
void write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr);
|
||||
void setAdjusterBehavior(bool strength);
|
||||
void trimValues(rtengine::procparams::ProcParams* pp);
|
||||
|
||||
private:
|
||||
void onClutSelected();
|
||||
|
@ -24,9 +24,9 @@
|
||||
|
||||
class FilterPanelListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual void exifFilterChanged () {}
|
||||
virtual ~FilterPanelListener() = default;
|
||||
virtual void exifFilterChanged () = 0;
|
||||
};
|
||||
|
||||
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) {
|
||||
|
||||
Glib::ustring value = a->getTextValue();
|
||||
const Glib::ustring value = a->getTextValue();
|
||||
|
||||
if (a == flatFieldBlurRadius) {
|
||||
listener->panelChanged (EvFlatFieldBlurRadius, value);
|
||||
@ -248,7 +247,6 @@ void FlatField::adjusterChanged (Adjuster* a, double newval)
|
||||
|
||||
void FlatField::adjusterAutoToggled (Adjuster* a, bool newval)
|
||||
{
|
||||
|
||||
if (multiImage) {
|
||||
if (flatFieldClipControl->getAutoInconsistent()) {
|
||||
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()) {
|
||||
|
||||
@ -266,6 +265,10 @@ void Gradient::adjusterChanged (Adjuster* a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
void Gradient::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
void Gradient::enabledChanged ()
|
||||
{
|
||||
|
||||
|
@ -43,6 +43,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged ();
|
||||
void setAdjusterBehavior (bool degreeadd, bool featheradd, bool strengthadd, bool centeradd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
|
@ -345,7 +345,7 @@ void HistogramPanel::reorder (Gtk::PositionType align)
|
||||
}
|
||||
|
||||
// DrawModeListener interface:
|
||||
void HistogramPanel::toggle_button_mode ()
|
||||
void HistogramPanel::toggleButtonMode ()
|
||||
{
|
||||
if (options.histogramDrawMode == 0)
|
||||
showMode->set_image(*mode0Image);
|
||||
@ -734,7 +734,16 @@ void HistogramArea::updateOptions (bool r, bool g, bool b, bool l, bool c, bool
|
||||
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) {
|
||||
rhist = histRed;
|
||||
@ -1042,7 +1051,7 @@ bool HistogramArea::on_button_press_event (GdkEventButton* event)
|
||||
options.histogramDrawMode = (options.histogramDrawMode + 1) % 3;
|
||||
|
||||
if (myDrawModeListener) {
|
||||
myDrawModeListener->toggle_button_mode ();
|
||||
myDrawModeListener->toggleButtonMode ();
|
||||
}
|
||||
|
||||
updateBackBuffer ();
|
||||
|
@ -110,8 +110,8 @@ private:
|
||||
class DrawModeListener
|
||||
{
|
||||
public:
|
||||
virtual ~DrawModeListener() {}
|
||||
virtual void toggle_button_mode () {}
|
||||
virtual ~DrawModeListener() = default;
|
||||
virtual void toggleButtonMode() = 0;
|
||||
};
|
||||
|
||||
class HistogramArea : public Gtk::DrawingArea, public BackBuffer, private HistogramScaling
|
||||
@ -144,7 +144,16 @@ public:
|
||||
~HistogramArea();
|
||||
|
||||
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 on_realize();
|
||||
bool on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr);
|
||||
@ -209,9 +218,17 @@ public:
|
||||
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
|
||||
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);
|
||||
|
||||
// drawModeListener interface
|
||||
void toggle_button_mode ();
|
||||
void toggleButtonMode ();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -154,12 +154,6 @@ void History::initHistory ()
|
||||
bookmarkModel->clear ();
|
||||
}
|
||||
|
||||
void History::clearParamChanges ()
|
||||
{
|
||||
|
||||
initHistory ();
|
||||
}
|
||||
|
||||
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
|
||||
if (ev == EvHistoryBrowsed || ev == EvMonitorTransform) {
|
||||
return;
|
||||
@ -300,6 +298,11 @@ void History::procParamsChanged (ProcParams* params, ProcEvent ev, Glib::ustring
|
||||
selchangebm.block (false);
|
||||
}
|
||||
|
||||
void History::clearParamChanges ()
|
||||
{
|
||||
initHistory ();
|
||||
}
|
||||
|
||||
void History::addBookmarkWithText (Glib::ustring text)
|
||||
{
|
||||
|
||||
|
@ -27,9 +27,9 @@
|
||||
|
||||
class HistoryBeforeLineListener
|
||||
{
|
||||
|
||||
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
|
||||
@ -106,7 +106,12 @@ public:
|
||||
}
|
||||
|
||||
// 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 historySelectionChanged ();
|
||||
|
@ -29,7 +29,7 @@
|
||||
#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:
|
||||
|
@ -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 ||
|
||||
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()
|
||||
{
|
||||
if (primaries->get_active_row_number() > 0) {
|
||||
|
@ -91,7 +91,8 @@ private:
|
||||
void primariesChanged();
|
||||
void illuminantChanged();
|
||||
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();
|
||||
Glib::ustring getPrimariesPresetName(const Glib::ustring &preset);
|
||||
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()
|
||||
{
|
||||
if (listener) {
|
||||
|
@ -30,10 +30,9 @@
|
||||
|
||||
class ICMPanelListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~ICMPanelListener() {}
|
||||
virtual void saveInputICCReference(Glib::ustring fname, bool apply_wb) {}
|
||||
virtual ~ICMPanelListener() = default;
|
||||
virtual void saveInputICCReference(const Glib::ustring& fname, bool apply_wb) = 0;
|
||||
};
|
||||
|
||||
class ICMPanel :
|
||||
@ -127,6 +126,7 @@ public:
|
||||
void setBatchMode(bool batchMode);
|
||||
void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr);
|
||||
void adjusterChanged(Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
|
||||
void wpChanged();
|
||||
void wtrcinChanged();
|
||||
|
@ -27,23 +27,14 @@ class ImageAreaToolListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~ImageAreaToolListener() {}
|
||||
virtual void spotWBselected (int x, int y, Thumbnail* thm = nullptr) {}
|
||||
virtual void sharpMaskSelected (bool sharpMask) {}
|
||||
virtual int getSpotWBRectSize ()
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
virtual void cropSelectionReady () {}
|
||||
virtual void rotateSelectionReady (double rotate_deg, Thumbnail* thm = nullptr) {}
|
||||
virtual ToolBar* getToolBar ()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
virtual CropGUIListener* startCropEditing (Thumbnail* thm = nullptr)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
virtual ~ImageAreaToolListener() = default;
|
||||
virtual void spotWBselected(int x, int y, Thumbnail* thm = nullptr) = 0;
|
||||
virtual void sharpMaskSelected(bool sharpMask) = 0;
|
||||
virtual int getSpotWBRectSize() const = 0;
|
||||
virtual void cropSelectionReady() = 0;
|
||||
virtual void rotateSelectionReady(double rotate_deg, Thumbnail* thm = nullptr) = 0;
|
||||
virtual ToolBar* getToolBar() const = 0;
|
||||
virtual CropGUIListener* startCropEditing(Thumbnail* thm = nullptr) = 0;
|
||||
};
|
||||
|
||||
#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()) {
|
||||
|
||||
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 ()
|
||||
{
|
||||
if (listener) {
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged ();
|
||||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
@ -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);
|
||||
ccshape->updateBackgroundHistogram (histCCurve);
|
||||
// clshape->updateBackgroundHistogram (histCLurve);
|
||||
// lcshape->updateBackgroundHistogram (histLLCurve);
|
||||
|
||||
}
|
||||
|
||||
void LCurve::setAdjusterBehavior (bool bradd, bool contradd, bool satadd)
|
||||
|
@ -75,10 +75,22 @@ public:
|
||||
|
||||
void curveChanged (CurveEditor* ce);
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void avoidcolorshift_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);
|
||||
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
class LensGeomListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~LensGeomListener() = default;
|
||||
virtual void straightenRequested () = 0;
|
||||
virtual void autoCropRequested () = 0;
|
||||
virtual double autoDistorRequested () = 0;
|
||||
|
@ -115,7 +115,6 @@ void LocalContrast::setDefaults(const ProcParams *defParams, const ParamsEdited
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LocalContrast::adjusterChanged(Adjuster* a, double newval)
|
||||
{
|
||||
if (listener && getEnabled()) {
|
||||
@ -131,6 +130,9 @@ void LocalContrast::adjusterChanged(Adjuster* a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
void LocalContrast::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
void LocalContrast::enabledChanged ()
|
||||
{
|
||||
|
@ -47,6 +47,7 @@ public:
|
||||
void setBatchMode(bool batchMode);
|
||||
|
||||
void adjusterChanged(Adjuster *a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged();
|
||||
void setAdjusterBehavior(bool radiusAdd, bool amountAdd, bool darknessAdd, bool lightnessAdd);
|
||||
};
|
||||
|
@ -27,12 +27,13 @@
|
||||
|
||||
class CropWindow;
|
||||
|
||||
class LockablePickerToolListener {
|
||||
class LockablePickerToolListener
|
||||
{
|
||||
public:
|
||||
virtual ~LockablePickerToolListener () {}
|
||||
virtual ~LockablePickerToolListener () = default;
|
||||
|
||||
/// Callback on Color Picker's visibility switch
|
||||
virtual void switchPickerVisibility (bool isVisible) {}
|
||||
virtual void switchPickerVisibility(bool isVisible) = 0;
|
||||
};
|
||||
|
||||
class LockableColorPicker : BackBuffer
|
||||
|
@ -22,13 +22,13 @@
|
||||
#include <gtkmm.h>
|
||||
|
||||
class LWButton;
|
||||
|
||||
class LWButtonListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~LWButtonListener () {}
|
||||
virtual void buttonPressed (LWButton* button, int actionCode, void* actionData) {}
|
||||
virtual void redrawNeeded (LWButton* button) {}
|
||||
virtual ~LWButtonListener() = default;
|
||||
virtual void buttonPressed(LWButton* button, int actionCode, void* actionData) = 0;
|
||||
virtual void redrawNeeded(LWButton* button) = 0;
|
||||
};
|
||||
|
||||
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 (a == strength) {
|
||||
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 ()
|
||||
{
|
||||
|
||||
|
@ -26,6 +26,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void enabledChanged ();
|
||||
void setAdjusterBehavior (bool strengthadd, bool featheradd, bool roundnessadd);
|
||||
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) {
|
||||
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)
|
||||
{
|
||||
|
||||
|
@ -40,6 +40,7 @@ public:
|
||||
void setBatchMode (bool batchMode);
|
||||
|
||||
void adjusterChanged (Adjuster* a, double newval);
|
||||
void adjusterAutoToggled(Adjuster* a, bool newval);
|
||||
void setAdjusterBehavior (bool badd);
|
||||
void trimValues (rtengine::procparams::ProcParams* pp);
|
||||
};
|
||||
|
@ -25,20 +25,23 @@
|
||||
|
||||
class PParamsChangeListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~PParamsChangeListener() {}
|
||||
virtual void procParamsChanged (rtengine::procparams::ProcParams* params, rtengine::ProcEvent ev, Glib::ustring descr, ParamsEdited* paramsEdited = nullptr) {}
|
||||
virtual void clearParamChanges () {}
|
||||
virtual ~PParamsChangeListener() = default;
|
||||
virtual void procParamsChanged(
|
||||
const rtengine::procparams::ProcParams* params,
|
||||
const rtengine::ProcEvent& ev,
|
||||
const Glib::ustring& descr,
|
||||
const ParamsEdited* paramsEdited = nullptr
|
||||
) = 0;
|
||||
virtual void clearParamChanges() = 0;
|
||||
};
|
||||
|
||||
class BatchPParamsChangeListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~BatchPParamsChangeListener() {}
|
||||
virtual void beginBatchPParamsChange(int numberOfEntries) {}
|
||||
virtual void endBatchPParamsChange() {}
|
||||
virtual ~BatchPParamsChangeListener() = default;
|
||||
virtual void beginBatchPParamsChange(int numberOfEntries) = 0;
|
||||
virtual void endBatchPParamsChange() = 0;
|
||||
};
|
||||
|
||||
#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 (a == hdThreshold) {
|
||||
@ -96,6 +96,10 @@ void PreProcess::adjusterChanged (Adjuster* a, double newval)
|
||||
}
|
||||
}
|
||||
|
||||
void PreProcess::adjusterAutoToggled(Adjuster* a, bool newval)
|
||||
{
|
||||
}
|
||||
|
||||
void PreProcess::hotPixelChanged ()
|
||||
{
|
||||
if (batchMode) {
|
||||
|
@ -47,7 +47,8 @@ public:
|
||||
|
||||
void hotPixelChanged();
|
||||
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);
|
||||
|
@ -57,7 +57,7 @@ PreviewHandler::~PreviewHandler ()
|
||||
|
||||
//----------------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++;
|
||||
|
||||
@ -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++;
|
||||
|
||||
@ -149,7 +149,7 @@ void PreviewHandler::delImage (IImage8* i)
|
||||
idle_register.add(func, iap);
|
||||
}
|
||||
|
||||
void PreviewHandler::imageReady (CropParams cp)
|
||||
void PreviewHandler::imageReady(const rtengine::procparams::CropParams& cp)
|
||||
{
|
||||
pih->pending++;
|
||||
iaimgpar* iap = new iaimgpar;
|
||||
|
@ -30,13 +30,13 @@
|
||||
|
||||
class PreviewListener
|
||||
{
|
||||
|
||||
public:
|
||||
virtual ~PreviewListener () {}
|
||||
virtual void previewImageChanged () {}
|
||||
virtual ~PreviewListener() = default;
|
||||
virtual void previewImageChanged() = 0;
|
||||
};
|
||||
|
||||
class PreviewHandler;
|
||||
|
||||
struct PreviewHandlerIdleHelper {
|
||||
PreviewHandler* phandler;
|
||||
bool destroyed;
|
||||
@ -72,9 +72,9 @@ public:
|
||||
}
|
||||
|
||||
// previewimagelistener
|
||||
void setImage (rtengine::IImage8* img, double scale, rtengine::procparams::CropParams cp);
|
||||
void delImage (rtengine::IImage8* img);
|
||||
void imageReady (rtengine::procparams::CropParams cp);
|
||||
void setImage(rtengine::IImage8* img, double scale, const rtengine::procparams::CropParams& cp);
|
||||
void delImage(rtengine::IImage8* img);
|
||||
void imageReady(const rtengine::procparams::CropParams& cp);
|
||||
|
||||
// this function is called when a new preview image arrives from rtengine
|
||||
void previewImageChanged ();
|
||||
|
@ -29,9 +29,7 @@
|
||||
class PreviewLoaderListener
|
||||
{
|
||||
public:
|
||||
virtual ~PreviewLoaderListener()
|
||||
{
|
||||
}
|
||||
virtual ~PreviewLoaderListener() = default;
|
||||
|
||||
/**
|
||||
* @brief a preview is ready
|
||||
@ -39,16 +37,12 @@ public:
|
||||
* @param dir_id directory ID this is for
|
||||
* @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
|
||||
*/
|
||||
virtual void previewsFinished(int dir_id_)
|
||||
{
|
||||
}
|
||||
virtual void previewsFinished(int dir_id_) = 0;
|
||||
};
|
||||
|
||||
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