Merge branch 'dev' into spot-removal-tool
This commit is contained in:
@@ -28,9 +28,10 @@
|
||||
|
||||
using namespace rtengine::procparams;
|
||||
|
||||
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChanged (false), editDataProvider (nullptr)
|
||||
ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favoritePanelSW(nullptr), hasChanged (false), editDataProvider (nullptr)
|
||||
{
|
||||
|
||||
favoritePanel = Gtk::manage (new ToolVBox ());
|
||||
exposurePanel = Gtk::manage (new ToolVBox ());
|
||||
detailsPanel = Gtk::manage (new ToolVBox ());
|
||||
colorPanel = Gtk::manage (new ToolVBox ());
|
||||
@@ -41,13 +42,13 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
coarse = Gtk::manage (new CoarsePanel ());
|
||||
toneCurve = Gtk::manage (new ToneCurve ());
|
||||
shadowshighlights = Gtk::manage (new ShadowsHighlights ());
|
||||
localContrast = Gtk::manage(new LocalContrast());
|
||||
impulsedenoise = Gtk::manage (new ImpulseDenoise ());
|
||||
defringe = Gtk::manage (new Defringe ());
|
||||
spot = Gtk::manage (new Spot ());
|
||||
dirpyrdenoise = Gtk::manage (new DirPyrDenoise ());
|
||||
epd = Gtk::manage (new EdgePreservingDecompositionUI ());
|
||||
sharpening = Gtk::manage (new Sharpening ());
|
||||
localContrast = Gtk::manage(new LocalContrast());
|
||||
sharpenEdge = Gtk::manage (new SharpenEdge ());
|
||||
sharpenMicro = Gtk::manage (new SharpenMicro ());
|
||||
lcurve = Gtk::manage (new LCurve ());
|
||||
@@ -77,6 +78,8 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
dirpyrequalizer = Gtk::manage (new DirPyrEqualizer ());
|
||||
hsvequalizer = Gtk::manage (new HSVEqualizer ());
|
||||
filmSimulation = Gtk::manage (new FilmSimulation ());
|
||||
softlight = Gtk::manage(new SoftLight());
|
||||
dehaze = Gtk::manage(new Dehaze());
|
||||
sensorbayer = Gtk::manage (new SensorBayer ());
|
||||
sensorxtrans = Gtk::manage (new SensorXTrans ());
|
||||
bayerprocess = Gtk::manage (new BayerProcess ());
|
||||
@@ -99,57 +102,68 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
// Valeurs par dfaut:
|
||||
// Best -> low ISO
|
||||
// Medium -> High ISO
|
||||
favorites.resize(options.favorites.size(), nullptr);
|
||||
|
||||
addPanel (colorPanel, whitebalance);
|
||||
addPanel (exposurePanel, toneCurve);
|
||||
addPanel (colorPanel, vibrance);
|
||||
addPanel (colorPanel, chmixer);
|
||||
addPanel (colorPanel, blackwhite);
|
||||
addPanel (exposurePanel, localContrast);
|
||||
addPanel (exposurePanel, shadowshighlights);
|
||||
addPanel (detailsPanel, spot);
|
||||
addPanel (detailsPanel, sharpening);
|
||||
addPanel (detailsPanel, sharpenEdge);
|
||||
addPanel (detailsPanel, sharpenMicro);
|
||||
addPanel (colorPanel, hsvequalizer);
|
||||
addPanel (colorPanel, filmSimulation);
|
||||
addPanel (colorPanel, rgbcurves);
|
||||
addPanel (colorPanel, colortoning);
|
||||
addPanel (exposurePanel, epd);
|
||||
addPanel (exposurePanel, fattal);
|
||||
addPanel (advancedPanel, retinex);
|
||||
addPanel (exposurePanel, pcvignette);
|
||||
addPanel (exposurePanel, gradient);
|
||||
addPanel (exposurePanel, lcurve);
|
||||
addPanel (advancedPanel, colorappearance);
|
||||
addPanel (detailsPanel, impulsedenoise);
|
||||
addPanel (detailsPanel, dirpyrdenoise);
|
||||
addPanel (detailsPanel, defringe);
|
||||
addPanel (detailsPanel, dirpyrequalizer);
|
||||
addPanel (advancedPanel, wavelet);
|
||||
addPanel (transformPanel, crop);
|
||||
addPanel (transformPanel, resize);
|
||||
addfavoritePanel (colorPanel, whitebalance);
|
||||
addfavoritePanel (exposurePanel, toneCurve);
|
||||
addfavoritePanel (colorPanel, vibrance);
|
||||
addfavoritePanel (colorPanel, chmixer);
|
||||
addfavoritePanel (colorPanel, blackwhite);
|
||||
addfavoritePanel (exposurePanel, shadowshighlights);
|
||||
addfavoritePanel (detailsPanel, spot);
|
||||
addfavoritePanel (detailsPanel, sharpening);
|
||||
addfavoritePanel (detailsPanel, localContrast);
|
||||
addfavoritePanel (detailsPanel, sharpenEdge);
|
||||
addfavoritePanel (detailsPanel, sharpenMicro);
|
||||
addfavoritePanel (colorPanel, hsvequalizer);
|
||||
addfavoritePanel (colorPanel, filmSimulation);
|
||||
addfavoritePanel (colorPanel, softlight);
|
||||
addfavoritePanel (colorPanel, rgbcurves);
|
||||
addfavoritePanel (colorPanel, colortoning);
|
||||
addfavoritePanel (exposurePanel, epd);
|
||||
addfavoritePanel (exposurePanel, fattal);
|
||||
addfavoritePanel (advancedPanel, retinex);
|
||||
addfavoritePanel (exposurePanel, pcvignette);
|
||||
addfavoritePanel (exposurePanel, gradient);
|
||||
addfavoritePanel (exposurePanel, lcurve);
|
||||
addfavoritePanel (advancedPanel, colorappearance);
|
||||
addfavoritePanel (detailsPanel, impulsedenoise);
|
||||
addfavoritePanel (detailsPanel, dirpyrdenoise);
|
||||
addfavoritePanel (detailsPanel, defringe);
|
||||
addfavoritePanel (detailsPanel, dirpyrequalizer);
|
||||
addfavoritePanel (detailsPanel, dehaze);
|
||||
addfavoritePanel (advancedPanel, wavelet);
|
||||
addfavoritePanel (transformPanel, crop);
|
||||
addfavoritePanel (transformPanel, resize);
|
||||
addPanel (resize->getPackBox(), prsharpening, 2);
|
||||
addPanel (transformPanel, lensgeom);
|
||||
addPanel (lensgeom->getPackBox(), rotate, 2);
|
||||
addPanel (lensgeom->getPackBox(), perspective, 2);
|
||||
addPanel (lensgeom->getPackBox(), lensProf, 2);
|
||||
addPanel (lensgeom->getPackBox(), distortion, 2);
|
||||
addPanel (lensgeom->getPackBox(), cacorrection, 2);
|
||||
addPanel (lensgeom->getPackBox(), vignetting, 2);
|
||||
addPanel (colorPanel, icm);
|
||||
addPanel (rawPanel, sensorbayer);
|
||||
addPanel (sensorbayer->getPackBox(), bayerprocess, 2);
|
||||
addPanel (sensorbayer->getPackBox(), bayerrawexposure, 2);
|
||||
addPanel (sensorbayer->getPackBox(), bayerpreprocess, 2);
|
||||
addPanel (sensorbayer->getPackBox(), rawcacorrection, 2);
|
||||
addPanel (rawPanel, sensorxtrans);
|
||||
addPanel (sensorxtrans->getPackBox(), xtransprocess, 2);
|
||||
addPanel (sensorxtrans->getPackBox(), xtransrawexposure, 2);
|
||||
addPanel (rawPanel, rawexposure);
|
||||
addPanel (rawPanel, preprocess);
|
||||
addPanel (rawPanel, darkframe);
|
||||
addPanel (rawPanel, flatfield);
|
||||
addfavoritePanel (transformPanel, lensgeom);
|
||||
addfavoritePanel (lensgeom->getPackBox(), rotate, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), perspective, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), lensProf, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), distortion, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), cacorrection, 2);
|
||||
addfavoritePanel (lensgeom->getPackBox(), vignetting, 2);
|
||||
addfavoritePanel (colorPanel, icm);
|
||||
addfavoritePanel (rawPanel, sensorbayer);
|
||||
addfavoritePanel (sensorbayer->getPackBox(), bayerprocess, 2);
|
||||
addfavoritePanel (sensorbayer->getPackBox(), bayerrawexposure, 2);
|
||||
addfavoritePanel (sensorbayer->getPackBox(), bayerpreprocess, 2);
|
||||
addfavoritePanel (sensorbayer->getPackBox(), rawcacorrection, 2);
|
||||
addfavoritePanel (rawPanel, sensorxtrans);
|
||||
addfavoritePanel (sensorxtrans->getPackBox(), xtransprocess, 2);
|
||||
addfavoritePanel (sensorxtrans->getPackBox(), xtransrawexposure, 2);
|
||||
addfavoritePanel (rawPanel, rawexposure);
|
||||
addfavoritePanel (rawPanel, preprocess);
|
||||
addfavoritePanel (rawPanel, darkframe);
|
||||
addfavoritePanel (rawPanel, flatfield);
|
||||
|
||||
int favoriteCount = 0;
|
||||
for(auto it = favorites.begin(); it != favorites.end(); ++it) {
|
||||
if (*it) {
|
||||
addPanel(favoritePanel, *it);
|
||||
++favoriteCount;
|
||||
}
|
||||
}
|
||||
|
||||
toolPanels.push_back (coarse);
|
||||
toolPanels.push_back(metadata);
|
||||
@@ -157,60 +171,66 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), hasChan
|
||||
toolPanelNotebook = new Gtk::Notebook ();
|
||||
toolPanelNotebook->set_name ("ToolPanelNotebook");
|
||||
|
||||
|
||||
exposurePanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
detailsPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
colorPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
transformPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
rawPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
advancedPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
advancedPanelSW = Gtk::manage (new MyScrolledWindow ());
|
||||
updateVScrollbars (options.hideTPVScrollbar);
|
||||
|
||||
// load panel endings
|
||||
for (int i = 0; i < 6; i++) {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
vbPanelEnd[i] = Gtk::manage (new Gtk::VBox ());
|
||||
imgPanelEnd[i] = Gtk::manage (new RTImage ("PanelEnding.png"));
|
||||
imgPanelEnd[i] = Gtk::manage (new RTImage ("ornament1.png"));
|
||||
imgPanelEnd[i]->show ();
|
||||
vbPanelEnd[i]->pack_start (*imgPanelEnd[i], Gtk::PACK_SHRINK);
|
||||
vbPanelEnd[i]->show_all();
|
||||
}
|
||||
|
||||
if(favoriteCount > 0) {
|
||||
favoritePanelSW = Gtk::manage(new MyScrolledWindow());
|
||||
favoritePanelSW->add(*favoritePanel);
|
||||
favoritePanel->pack_start(*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
favoritePanel->pack_start(*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
|
||||
}
|
||||
|
||||
exposurePanelSW->add (*exposurePanel);
|
||||
exposurePanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
exposurePanel->pack_start (*vbPanelEnd[0], Gtk::PACK_SHRINK, 4);
|
||||
exposurePanel->pack_start (*vbPanelEnd[1], Gtk::PACK_SHRINK, 4);
|
||||
|
||||
detailsPanelSW->add (*detailsPanel);
|
||||
detailsPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
detailsPanel->pack_start (*vbPanelEnd[1], Gtk::PACK_SHRINK, 4);
|
||||
detailsPanel->pack_start (*vbPanelEnd[2], Gtk::PACK_SHRINK, 4);
|
||||
|
||||
colorPanelSW->add (*colorPanel);
|
||||
colorPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
colorPanel->pack_start (*vbPanelEnd[2], Gtk::PACK_SHRINK, 4);
|
||||
colorPanel->pack_start (*vbPanelEnd[3], Gtk::PACK_SHRINK, 4);
|
||||
|
||||
advancedPanelSW->add (*advancedPanel);
|
||||
advancedPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
advancedPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0);
|
||||
advancedPanel->pack_start (*vbPanelEnd[6], Gtk::PACK_SHRINK, 0);
|
||||
|
||||
transformPanelSW->add (*transformPanel);
|
||||
transformPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
transformPanel->pack_start (*vbPanelEnd[3], Gtk::PACK_SHRINK, 4);
|
||||
transformPanel->pack_start (*vbPanelEnd[4], Gtk::PACK_SHRINK, 4);
|
||||
|
||||
rawPanelSW->add (*rawPanel);
|
||||
rawPanel->pack_start (*Gtk::manage (new Gtk::HSeparator), Gtk::PACK_SHRINK, 0);
|
||||
rawPanel->pack_start (*vbPanelEnd[4], Gtk::PACK_SHRINK, 0);
|
||||
rawPanel->pack_start (*vbPanelEnd[5], Gtk::PACK_SHRINK, 0);
|
||||
|
||||
toiF = Gtk::manage (new TextOrIcon ("star.png", M ("MAIN_TAB_FAVORITES"), M ("MAIN_TAB_FAVORITES_TOOLTIP")));
|
||||
toiE = Gtk::manage (new TextOrIcon ("exposure.png", M ("MAIN_TAB_EXPOSURE"), M ("MAIN_TAB_EXPOSURE_TOOLTIP")));
|
||||
toiD = Gtk::manage (new TextOrIcon ("detail.png", M ("MAIN_TAB_DETAIL"), M ("MAIN_TAB_DETAIL_TOOLTIP")));
|
||||
toiC = Gtk::manage (new TextOrIcon ("color-circles.png", M ("MAIN_TAB_COLOR"), M ("MAIN_TAB_COLOR_TOOLTIP")));
|
||||
toiW = Gtk::manage (new TextOrIcon ("atom.png", M ("MAIN_TAB_ADVANCED"), M ("MAIN_TAB_ADVANCED_TOOLTIP")));
|
||||
toiT = Gtk::manage (new TextOrIcon ("transform.png", M ("MAIN_TAB_TRANSFORM"), M ("MAIN_TAB_TRANSFORM_TOOLTIP")));
|
||||
toiR = Gtk::manage (new TextOrIcon ("bayer.png", M ("MAIN_TAB_RAW"), M ("MAIN_TAB_RAW_TOOLTIP")));
|
||||
toiM = Gtk::manage (new TextOrIcon ("metadata.png", M ("MAIN_TAB_METADATA"), M ("MAIN_TAB_METADATA_TOOLTIP")));
|
||||
|
||||
|
||||
TOITypes type = options.UseIconNoText ? TOI_ICON : TOI_TEXT;
|
||||
|
||||
toiE = Gtk::manage (new TextOrIcon ("exposure.png", M ("MAIN_TAB_EXPOSURE"), M ("MAIN_TAB_EXPOSURE_TOOLTIP"), type));
|
||||
toiD = Gtk::manage (new TextOrIcon ("detail.png", M ("MAIN_TAB_DETAIL"), M ("MAIN_TAB_DETAIL_TOOLTIP"), type));
|
||||
toiC = Gtk::manage (new TextOrIcon ("colour.png", M ("MAIN_TAB_COLOR"), M ("MAIN_TAB_COLOR_TOOLTIP"), type));
|
||||
toiW = Gtk::manage (new TextOrIcon ("atom.png", M ("MAIN_TAB_ADVANCED"), M ("MAIN_TAB_ADVANCED_TOOLTIP"), type));
|
||||
toiT = Gtk::manage (new TextOrIcon ("transform.png", M ("MAIN_TAB_TRANSFORM"), M ("MAIN_TAB_TRANSFORM_TOOLTIP"), type));
|
||||
toiR = Gtk::manage (new TextOrIcon ("raw.png", M ("MAIN_TAB_RAW"), M ("MAIN_TAB_RAW_TOOLTIP"), type));
|
||||
toiM = Gtk::manage (new TextOrIcon ("meta.png", M ("MAIN_TAB_METADATA"), M ("MAIN_TAB_METADATA_TOOLTIP"), type));
|
||||
|
||||
if (favoritePanelSW) {
|
||||
toolPanelNotebook->append_page (*favoritePanelSW, *toiF);
|
||||
}
|
||||
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
|
||||
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
|
||||
toolPanelNotebook->append_page (*colorPanelSW, *toiC);
|
||||
@@ -253,8 +273,21 @@ void ToolPanelCoordinator::addPanel (Gtk::Box* where, FoldableToolPanel* panel,
|
||||
toolPanels.push_back (panel);
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::addfavoritePanel (Gtk::Box* where, FoldableToolPanel* panel, int level)
|
||||
{
|
||||
auto name = panel->getToolName();
|
||||
auto it = std::find(options.favorites.begin(), options.favorites.end(), name);
|
||||
if (it != options.favorites.end()) {
|
||||
int index = std::distance(options.favorites.begin(), it);
|
||||
favorites[index] = panel;
|
||||
} else {
|
||||
addPanel(where, panel, level);
|
||||
}
|
||||
}
|
||||
|
||||
ToolPanelCoordinator::~ToolPanelCoordinator ()
|
||||
{
|
||||
idle_register.destroy();
|
||||
|
||||
closeImage ();
|
||||
|
||||
@@ -262,39 +295,85 @@ ToolPanelCoordinator::~ToolPanelCoordinator ()
|
||||
delete toolBar;
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans)
|
||||
void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXtrans, bool isMono)
|
||||
{
|
||||
GThreadLock lock;
|
||||
|
||||
if (isRaw) {
|
||||
rawPanelSW->set_sensitive (true);
|
||||
|
||||
if (isBayer) {
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
sensorbayer->FoldableToolPanel::show();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
} else if (isXtrans) {
|
||||
sensorxtrans->FoldableToolPanel::show();
|
||||
sensorbayer->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(true);
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
sensorbayer->FoldableToolPanel::show();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (isXtrans) {
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(true);
|
||||
sensorxtrans->FoldableToolPanel::show();
|
||||
sensorbayer->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
else if (isMono) {
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(true);
|
||||
sensorbayer->FoldableToolPanel::hide();
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::hide();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
} else {
|
||||
sensorbayer->FoldableToolPanel::hide();
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::hide();
|
||||
flatfield->FoldableToolPanel::hide();
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(true);
|
||||
sensorbayer->FoldableToolPanel::hide();
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::hide();
|
||||
flatfield->FoldableToolPanel::hide();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
} else {
|
||||
rawPanelSW->set_sensitive (false);
|
||||
idle_register.add(
|
||||
[this]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(false);
|
||||
retinex->FoldableToolPanel::setGrayedOut(true);
|
||||
|
||||
return false;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::ustring& descr)
|
||||
void ToolPanelCoordinator::panelChanged(const rtengine::ProcEvent& event, const Glib::ustring& descr)
|
||||
{
|
||||
|
||||
if (!ipc) {
|
||||
return;
|
||||
}
|
||||
@@ -360,9 +439,14 @@ void ToolPanelCoordinator::panelChanged (rtengine::ProcEvent event, const Glib::
|
||||
}
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengine::ProcEvent event, const Glib::ustring& descr, const ParamsEdited* paramsEdited)
|
||||
void ToolPanelCoordinator::profileChange(
|
||||
const PartialProfile* nparams,
|
||||
const rtengine::ProcEvent& event,
|
||||
const Glib::ustring& descr,
|
||||
const ParamsEdited* paramsEdited,
|
||||
bool fromLastSave
|
||||
)
|
||||
{
|
||||
|
||||
int fw, fh, tr;
|
||||
|
||||
if (!ipc) {
|
||||
@@ -382,7 +466,7 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi
|
||||
}
|
||||
|
||||
// And apply the partial profile nparams to mergedParams
|
||||
nparams->applyTo (mergedParams);
|
||||
nparams->applyTo (mergedParams, fromLastSave);
|
||||
|
||||
// Derive the effective changes, if it's a profile change, to prevent slow RAW rerendering if not necessary
|
||||
bool filterRawRefresh = false;
|
||||
@@ -442,13 +526,13 @@ void ToolPanelCoordinator::profileChange (const PartialProfile *nparams, rtengi
|
||||
}
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::setDefaults (ProcParams* defparams)
|
||||
void ToolPanelCoordinator::setDefaults(const ProcParams* defparams)
|
||||
{
|
||||
|
||||
if (defparams)
|
||||
if (defparams) {
|
||||
for (auto toolPanel : toolPanels) {
|
||||
toolPanel->setDefaults (defparams);
|
||||
toolPanel->setDefaults(defparams);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CropGUIListener* ToolPanelCoordinator::getCropGUIListener ()
|
||||
@@ -473,6 +557,9 @@ void ToolPanelCoordinator::initImage (rtengine::StagedImageProcessor* ipc_, bool
|
||||
ipc->setAutoCamListener (colorappearance);
|
||||
ipc->setAutoBWListener (blackwhite);
|
||||
ipc->setFrameCountListener (bayerprocess);
|
||||
ipc->setFlatFieldAutoClipListener (flatfield);
|
||||
ipc->setBayerAutoContrastListener (bayerprocess);
|
||||
ipc->setXtransAutoContrastListener (xtransprocess);
|
||||
ipc->setAutoWBListener (whitebalance);
|
||||
ipc->setAutoColorTonListener (colortoning);
|
||||
ipc->setAutoChromaListener (dirpyrdenoise);
|
||||
@@ -537,7 +624,6 @@ void ToolPanelCoordinator::updateToolState()
|
||||
}
|
||||
|
||||
wavelet->updateToolState (temp);
|
||||
wavelet->setExpanded (true);
|
||||
retinex->updateToolState (temp);
|
||||
}
|
||||
}
|
||||
@@ -572,33 +658,8 @@ void ToolPanelCoordinator::writeToolExpandedStatus (std::vector<int> &tpOpen)
|
||||
}
|
||||
|
||||
|
||||
void ToolPanelCoordinator::cropSelectionReady ()
|
||||
void ToolPanelCoordinator::spotWBselected(int x, int y, Thumbnail* thm)
|
||||
{
|
||||
|
||||
toolBar->setTool (TMHand);
|
||||
|
||||
if (!ipc) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::rotateSelectionReady (double rotate_deg, Thumbnail* thm)
|
||||
{
|
||||
|
||||
toolBar->setTool (TMHand);
|
||||
|
||||
if (!ipc) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rotate_deg != 0.0) {
|
||||
rotate->straighten (rotate_deg);
|
||||
}
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::spotWBselected (int x, int y, Thumbnail* thm)
|
||||
{
|
||||
|
||||
if (!ipc) {
|
||||
return;
|
||||
}
|
||||
@@ -616,8 +677,52 @@ void ToolPanelCoordinator::spotWBselected (int x, int y, Thumbnail* thm)
|
||||
}
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::sharpMaskSelected(bool sharpMask)
|
||||
{
|
||||
if (!ipc) {
|
||||
return;
|
||||
}
|
||||
ipc->beginUpdateParams ();
|
||||
ipc->setSharpMask(sharpMask);
|
||||
ipc->endUpdateParams (rtengine::EvShrEnabled);
|
||||
}
|
||||
|
||||
int ToolPanelCoordinator::getSpotWBRectSize() const
|
||||
{
|
||||
return whitebalance->getSize();
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::cropSelectionReady()
|
||||
{
|
||||
toolBar->setTool (TMHand);
|
||||
|
||||
if (!ipc) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::rotateSelectionReady(double rotate_deg, Thumbnail* thm)
|
||||
{
|
||||
toolBar->setTool (TMHand);
|
||||
|
||||
if (!ipc) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (rotate_deg != 0.0) {
|
||||
rotate->straighten (rotate_deg);
|
||||
}
|
||||
}
|
||||
|
||||
ToolBar* ToolPanelCoordinator::getToolBar() const
|
||||
{
|
||||
return toolBar;
|
||||
}
|
||||
|
||||
CropGUIListener* ToolPanelCoordinator::startCropEditing(Thumbnail* thm)
|
||||
{
|
||||
return crop;
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::autoCropRequested ()
|
||||
{
|
||||
@@ -728,28 +833,31 @@ void ToolPanelCoordinator::cropSelectRequested ()
|
||||
toolBar->setTool (TMCropSelect);
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::saveInputICCReference (Glib::ustring fname, bool apply_wb)
|
||||
void ToolPanelCoordinator::saveInputICCReference(const Glib::ustring& fname, bool apply_wb)
|
||||
{
|
||||
|
||||
if (ipc) {
|
||||
ipc->saveInputICCReference (fname, apply_wb);
|
||||
}
|
||||
}
|
||||
|
||||
int ToolPanelCoordinator::getSpotWBRectSize ()
|
||||
void ToolPanelCoordinator::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
|
||||
)
|
||||
{
|
||||
|
||||
return whitebalance->getSize ();
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::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)
|
||||
{
|
||||
colorappearance->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
toneCurve->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
lcurve->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve, /*histCLurve, histLLCurve,*/ histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
rgbcurves->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
retinex->updateCurveBackgroundHistogram (histToneCurve, histLCurve, histCCurve,/* histCLurve, histLLCurve, */histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
|
||||
colorappearance->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve, histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
toneCurve->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve,histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
lcurve->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve, histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
rgbcurves->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve, histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
retinex->updateCurveBackgroundHistogram(histToneCurve, histLCurve, histCCurve, histLCAM, histCCAM, histRed, histGreen, histBlue, histLuma, histLRETI);
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::foldAllButOne (Gtk::Box* parent, FoldableToolPanel* openedSection)
|
||||
@@ -782,6 +890,12 @@ bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event)
|
||||
|
||||
if (alt) {
|
||||
switch (event->keyval) {
|
||||
case GDK_KEY_u:
|
||||
if (favoritePanelSW) {
|
||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*favoritePanelSW));
|
||||
}
|
||||
return true;
|
||||
|
||||
case GDK_KEY_e:
|
||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*exposurePanelSW));
|
||||
return true;
|
||||
@@ -817,8 +931,11 @@ bool ToolPanelCoordinator::handleShortcutKey (GdkEventKey* event)
|
||||
|
||||
void ToolPanelCoordinator::updateVScrollbars (bool hide)
|
||||
{
|
||||
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
||||
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
|
||||
Gtk::PolicyType policy = hide ? Gtk::POLICY_NEVER : Gtk::POLICY_AUTOMATIC;
|
||||
if (favoritePanelSW) {
|
||||
favoritePanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
}
|
||||
exposurePanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
detailsPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
colorPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
|
||||
@@ -831,35 +948,14 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide)
|
||||
}
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::updateTabsHeader (bool useIcons)
|
||||
{
|
||||
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
||||
TOITypes type = useIcons ? TOI_ICON : TOI_TEXT;
|
||||
|
||||
toiE->switchTo (type);
|
||||
toiD->switchTo (type);
|
||||
toiC->switchTo (type);
|
||||
toiT->switchTo (type);
|
||||
toiR->switchTo (type);
|
||||
|
||||
if (toiM) {
|
||||
toiM->switchTo (type);
|
||||
}
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::updateTPVScrollbar (bool hide)
|
||||
{
|
||||
updateVScrollbars (hide);
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::updateTabsUsesIcons (bool useIcons)
|
||||
{
|
||||
updateTabsHeader (useIcons);
|
||||
}
|
||||
|
||||
void ToolPanelCoordinator::toolSelected (ToolMode tool)
|
||||
{
|
||||
GThreadLock lock; // All GUI acces from idle_add callbacks or separate thread HAVE to be protected
|
||||
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
|
||||
|
||||
switch (tool) {
|
||||
case TMCropSelect:
|
||||
|
Reference in New Issue
Block a user