[Digikam-devel] branches/digikam/0.8-experimental/digikam

Gilles Caulier caulier.gilles at free.fr
Tue Jun 28 07:03:29 BST 2005


SVN commit 429573 by cgilles:

digiKam Auto-Color Correction tool : 
- update preview content during resizing operations.
- Remember dialog size.
- Fix cursor rules.
CCMAIL: digikam-devel at kde.org

 M  +9 -8      imageplugins/imageeffect_autocorrection.cpp  
 M  +2 -2      utilities/imageeditor/imagewidget.cpp  
 M  +1 -1      utilities/imageeditor/imagewidget.h  


--- branches/digikam/0.8-experimental/digikam/imageplugins/imageeffect_autocorrection.cpp #429572:429573
@@ -33,6 +33,7 @@
 #include <kcursor.h>
 #include <klocale.h>
 #include <kstandarddirs.h>
+#include <kapplication.h>
 
 // Digikam includes.
 
@@ -61,7 +62,7 @@
     frame->setFrameStyle(QFrame::Panel|QFrame::Sunken);
     QVBoxLayout* l = new QVBoxLayout(frame, 5, 0);
     m_previewWidget = new Digikam::ImageWidget(480, 320, frame);
-    QWhatsThis::add( m_previewWidget, i18n("<p>This is the preview of auto-color correction tool"));
+    QWhatsThis::add( m_previewWidget, i18n("<p>This is the auto-color correction tool preview"));
 
     l->addWidget(m_previewWidget, 0);
     topLayout->addWidget(frame);
@@ -101,7 +102,7 @@
     hlay->addWidget(label, 1);
     hlay->addWidget(m_typeCB, 5);
 
-    adjustSize();
+    resize(configDialogSize("Auto-Color Correction Dialog"));
     
     QTimer::singleShot(0, this, SLOT(slotEffect()));
 
@@ -113,18 +114,18 @@
 
 ImageEffect_AutoCorrection::~ImageEffect_AutoCorrection()
 {
+    saveDialogSize("Auto-Color Correction Dialog");
 }
 
 void ImageEffect_AutoCorrection::closeEvent(QCloseEvent *e)
 {
     delete m_previewWidget;
-
     e->accept();
 }
 
 void ImageEffect_AutoCorrection::resizeEvent(QResizeEvent *)
 {
-    m_previewWidget->updateImage();
+    m_previewWidget->updateImageIface();
     slotEffect();
 }
 
@@ -136,7 +137,7 @@
 
 void ImageEffect_AutoCorrection::slotEffect()
 {
-    m_parent->setCursor( KCursor::waitCursor() );
+    kapp->setOverrideCursor( KCursor::waitCursor() );
     Digikam::ImageIface* iface = m_previewWidget->imageIface();
 
     uint * data = iface->getPreviewData();
@@ -152,12 +153,12 @@
     delete [] data;
 
     m_previewWidget->update();
-    m_parent->setCursor( KCursor::arrowCursor() );
+    kapp->restoreOverrideCursor();
 }
 
 void ImageEffect_AutoCorrection::slotOk()
 {
-    m_parent->setCursor( KCursor::waitCursor() );
+    kapp->setOverrideCursor( KCursor::waitCursor() );
     Digikam::ImageIface* iface = m_previewWidget->imageIface();
 
     uint* data  = iface->getOriginalData();
@@ -196,7 +197,7 @@
        delete [] data;
        }
 
-    m_parent->setCursor( KCursor::arrowCursor() );
+    kapp->restoreOverrideCursor();
     accept();
 }
 
--- branches/digikam/0.8-experimental/digikam/utilities/imageeditor/imagewidget.cpp #429572:429573
@@ -71,7 +71,7 @@
     p.end();
 }
 
-void ImageWidget::updateImage(void)
+void ImageWidget::updateImageIface(void)
 {
     delete [] m_data;
     delete m_iface;
@@ -89,7 +89,7 @@
 
 void ImageWidget::resizeEvent(QResizeEvent *)
 {
-    updateImage();
+    updateImageIface();
 }
 
 }
--- branches/digikam/0.8-experimental/digikam/utilities/imageeditor/imagewidget.h #429572:429573
@@ -39,7 +39,7 @@
     ~ImageWidget();
 
     ImageIface* imageIface();
-    void updateImage(void);
+    void updateImageIface(void);
 
 protected:
 



More information about the Digikam-devel mailing list