2702wave3

This commit is contained in:
DrSlony
2015-06-09 16:09:57 +02:00
parent 08bda863c9
commit efb56d97a3
3 changed files with 25 additions and 158 deletions

View File

@@ -18,7 +18,6 @@
*/
#include "multilangmgr.h"
#include "toolpanelcoord.h"
#include "ilabel.h"
#include "options.h"
#include "../rtengine/imagesource.h"
#include "../rtengine/dfmanager.h"
@@ -185,6 +184,10 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
colorPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK,0);
colorPanel->pack_start (*vbPanelEnd[2],Gtk::PACK_SHRINK,4);
waveletPanelSW->add (*waveletPanel);
waveletPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK,0);
waveletPanel->pack_start (*vbPanelEnd[5],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);
@@ -193,9 +196,6 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
rawPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK,0);
rawPanel->pack_start (*vbPanelEnd[4],Gtk::PACK_SHRINK,0);
waveletPanelSW->add (*waveletPanel);
waveletPanel->pack_start (*Gtk::manage(new Gtk::HSeparator), Gtk::PACK_SHRINK,0);
waveletPanel->pack_start (*vbPanelEnd[5],Gtk::PACK_SHRINK,0);
TOITypes type = options.UseIconNoText ? TOI_ICON : TOI_TEXT;
@@ -203,17 +203,17 @@ ToolPanelCoordinator::ToolPanelCoordinator () : ipc(NULL) {
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 ("wavelet.png" , M("MAIN_TAB_WAVELET") , M("MAIN_TAB_WAVELET_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));
toiW = Gtk::manage (new TextOrIcon ("wavelet.png" , M("MAIN_TAB_WAVELET") , M("MAIN_TAB_WAVELET_TOOLTIP") , type));
toiM = Gtk::manage (new TextOrIcon ("meta.png" , M("MAIN_TAB_METADATA") , M("MAIN_TAB_METADATA_TOOLTIP") , type));
toolPanelNotebook->append_page (*exposurePanelSW, *toiE);
toolPanelNotebook->append_page (*detailsPanelSW, *toiD);
toolPanelNotebook->append_page (*colorPanelSW, *toiC);
toolPanelNotebook->append_page (*waveletPanelSW, *toiW);
toolPanelNotebook->append_page (*transformPanelSW, *toiT);
toolPanelNotebook->append_page (*rawPanelSW, *toiR);
toolPanelNotebook->append_page (*waveletPanelSW, *toiW);
toolPanelNotebook->append_page (*metadataPanel, *toiM);
toolPanelNotebook->set_current_page (0);
@@ -668,6 +668,7 @@ void ToolPanelCoordinator::updateVScrollbars (bool hide) {
colorPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
transformPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
rawPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
waveletPanelSW->set_policy (Gtk::POLICY_AUTOMATIC, policy);
}
void ToolPanelCoordinator::updateTabsHeader (bool useIcons) {

View File

@@ -59,96 +59,60 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
dispFrame = Gtk::manage (new Gtk::Frame () );
expdisplay = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_DISP")));
Gtk::HBox* hbdisplay = Gtk::manage( new Gtk::HBox());
tbdisplay = Gtk::manage( new Gtk::ToggleButton());
dispFrame->add(*expdisplay);
hbdisplay->set_spacing(8);
hbdisplay->pack_start(*tbdisplay);
tbdisplay->signal_toggled().connect( sigc::mem_fun(this, &Wavelet::expdisplayTog));
levelFrame = Gtk::manage (new Gtk::Frame () );
expcontrast = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_LEVF")));
Gtk::HBox* hbcontrast = Gtk::manage( new Gtk::HBox());
tbcontrast = Gtk::manage( new Gtk::ToggleButton());
levelFrame->add(*expcontrast);
hbcontrast->set_spacing(8);
hbcontrast->pack_start(*tbcontrast);
tbcontrast->signal_toggled().connect( sigc::mem_fun(this, &Wavelet::expcontrastTog));
chromaFrame = Gtk::manage (new Gtk::Frame () );
expchroma = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_LEVCH")));
Gtk::HBox* hbchroma = Gtk::manage( new Gtk::HBox());
tbchroma = Gtk::manage( new Gtk::ToggleButton());
chromaFrame->add(*expchroma);
hbchroma->set_spacing(8);
hbchroma->pack_start(*tbchroma);
tbchroma->signal_toggled().connect( sigc::mem_fun(this, &Wavelet::expchromaTog));
toningFrame = Gtk::manage (new Gtk::Frame () );
exptoning = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_TON")));
Gtk::HBox* hbtoning = Gtk::manage( new Gtk::HBox());
tbtoning = Gtk::manage( new Gtk::ToggleButton());
toningFrame->add(*exptoning);
hbtoning->set_spacing(8);
hbtoning->pack_start(*tbtoning);
tbtoning->signal_toggled().connect( sigc::mem_fun(this, &Wavelet::exptoningTog));
noiseFrame = Gtk::manage (new Gtk::Frame () );
expnoise = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_NOISE")));
Gtk::HBox* hbnoise = Gtk::manage( new Gtk::HBox());
tbnoise = Gtk::manage( new Gtk::ToggleButton());
noiseFrame->add(*expnoise);
hbnoise->set_spacing(8);
hbnoise->pack_start(*tbnoise);
edgeFrame = Gtk::manage (new Gtk::Frame () );
expedge = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_EDGE")));
Gtk::HBox* hbedge = Gtk::manage( new Gtk::HBox());
tbedge = Gtk::manage( new Gtk::ToggleButton());
edgeFrame->add(*expedge);
hbedge->set_spacing(8);
hbedge->pack_start(*tbedge);
// tbtoning->signal_toggled().connect( sigc::mem_fun(this, &Wavelet::exptoningTog));
controlFrame = Gtk::manage (new Gtk::Frame () );
expgamut = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_CONTR")));
Gtk::HBox* hbgamut = Gtk::manage( new Gtk::HBox());
tbgamut = Gtk::manage( new Gtk::ToggleButton());
controlFrame->add(*expgamut);
hbgamut->set_spacing(8);
hbgamut->pack_start(*tbgamut);
tbgamut->signal_toggled().connect( sigc::mem_fun(this, &Wavelet::expgamutTog));
igRes = new RTImage ("histValue.png");
residualFrame = Gtk::manage (new Gtk::Frame () );
expresid = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_RESID")));
hbresid = Gtk::manage( new Gtk::HBox());
cbresid = Gtk::manage( new Gtk::CheckButton());
tbresid = Gtk::manage( new Gtk::ToggleButton());
tbresid->set_relief(Gtk::RELIEF_NONE);
tbresid->set_image(*igRes);
// Gtk::Label* l = Gtk::manage( new Gtk::Label("Sample label")); // just an example label
residualFrame->add(*expresid);
hbresid->set_spacing(8); // set spacing fo the horizontal box.
hbresid->pack_start(*tbresid); // add a toggle button to the box. you might want to change the text / icons to roll / unroll
//hbresid->pack_start(*cbresid); // add a CheckButton to the box.
// residualFrame->set_label_widget(*hbresid); // put the box as label for the frame.
tbresid->signal_toggled().connect( sigc::mem_fun(this, &Wavelet::expresidTog));
finalFrame = Gtk::manage (new Gtk::Frame () );
expfinal = Gtk::manage (new Gtk::Expander (M("TP_WAVELET_FINAL")));
Gtk::HBox* hbfinal = Gtk::manage( new Gtk::HBox());
tbfinal = Gtk::manage( new Gtk::ToggleButton());
finalFrame->add(*expfinal);
hbfinal->set_spacing(8);
hbfinal->pack_start(*tbfinal);
tbfinal->signal_toggled().connect( sigc::mem_fun(this, &Wavelet::expfinalTog));
//****************************************************
// Wavelet Settings
settingsFrame = Gtk::manage (new Gtk::Frame (M("TP_WAVELET_SETTINGS")));
settingsVBox = Gtk::manage (new Gtk::VBox());
@@ -270,17 +234,17 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
levBox->pack_start(*buttonBox, Gtk::PACK_SHRINK, 2);
Gtk::Button * contrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_MINUS")));
buttonBox->pack_start(*contrastMinusButton, Gtk::PACK_SHRINK, 2);
contrastMinusPressedConn = contrastMinusButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::contrastMinusPressed));
Gtk::Button * contrastMinusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_MINUS")));
buttonBox->pack_start(*contrastMinusButton, Gtk::PACK_SHRINK, 2);
contrastMinusPressedConn = contrastMinusButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::contrastMinusPressed));
Gtk::Button * neutralButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_NEUTRAL")));
buttonBox->pack_start(*neutralButton, Gtk::PACK_SHRINK, 2);
neutralPressedConn = neutralButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::neutralPressed));
Gtk::Button * neutralButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_NEUTRAL")));
buttonBox->pack_start(*neutralButton, Gtk::PACK_SHRINK, 2);
neutralPressedConn = neutralButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::neutralPressed));
Gtk::Button * contrastPlusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_PLUS")));
buttonBox->pack_start(*contrastPlusButton, Gtk::PACK_SHRINK, 2);
contrastPlusPressedConn = contrastPlusButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::contrastPlusPressed));
Gtk::Button * contrastPlusButton = Gtk::manage (new Gtk::Button(M("TP_WAVELET_CONTRAST_PLUS")));
buttonBox->pack_start(*contrastPlusButton, Gtk::PACK_SHRINK, 2);
contrastPlusPressedConn = contrastPlusButton->signal_pressed().connect( sigc::mem_fun(*this, &Wavelet::contrastPlusPressed));
buttonBox->show_all_children();
@@ -292,12 +256,12 @@ Wavelet::Wavelet () : FoldableToolPanel(this, "wavelet", M("TP_WAVELET_LABEL"),
{
Glib::ustring ss;
switch( i ){
case 0:
ss =Glib::ustring::compose( "%1 (%2)",(i+1), M("TP_WAVELET_FINEST"));break;
case 8:
ss =Glib::ustring::compose( "%1 (%2)",(i+1), M("TP_WAVELET_LARGEST"));break;
default:
ss =Glib::ustring::compose( "%1",(i+1));
case 0:
ss =Glib::ustring::compose( "%1 (%2)",(i+1), M("TP_WAVELET_FINEST"));break;
case 8:
ss =Glib::ustring::compose( "%1 (%2)",(i+1), M("TP_WAVELET_LARGEST"));break;
default:
ss =Glib::ustring::compose( "%1",(i+1));
}
correction[i] = Gtk::manage ( new Adjuster (ss, -100, 350, 1, 0) );
@@ -2284,7 +2248,6 @@ void Wavelet::adjusterChanged (Adjuster* a, double newval) {
}
}
void Wavelet::enabledChanged () {
if (!batchMode) {
int y=thres->getValue();
@@ -2309,76 +2272,6 @@ void Wavelet::enabledChanged () {
listener->panelChanged (EvWavEnabled, M("GENERAL_DISABLED"));
}
}
void Wavelet::expresidTog () {
if (tbresid->get_active ()) {
//residualFrame->setExpanded(true);
//expresid->setExpanded(true);
//hbresid->setExpanded(true);
// residualFrame->show();
}
else {
//expresid->setExpanded(false);
//residualFrame->setExpanded(false);
//residualFrame->hide();
}
}
void Wavelet::expcontrastTog () {
if (tbcontrast->get_active ()) {
levelFrame->show();
}
else {
levelFrame->hide();
}
}
void Wavelet::expchromaTog () {
if (tbchroma->get_active ()) {
chromaFrame->show();
}
else {
chromaFrame->hide();
}
}
void Wavelet::expgamutTog () {
if (tbcontrast->get_active ()) {
controlFrame->show();
}
else {
controlFrame->hide();
}
}
void Wavelet::expfinalTog () {
if (tbcontrast->get_active ()) {
finalFrame->show();
}
else {
finalFrame->hide();
}
}
void Wavelet::expdisplayTog () {
if (tbdisplay->get_active ()) {
dispFrame->show();
}
else {
dispFrame->hide();
}
}
void Wavelet::exptoningTog () {
if (tbtoning->get_active ()) {
toningFrame->show();
}
else {
toningFrame->hide();
}
}
void Wavelet::medianToggled () {

View File

@@ -69,17 +69,7 @@ protected:
Gtk::CheckButton * lipst;
Gtk::CheckButton * avoid;
Gtk::CheckButton * tmr;
Gtk::ToggleButton * tbresid;
Gtk::ToggleButton * tbcontrast;
Gtk::ToggleButton * tbgamut;
Gtk::ToggleButton * tbfinal;
Gtk::ToggleButton * tbchroma;
Gtk::ToggleButton * tbtoning;
Gtk::ToggleButton * tbnoise;
Gtk::ToggleButton * tbdisplay;
Gtk::ToggleButton * tbedge;
Gtk::CheckButton * cbresid;
Gtk::Image* igRes;
Gtk::Button * neutralchButton;
Adjuster* correction[9];
@@ -222,16 +212,6 @@ public:
void setEditProvider (EditDataProvider *provider);
void autoOpenCurve ();
// virtual Gtk::Expander* getExpander () { return NULL; }
// virtual void setExpanded (bool expanded) {}
// virtual bool getExpanded () { return false; }
/* Gtk::Expander * getExpander() { return expresid; }
void setExpanded (bool expanded) { if (expresid) expresid->set_expanded( expanded ); }
bool getExpanded () { if (expresid) return expresid->get_expanded(); return false; }
*/
void read (const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited=NULL);
void write (rtengine::procparams::ProcParams* pp, ParamsEdited* pedited=NULL);
void setDefaults (const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited=NULL);
@@ -247,13 +227,6 @@ public:
void medianlevToggled ();
void linkedgToggled ();
void lipstToggled ();
void expcontrastTog ();
void expresidTog ();
void expdisplayTog ();
void expgamutTog ();
void expfinalTog ();
void expchromaTog ();
void exptoningTog ();
void avoidToggled ();
void tmrToggled ();
void neutralPressed ();