added a more flexible way of managing ProcEvents
modifying the global ProcEvent enum and refreshmap array is not needed anymore. You can now register new events dynamically, using a ProcEventMapper instance. See rtgui/localcontrast.cc for an example. Hopefully this solves the problem of recurring merge conflicts when different devs add different proc events
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include "localcontrast.h"
|
||||
#include "eventmapper.h"
|
||||
#include <iomanip>
|
||||
#include <cmath>
|
||||
|
||||
@@ -26,6 +27,13 @@ using namespace rtengine::procparams;
|
||||
|
||||
LocalContrast::LocalContrast(): FoldableToolPanel(this, "localcontrast", M("TP_LOCALCONTRAST_LABEL"), false, true)
|
||||
{
|
||||
auto m = ProcEventMapper::getInstance();
|
||||
EvLocalContrastEnabled = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_ENABLED");
|
||||
EvLocalContrastRadius = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_RADIUS");
|
||||
EvLocalContrastAmount = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_AMOUNT");
|
||||
EvLocalContrastDarkness = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_DARKNESS");
|
||||
EvLocalContrastLightness = m->newEvent(RGBCURVE, "HISTORY_MSG_LOCALCONTRAST_LIGHTNESS");
|
||||
|
||||
radius = Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_RADIUS"), 3., 200., 1., 8.));
|
||||
amount = Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_AMOUNT"), 0., 1., 0.01, 0.2));
|
||||
darkness = Gtk::manage(new Adjuster(M("TP_LOCALCONTRAST_DARKNESS"), 0., 4., 0.1, 1.));
|
||||
|
Reference in New Issue
Block a user