Completing issue 1514: "Lab adjustements : CC curve and LC Hskin curve" + bugfix of the openIfNonlinear mechanism

This commit is contained in:
natureh
2012-08-16 13:53:17 +02:00
parent 88cf910c6d
commit 9c66911c99
32 changed files with 417 additions and 344 deletions

View File

@@ -192,12 +192,13 @@ void CurveEditor::updateBackgroundHistogram (LUTu & hist) {
}
// Open up the curve if it has modifications and it's not already opened
// Returns: is it non-linear?
// Returns: true if curve was non linear and opened
bool CurveEditor::openIfNonlinear() {
bool nonLinear = tempCurve.size() && (tempCurve[0] > subGroup->getValLinear()) && (tempCurve[0] < subGroup->getValUnchanged());
if (nonLinear && !curveType->get_active()) {
// Will toggle the event doing the display
// Will trigger the signal_clicked event doing the display
curveType->set_active( true );
}
@@ -211,12 +212,14 @@ void CurveEditor::setTooltip(Glib::ustring ttip) {
Glib::ustring::compose("%1\n<b>%2</b>", ttip, M("CURVEEDITOR_TYPE")));
}
void CurveEditor::setLeftBarColorProvider(ColorProvider* cp) {
void CurveEditor::setLeftBarColorProvider(ColorProvider* cp, int callerId) {
leftBarCP = cp;
leftBarCId = callerId;
}
void CurveEditor::setBottomBarColorProvider(ColorProvider* cp) {
void CurveEditor::setBottomBarColorProvider(ColorProvider* cp, int callerId) {
bottomBarCP = cp;
bottomBarCId = callerId;
}
void CurveEditor::setLeftBarBgGradient (const std::vector<GradientMilestone> &milestones) {
@@ -227,8 +230,13 @@ void CurveEditor::setBottomBarBgGradient (const std::vector<GradientMilestone> &
bottomBarBgGradient = milestones;
}
void CurveEditor::setCurveColorProvider(ColorProvider* cp) {
void CurveEditor::refresh () {
subGroup->switchGUI();
}
void CurveEditor::setCurveColorProvider(ColorProvider* cp, int callerId) {
curveCP = cp;
curveCId = callerId;
}
ColorProvider* CurveEditor::getLeftBarColorProvider() {
@@ -243,6 +251,18 @@ ColorProvider* CurveEditor::getCurveColorProvider() {
return curveCP;
}
int CurveEditor::getLeftBarCallerId() {
return leftBarCId;
}
int CurveEditor::getBottomBarCallerId() {
return bottomBarCId;
}
int CurveEditor::getCurveCallerId() {
return curveCId;
}
std::vector<GradientMilestone> CurveEditor::getBottomBarBgGradient () const {
return bottomBarBgGradient;
}