SVN commit 547462 by fjcruz:
Color correction dialog has a new option: now user can choose to only embed the profile into the image without make any transform. Test and feedback, please. Gilles, another item to delte from TODO list? CCMAIL: [hidden email] , [hidden email] M +9 -1 colorcorrectiondlg.cpp M +1 -0 colorcorrectiondlg.h M +50 -6 dimginterface.cpp --- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/colorcorrectiondlg.cpp #547461:547462 @@ -50,7 +50,7 @@ ColorCorrectionDlg::ColorCorrectionDlg(QWidget* parent, DImg *preview, IccTransform *iccTrans, const QString& file) : KDialogBase(parent, "", true, QString::null, - Help|Ok|Cancel, Ok, true) + Help|Ok|Apply|Cancel, Ok, true) { m_iccTrans = iccTrans; @@ -58,6 +58,7 @@ setHelp("iccprofile.anchor", "digikam"); setButtonText(Ok, i18n("Apply")); setButtonText(Cancel, i18n("Do Nothing")); + setButtonText(Apply, i18n("Embed only")); QFileInfo fi(file); setCaption(fi.fileName()); @@ -142,6 +143,7 @@ connect(embeddedProfInfo, SIGNAL(clicked()), this, SLOT(slotEmbeddedProfInfo()) ); + connect(this, SIGNAL(applyClicked()), this, SLOT(slotApplyClicked())); } ColorCorrectionDlg::~ColorCorrectionDlg() @@ -166,6 +168,12 @@ infoDlg.exec(); } +void ColorCorrectionDlg::slotApplyClicked() +{ + kdDebug() << "colorcorrectiondlg: Apply pressed" << endl; + done(-1); +} + } // NameSpace Digikam #include "colorcorrectiondlg.moc" --- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/colorcorrectiondlg.h #547461:547462 @@ -50,6 +50,7 @@ void slotCurrentProfInfo(); void slotEmbeddedProfInfo(); + void slotApplyClicked(); private: --- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #547461:547462 @@ -340,12 +340,34 @@ QFile::encodeName(d->cmSettings->workspaceSetting)); ColorCorrectionDlg dlg(d->parent, &preview, &trans, fileName); - if (dlg.exec() == QDialog::Accepted) +// if (dlg.exec() == QDialog::Accepted) +// { +// if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); +// trans.apply( d->image ); +// d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); +// if (d->parent) d->parent->unsetCursor(); +// } +// else if (dlg.exec() == -1) +// { +// // if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); +// // d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); +// // if (d->parent) d->parent->unsetCursor(); +// kdDebug() << "dimginterface.cpp: Apply pressed" << endl; +// } + switch (dlg.exec()) { - if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); - trans.apply( d->image ); - d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); - if (d->parent) d->parent->unsetCursor(); + case QDialog::Accepted: + if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); + trans.apply( d->image ); + d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); + if (d->parent) d->parent->unsetCursor(); + break; + case -1: + if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); + d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); + if (d->parent) d->parent->unsetCursor(); + kdDebug() << "dimginterface.cpp: Apply pressed" << endl; + break; } } } @@ -375,12 +397,34 @@ trans.setProfiles(QFile::encodeName(d->cmSettings->workspaceSetting)); ColorCorrectionDlg dlg(d->parent, &preview, &trans, fileName); - if (dlg.exec() == QDialog::Accepted) +// if (dlg.exec() == QDialog::Accepted) +// { +// if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); +// trans.apply( d->image ); +// d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); +// if (d->parent) d->parent->unsetCursor(); +// } +// else if (dlg.exec()== -1) +// { +// // if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); +// // d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); +// // if (d->parent) d->parent->unsetCursor(); +// kdDebug() << "dimginterface.cpp: Apply pressed" << endl; +// } + switch (dlg.exec()) { + case QDialog::Accepted: if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); trans.apply( d->image ); d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); if (d->parent) d->parent->unsetCursor(); + break; + case -1: + if (d->parent) d->parent->setCursor( KCursor::waitCursor() ); + d->image.getICCProfilFromFile(QFile::encodeName(d->cmSettings->workspaceSetting)); + if (d->parent) d->parent->unsetCursor(); + kdDebug() << "dimginterface.cpp: Apply pressed" << endl; + break; } } } _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |