1 /*
2  *  This file is part of RawTherapee.
3  *
4  *  Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
5  *
6  *  RawTherapee is free software: you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation, either version 3 of the License, or
9  *  (at your option) any later version.
10  *
11  *  RawTherapee is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with RawTherapee.  If not, see <https://www.gnu.org/licenses/>.
18  */
19 #pragma once
20 
21 #include <gtkmm.h>
22 
23 namespace rtengine
24 {
25 namespace procparams
26 {
27 
28 class ProcParams;
29 
30 
31 }
32 
33 }
34 
35 struct ParamsEdited;
36 
37 class PartialPasteDlg : public Gtk::Dialog
38 {
39 
40 public:
41 
42     Gtk::ScrolledWindow *scrolledwindow;
43 
44     Gtk::CheckButton* everything;
45 
46     // main groups:
47     Gtk::CheckButton* basic;
48     Gtk::CheckButton* detail;
49     Gtk::CheckButton* color;
50     Gtk::CheckButton* lens;
51     Gtk::CheckButton* composition;
52     Gtk::CheckButton* meta;
53     Gtk::CheckButton* raw;
54     Gtk::CheckButton* advanced;
55 
56     // options in basic:
57     Gtk::CheckButton* wb;
58     Gtk::CheckButton* exposure;
59     Gtk::CheckButton* localcontrast;
60     Gtk::CheckButton* sh;
61     Gtk::CheckButton* epd;
62     Gtk::CheckButton* fattal;
63     Gtk::CheckButton* retinex;
64     Gtk::CheckButton* pcvignette;
65     Gtk::CheckButton* gradient;
66     Gtk::CheckButton* labcurve;
67     Gtk::CheckButton* colorappearance;
68 
69     // options in detail:
70     Gtk::CheckButton* sharpen;
71     Gtk::CheckButton* sharpenedge;
72     Gtk::CheckButton* sharpenmicro;
73     Gtk::CheckButton* impden;
74     //Gtk::CheckButton* waveq;
75     Gtk::CheckButton* dirpyrden;
76     Gtk::CheckButton* defringe;
77     Gtk::CheckButton* dirpyreq;
78     Gtk::CheckButton* dehaze;
79 
80     // options in wavelet
81     Gtk::CheckButton* wavelet;
82 
83     // options in color:
84     Gtk::CheckButton* icm;
85     Gtk::CheckButton* vibrance;
86     Gtk::CheckButton* chmixer;
87     Gtk::CheckButton* blackwhite;
88     Gtk::CheckButton* hsveq;
89     Gtk::CheckButton* softlight;
90     Gtk::CheckButton* filmSimulation;
91     Gtk::CheckButton* rgbcurves;
92     Gtk::CheckButton* colortoning;
93 
94     // options in lens:
95     Gtk::CheckButton* distortion;
96     Gtk::CheckButton* cacorr;
97     Gtk::CheckButton* vignetting;
98     Gtk::CheckButton* lcp;
99 
100     // options in composition:
101     Gtk::CheckButton* coarserot;
102     Gtk::CheckButton* finerot;
103     Gtk::CheckButton* crop;
104     Gtk::CheckButton* resize;
105     Gtk::CheckButton* prsharpening;
106     Gtk::CheckButton* perspective;
107     Gtk::CheckButton* commonTrans;
108 
109     // options in meta:
110     Gtk::CheckButton *metadata;
111     Gtk::CheckButton* exifch;
112     Gtk::CheckButton* iptc;
113 
114 
115     // options in raw:
116     Gtk::CheckButton* raw_expos;
117     Gtk::CheckButton* raw_black;
118     Gtk::CheckButton* raw_ca_autocorrect;
119     Gtk::CheckButton* raw_caredblue;
120     Gtk::CheckButton* raw_ca_avoid_colourshift;
121     Gtk::CheckButton* raw_hotpix_filt;
122     Gtk::CheckButton* raw_deadpix_filt;
123     Gtk::CheckButton* raw_pdaf_lines_filter;
124     Gtk::CheckButton* raw_linenoise;
125     Gtk::CheckButton* raw_greenthresh;
126     Gtk::CheckButton* raw_method;
127     Gtk::CheckButton* raw_border;
128     Gtk::CheckButton* raw_imagenum;
129     Gtk::CheckButton* raw_ccSteps;
130     Gtk::CheckButton* raw_dcb_iterations;
131     Gtk::CheckButton* raw_dcb_enhance;
132     Gtk::CheckButton* raw_lmmse_iterations;
133     Gtk::CheckButton* raw_pixelshift;
134 
135     Gtk::CheckButton* df_file;
136     Gtk::CheckButton* df_AutoSelect;
137     Gtk::CheckButton* ff_file;
138     Gtk::CheckButton* ff_AutoSelect;
139     Gtk::CheckButton* ff_BlurRadius;
140     Gtk::CheckButton* ff_BlurType;
141     Gtk::CheckButton* ff_ClipControl;
142 
143     Gtk::CheckButton* filmNegative;
144     Gtk::CheckButton* captureSharpening;
145 
146     sigc::connection everythingConn, basicConn, detailConn, colorConn, lensConn, compositionConn, metaConn, rawConn, advancedConn;
147 
148     sigc::connection wbConn, exposureConn, localcontrastConn, shConn, pcvignetteConn, gradientConn, labcurveConn, colorappearanceConn;
149     sigc::connection sharpenConn, gradsharpenConn, microcontrastConn, impdenConn, dirpyrdenConn, defringeConn, epdConn, fattalConn, dirpyreqConn, waveletConn, retinexConn, dehazeConn;
150     sigc::connection vibranceConn, chmixerConn, hsveqConn, rgbcurvesConn, chmixerbwConn, colortoningConn, filmSimulationConn, softlightConn;
151     sigc::connection distortionConn, cacorrConn, vignettingConn, lcpConn;
152     sigc::connection coarserotConn, finerotConn, cropConn, resizeConn, prsharpeningConn, perspectiveConn, commonTransConn;
153     sigc::connection metadataConn, exifchConn, iptcConn, icmConn;
154     sigc::connection df_fileConn, df_AutoSelectConn, ff_fileConn, ff_AutoSelectConn, ff_BlurRadiusConn, ff_BlurTypeConn, ff_ClipControlConn;
155     sigc::connection raw_caredblueConn, raw_ca_autocorrectConn, raw_ca_avoid_colourshiftconn, raw_hotpix_filtConn, raw_deadpix_filtConn, raw_pdaf_lines_filterConn, raw_linenoiseConn, raw_greenthreshConn, raw_ccStepsConn, raw_methodConn, raw_borderConn, raw_imagenumConn, raw_dcb_iterationsConn, raw_lmmse_iterationsConn, raw_pixelshiftConn, raw_dcb_enhanceConn, raw_exposConn, raw_blackConn;
156     sigc::connection filmNegativeConn;
157     sigc::connection captureSharpeningConn;
158 
159 public:
160     PartialPasteDlg (const Glib::ustring &title, Gtk::Window* parent);
161 
162     void applyPaste (rtengine::procparams::ProcParams* dstPP, ParamsEdited* dstPE, const rtengine::procparams::ProcParams* srcPP, const ParamsEdited* srcPE = nullptr);
163 
164     void everythingToggled ();
165     void basicToggled ();
166     void detailToggled ();
167     void colorToggled ();
168     void lensToggled ();
169     void compositionToggled ();
170     void metaToggled ();
171     void rawToggled ();
172     void advancedToggled ();
173 };
174