///// 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);
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()
}
}
QImage img;
+ QColor col;
QSize size(QVariant(tResX->text()).toInt(), QVariant(tResY->text()).toInt());
switch (cbColorspace->itemData(cbColorspace->currentIndex()).toInt()) {
case CPE_YUV:
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);
this->update();
slotUpdateDisplays();
}
+
+#include "colorplaneexport.moc"