X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fcolorplaneexport.cpp;h=b4daaa54ccbc13557a15a6fe204481f521e86a80;hb=c3302003093710ee247ad84c0fe2ef3c579d417f;hp=107cd4e7b1ca77d86c0b75f54757d90046b589e0;hpb=a0782da90d2e491e2f1ec9ad8a114883fb2e02b4;p=kdenlive diff --git a/src/colorplaneexport.cpp b/src/colorplaneexport.cpp index 107cd4e7..b4daaa54 100644 --- a/src/colorplaneexport.cpp +++ b/src/colorplaneexport.cpp @@ -69,21 +69,21 @@ ColorPlaneExport::~ColorPlaneExport() ///// Helper functions ///// -void ColorPlaneExport::enableSliderScaling(const bool &enable) +void ColorPlaneExport::enableSliderScaling(bool enable) { sliderScaling->setEnabled(enable); lblScaling->setEnabled(enable); lblScaleNr->setEnabled(enable); } -void ColorPlaneExport::enableSliderColor(const bool &enable) +void ColorPlaneExport::enableSliderColor(bool enable) { sliderColor->setEnabled(enable); lblSliderName->setEnabled(enable); lblColNr->setEnabled(enable); } -void ColorPlaneExport::enableCbVariant(const bool &enable) +void ColorPlaneExport::enableCbVariant(bool enable) { cbVariant->setEnabled(enable); lblVariant->setEnabled(enable); @@ -123,7 +123,7 @@ void ColorPlaneExport::slotUpdateDisplays() break; } - lblSize->setText(i18n("%1 px", QVariant(tResX->text()).toInt()*QVariant(tResY->text()).toInt())); + lblSize->setText(i18n("%1 px", tResX->text().toInt()*tResY->text().toInt())); } void ColorPlaneExport::slotValidate() @@ -168,6 +168,7 @@ void ColorPlaneExport::slotExportPlane() } } QImage img; + QColor col; QSize size(QVariant(tResX->text()).toInt(), QVariant(tResY->text()).toInt()); switch (cbColorspace->itemData(cbColorspace->currentIndex()).toInt()) { case CPE_YUV: @@ -190,7 +191,8 @@ void ColorPlaneExport::slotExportPlane() img = m_colorTools->hsvHueShiftPlane(size, sliderColor->value(), sliderScaling->value(), -180, 180); break; case CPE_HSV_SATURATION: - img = m_colorTools->hsvSaturationPlane(size, sliderColor->value(), 0, 255); + col.setHsv(0, 0, sliderColor->value()); + img = m_colorTools->hsvCurvePlane(size, col, ColorTools::COM_H, ColorTools::COM_S); break; default: Q_ASSERT(false); @@ -273,3 +275,5 @@ void ColorPlaneExport::slotColormodeChanged() this->update(); slotUpdateDisplays(); } + +#include "colorplaneexport.moc"