Commit bebef401 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

polish

svn path=/trunk/extragear/graphics/digikam/; revision=1177858
parent 6438df6b
......@@ -251,10 +251,12 @@ void LensFunCameraSelector::slotUseMetadata(bool b)
d->focal->setEnabled(false);
d->aperture->setEnabled(false);
d->distance->setEnabled(false);
emit signalLensSettingsChanged();
}
else
{
findFromMetadata();
emit signalLensSettingsChanged();
}
}
else
......@@ -448,36 +450,43 @@ void LensFunCameraSelector::slotUpdateLensCombo()
void LensFunCameraSelector::slotCameraSelected()
{
QVariant v = d->model->combo()->itemData( d->model->currentIndex() );
d->iface->m_settings.usedCamera = v.value<LensFunContainer::DevicePtr>();
d->iface->m_settings.usedCamera = d->metadataUsage->isChecked() && d->passiveMetadataUsage ? 0 :
v.value<LensFunContainer::DevicePtr>();
}
void LensFunCameraSelector::slotLensSelected()
{
QVariant v = d->lens->combo()->itemData( d->lens->currentIndex() );
d->iface->m_settings.usedLens = v.value<LensFunContainer::LensPtr>();
d->iface->m_settings.usedLens = d->metadataUsage->isChecked() && d->passiveMetadataUsage ? 0 :
v.value<LensFunContainer::LensPtr>();
if (d->iface->m_settings.usedLens &&
d->iface->m_settings.cropFactor <= 0.0) // this should not happen
d->iface->m_settings.cropFactor = d->iface->m_settings.usedLens->CropFactor;
else
d->iface->m_settings.cropFactor = -1.0;
emit signalLensSettingsChanged();
}
void LensFunCameraSelector::slotFocalChanged()
{
d->iface->m_settings.focalLength = d->metadataUsage->isChecked() ? -1.0 : d->focal->value();
d->iface->m_settings.focalLength = d->metadataUsage->isChecked() && d->passiveMetadataUsage ? -1.0 :
d->focal->value();
emit signalLensSettingsChanged();
}
void LensFunCameraSelector::slotApertureChanged()
{
d->iface->m_settings.aperture = d->metadataUsage->isChecked() ? -1.0 : d->aperture->value();
d->iface->m_settings.aperture = d->metadataUsage->isChecked() && d->passiveMetadataUsage ? -1.0 :
d->aperture->value();
emit signalLensSettingsChanged();
}
void LensFunCameraSelector::slotDistanceChanged()
{
d->iface->m_settings.subjectDistance = d->metadataUsage->isChecked() ? -1.0 : d->distance->value();
d->iface->m_settings.subjectDistance = d->metadataUsage->isChecked() && d->passiveMetadataUsage ? -1.0 :
d->distance->value();
emit signalLensSettingsChanged();
}
......
......@@ -75,7 +75,7 @@ LensFunSettings::LensFunSettings(QWidget* parent)
{
QGridLayout* grid = new QGridLayout(this);
QLabel* title = new QLabel(i18n("Lens Corrections to apply:"));
QLabel* title = new QLabel(i18n("Lens Corrections to Apply:"));
d->filterCCA = new QCheckBox(i18n("Chromatic Aberration"));
d->filterCCA->setWhatsThis(i18n("Chromatic aberration is easily recognized as color fringes "
"towards the image corners. CA is due to a varying lens focus "
......
......@@ -68,6 +68,11 @@ LensAutoFix::LensAutoFix(QObject* parent)
setToolIcon(KIcon(SmallIcon("lensautofix")));
QWidget* box = new QWidget;
QLabel* note = new QLabel(i18n("<b>Use Metadata</b> option will parse images information at "
"queue run-time to find relevant lens features."));
note->setWordWrap(true);
note->setFrameStyle(QFrame::StyledPanel | QFrame::Raised);
d->cameraSelector = new LensFunCameraSelector();
KSeparator* line = new KSeparator(Qt::Horizontal);
d->settingsView = new LensFunSettings();
......@@ -75,10 +80,11 @@ LensAutoFix::LensAutoFix(QObject* parent)
d->cameraSelector->enableUseMetadata(true);
QGridLayout* grid = new QGridLayout(box);
grid->addWidget(d->cameraSelector, 0, 0, 1, 2);
grid->addWidget(line, 1, 0, 1, 2);
grid->addWidget(d->settingsView, 2, 0, 1, 2);
grid->setRowStretch(3, 10);
grid->addWidget(note, 0, 0, 1, 2);
grid->addWidget(d->cameraSelector, 1, 0, 1, 2);
grid->addWidget(line, 2, 0, 1, 2);
grid->addWidget(d->settingsView, 3, 0, 1, 2);
grid->setRowStretch(4, 10);
grid->setMargin(KDialog::spacingHint());
grid->setSpacing(KDialog::spacingHint());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment