Add rtengine::ProcEvent for de-fishing
This commit is contained in:
parent
04bd7b5ec4
commit
ac7b3fc651
@ -38,6 +38,11 @@ Distortion::Distortion (): FoldableToolPanel(this, TOOL_NAME, M("TP_DISTORTION_L
|
|||||||
EvDistortionDefish = mapper->newEvent(TRANSFORM, "HISTORY_MSG_DISTORTION_DEFISH");
|
EvDistortionDefish = mapper->newEvent(TRANSFORM, "HISTORY_MSG_DISTORTION_DEFISH");
|
||||||
EvDistortionDefishVoid = mapper->newEvent(M_VOID, "HISTORY_MSG_DISTORTION_DEFISH");
|
EvDistortionDefishVoid = mapper->newEvent(M_VOID, "HISTORY_MSG_DISTORTION_DEFISH");
|
||||||
|
|
||||||
|
EvDistortionDefishFocalLength = mapper->newEvent(TRANSFORM, "HISTORY_MSG_DISTORTION_DEFISH_FOCAL");
|
||||||
|
EvDistortionDefishFocalLengthVoid = mapper->newEvent(M_VOID, "HISTORY_MSG_DISTORTION_DEFISH_FOCAL");
|
||||||
|
|
||||||
|
setCamBasedEventsActive();
|
||||||
|
|
||||||
rlistener = nullptr;
|
rlistener = nullptr;
|
||||||
autoDistor = Gtk::manage (new Gtk::Button (M("GENERAL_AUTO")));
|
autoDistor = Gtk::manage (new Gtk::Button (M("GENERAL_AUTO")));
|
||||||
autoDistor->set_image (*Gtk::manage (new RTImage ("distortion-auto-small", Gtk::ICON_SIZE_BUTTON)));
|
autoDistor->set_image (*Gtk::manage (new RTImage ("distortion-auto-small", Gtk::ICON_SIZE_BUTTON)));
|
||||||
@ -158,6 +163,18 @@ void Distortion::defishChanged()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Distortion::setCamBasedEventsActive(bool active)
|
||||||
|
{
|
||||||
|
if (active) {
|
||||||
|
event_distortion_defish = &EvDistortionDefish;
|
||||||
|
event_distortion_defish_focal_length = &EvDistortionDefishFocalLength;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
event_distortion_defish = &EvDistortionDefishVoid;
|
||||||
|
event_distortion_defish_focal_length = &EvDistortionDefishFocalLengthVoid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Distortion::setAdjusterBehavior (bool vadd, bool focal_length_add)
|
void Distortion::setAdjusterBehavior (bool vadd, bool focal_length_add)
|
||||||
{
|
{
|
||||||
distor->setAddMode(vadd);
|
distor->setAddMode(vadd);
|
||||||
|
@ -43,9 +43,9 @@ public:
|
|||||||
rtengine::ProcEvent EvDistortionDefishVoid;
|
rtengine::ProcEvent EvDistortionDefishVoid;
|
||||||
rtengine::ProcEvent* event_distortion_defish;
|
rtengine::ProcEvent* event_distortion_defish;
|
||||||
|
|
||||||
rtengine::ProcEvent EvDistortionFocalLength;
|
rtengine::ProcEvent EvDistortionDefishFocalLength;
|
||||||
rtengine::ProcEvent EvDistortionFocalLengthVoid;
|
rtengine::ProcEvent EvDistortionDefishFocalLengthVoid;
|
||||||
rtengine::ProcEvent* event_distortion_focal_length;
|
rtengine::ProcEvent* event_distortion_defish_focal_length;
|
||||||
|
|
||||||
static const Glib::ustring TOOL_NAME;
|
static const Glib::ustring TOOL_NAME;
|
||||||
|
|
||||||
@ -65,4 +65,6 @@ public:
|
|||||||
rlistener = l;
|
rlistener = l;
|
||||||
}
|
}
|
||||||
void defishChanged (void);
|
void defishChanged (void);
|
||||||
|
|
||||||
|
void setCamBasedEventsActive(bool active = true);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user