Index: imageplugins/imageeffect_bwsepia.cpp
===================================================================
--- imageplugins/imageeffect_bwsepia.cpp	(revision 539626)
+++ imageplugins/imageeffect_bwsepia.cpp	(working copy)
@@ -38,6 +38,7 @@
 #include <qcombobox.h>
 #include <qwhatsthis.h>
 #include <qtooltip.h>
+#include <qintdict.h>
 
 // KDE includes.
 
@@ -61,6 +62,8 @@
 #include "colorgradientwidget.h"
 #include "dimg.h"
 #include "bcgmodifier.h"
+#include "listboxpreviewitem.h"
+#include "listboxwhatsthis.h"
 
 // Local includes.
 
@@ -69,64 +72,92 @@
 namespace DigikamImagesPluginCore
 {
 
-class ListBoxWhatsThis : public QWhatsThis 
+class PreviewPixmapFactory : public QObject
 {
-
 public:
 
-    ListBoxWhatsThis(QListBox* w) : QWhatsThis(w), m_listBox(w) {}
-    virtual QString text (const QPoint &);
-    void add(QListBoxItem*, const QString& text);
+    PreviewPixmapFactory(ImageEffect_BWSepia* bwSepia);
 
-protected:
+    void invalidate() { m_previewPixmapMap.clear(); }
 
-    QMap<QListBoxItem*, QString>  m_itemWhatsThisMap;
-    QListBox                     *m_listBox;
+    const QPixmap* pixmap(int id);
+
+private:
+    QPixmap makePixmap(int id);
+
+    QIntDict<QPixmap> m_previewPixmapMap;
+    ImageEffect_BWSepia* m_bwSepia;
 };
 
-QString ListBoxWhatsThis::text(const QPoint &p)
+PreviewPixmapFactory::PreviewPixmapFactory(ImageEffect_BWSepia* bwSepia)
+    : QObject(bwSepia),
+      m_bwSepia(bwSepia)
 {
-    QListBoxItem* item = m_listBox->itemAt(p);
+    m_previewPixmapMap.setAutoDelete(true);
+}
 
-    if (item != 0) 
-        return m_itemWhatsThisMap[item];
+const QPixmap* PreviewPixmapFactory::pixmap(int id)
+{
+    if (m_previewPixmapMap.find(id) == 0) {
+        QPixmap pix = makePixmap(id);
+        m_previewPixmapMap.insert(id, new QPixmap(pix));
+    }
 
-    return QString::null;
+    QPixmap* res = m_previewPixmapMap[id];
+
+    return res;
 }
 
-void ListBoxWhatsThis::add(QListBoxItem* item, const QString& text)
+QPixmap PreviewPixmapFactory::makePixmap(int id)
 {
-    m_itemWhatsThisMap[item] = text;
+    return m_bwSepia->getThumbnailForEffect(id);
 }
 
-class ListBoxPreviewItem : public QListBoxPixmap
+
+class ListBoxBWPreviewItem : public Digikam::ListBoxPreviewItem
 {
 public:
-    ListBoxPreviewItem(QListBox *listbox, const QPixmap &pix, const QString &text)
-        : QListBoxPixmap(listbox, pix, text) {};
 
-    virtual int height ( const QListBox * lb ) const;
-    virtual int width ( const QListBox * lb ) const;
+    ListBoxBWPreviewItem(QListBox *listbox, const QString &text,
+                         PreviewPixmapFactory* factory, int id)
+        : ListBoxPreviewItem(listbox, QPixmap(), text),
+          m_previewPixmapFactory(factory),
+          m_id(id)
+    {};
+
+    virtual const QPixmap* pixmap() const;
+
+private:
+    PreviewPixmapFactory* m_previewPixmapFactory;
+    int m_id;
 };
 
-int ListBoxPreviewItem::height(const QListBox *lb) const
+const QPixmap* ListBoxBWPreviewItem::pixmap() const
 {
-    int height = QListBoxPixmap::height(lb);
-    return QMAX(height, pixmap()->height() + 5);
+    return m_previewPixmapFactory->pixmap(m_id);
 }
 
-int ListBoxPreviewItem::width(const QListBox *lb) const
-{
-    int width = QListBoxPixmap::width(lb);
-    return QMAX(width, pixmap()->width() + 5);
-}
 
 // -----------------------------------------------------------------------------------
 
+
 ImageEffect_BWSepia::ImageEffect_BWSepia(QWidget* parent)
                    : Digikam::ImageDlgBase(parent, i18n("Convert to Black & White"), 
                                            "convertbw", false),
-                     m_destinationPreviewData(0L)
+                     m_destinationPreviewData(0L),
+                     m_channelCB(0),
+                     m_scaleBG(0),
+                     m_bwFilters(0),
+                     m_bwTone(0),
+                     m_overExposureIndicatorBox(0),
+                     m_cInput(0),
+                     m_tab(0),
+                     m_previewWidget(0),
+                     m_histogramWidget(0),
+                     m_curvesWidget(0),
+                     m_curves(0),
+                     m_originalImage(0),
+                     m_previewPixmapFactory(0)
 {
     setHelp("blackandwhitetool.anchor", "digikam");
 
@@ -215,49 +246,44 @@
     m_bwFilters->setColumnMode(1);
     m_bwFilters->setVariableWidth(false);
     m_bwFilters->setVariableHeight(false);
-    ListBoxWhatsThis* whatsThis = new ListBoxWhatsThis(m_bwFilters);
+    Digikam::ListBoxWhatsThis* whatsThis = new Digikam::ListBoxWhatsThis(m_bwFilters);
+    m_previewPixmapFactory = new PreviewPixmapFactory(this);
 
     int type = BWNoFilter;
-    QPixmap pix = getThumbnailForEffect(type);
 
-    QListBoxItem *item = new ListBoxPreviewItem(m_bwFilters, pix, i18n("No Black & White Filter"));
+    QListBoxItem *item = new ListBoxBWPreviewItem(m_bwFilters, i18n("No Black & White Filter"), m_previewPixmapFactory, type);
     whatsThis->add( item, i18n("<b>No Black & White Filter</b>:"
                                "<p>Do not apply a black a filter to the image.</p>"));
     
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwFilters, pix, i18n("Neutral"));
+    item = new ListBoxBWPreviewItem(m_bwFilters, i18n("Neutral"), m_previewPixmapFactory, type);
     whatsThis->add( item, i18n("<img source=\"%1\"> <b>Neutral Black & White</b>:"
                                    "<p>Simulate black and white neutral film exposure.</p>")
                                    .arg(previewEffectPic("neutralbw")));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwFilters, pix, i18n("Green Filter"));
+    item = new ListBoxBWPreviewItem(m_bwFilters, i18n("Green Filter"), m_previewPixmapFactory, type);
     whatsThis->add( item, i18n("<img source=\"%1\"> <b>Black & White with Green Filter</b>:"
                                  "<p>Simulate black and white film exposure using green filter. "
                                  "This provides an universal asset for all scenics, especially suited for portraits "
                                  "photographed against sky.</p>").arg(previewEffectPic("bwgreen")));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwFilters, pix, i18n("Orange Filter"));
+    item = new ListBoxBWPreviewItem(m_bwFilters, i18n("Orange Filter"), m_previewPixmapFactory, type);
     whatsThis->add( item, i18n("<img source=\"%1\"> <b>Black & White with Orange Filter</b>:"
                                   "<p>Simulate black and white film exposure using orange filter. "
                                   "This will enhances landscapes, marine scenes and aerial "
                                   "photography.</p>").arg(previewEffectPic("bworange")));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwFilters, pix, i18n("Red Filter"));
+    item = new ListBoxBWPreviewItem(m_bwFilters, i18n("Red Filter"), m_previewPixmapFactory, type);
     whatsThis->add( item, i18n("<img source=\"%1\"> <b>Black & White with Red Filter</b>:"
                                "<p>Simulate black and white film exposure using red filter. "
                                "Using this one creates dramatic sky effects and simulates moonlight scenes "
                                "in daytime.</p>").arg(previewEffectPic("bwred")));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwFilters, pix, i18n("Yellow Filter"));
+    item = new ListBoxBWPreviewItem(m_bwFilters, i18n("Yellow Filter"), m_previewPixmapFactory, type);
     whatsThis->add( item, i18n("<img source=\"%1\"> <b>Black & White with Yellow Filter</b>:"
                                   "<p>Simulate black and white film exposure using yellow filter. "
                                   "Most natural tonal correction and improves contrast. Ideal for "
@@ -271,46 +297,40 @@
     m_bwTone->setColumnMode(1);
     m_bwTone->setVariableWidth(false);
     m_bwTone->setVariableHeight(false);
-    ListBoxWhatsThis* whatsThis2 = new ListBoxWhatsThis(m_bwTone);
+    Digikam::ListBoxWhatsThis* whatsThis2 = new Digikam::ListBoxWhatsThis(m_bwTone);
 
     type = BWNoTone;
 
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwTone, pix, i18n("No Tone Filter"));
+    item = new ListBoxBWPreviewItem(m_bwTone, i18n("No Tone Filter"), m_previewPixmapFactory, type);
     whatsThis2->add( item, i18n("<b>No Tone Filter</b>:"
                                 "<p>Do not apply a tone filter to the image.</p>"));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwTone, pix, i18n("Sepia Tone"));
+    item = new ListBoxBWPreviewItem(m_bwTone, i18n("Sepia Tone"), m_previewPixmapFactory, type);
     whatsThis2->add( item, i18n("<img source=\"%1\"> <b>Black & White with Sepia Tone</b>:"
                                  "<p>Gives a warm highlight and mid-tone while adding a bit of coolness to "
                                  "the shadows-very similar to the process of bleaching a print and re-developing in a sepia "
                                  "toner.</p>").arg(previewEffectPic("sepia")));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwTone, pix, i18n("Brown Tone"));
+    item = new ListBoxBWPreviewItem(m_bwTone, i18n("Brown Tone"), m_previewPixmapFactory, type);
     whatsThis2->add( item, i18n("<img source=\"%1\"> <b>Black & White with Brown Tone</b>:"
                                  "<p>This filter is more neutral than Sepia Tone filter.</p>").arg(previewEffectPic("browntone")));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwTone, pix, i18n("Cold Tone"));
+    item = new ListBoxBWPreviewItem(m_bwTone, i18n("Cold Tone"), m_previewPixmapFactory, type);
     whatsThis2->add( item, i18n("<img source=\"%1\"> <b>Black & White with Cold Tone</b>:"
                                 "<p>Start subtle and replicate printing on a cold tone black and white "
                                 "paper such as a bromide enlarging paper.</p>").arg(previewEffectPic("coldtone")));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwTone, pix, i18n("Selenium Tone"));
+    item = new ListBoxBWPreviewItem(m_bwTone, i18n("Selenium Tone"), m_previewPixmapFactory, type);
     whatsThis2->add( item, i18n("<img source=\"%1\"> <b>Black & White with Selenium Tone</b>:"
                                     "<p>This effect replicate traditional selenium chemical toning done "
                                     "in the darkroom.</p>").arg(previewEffectPic("selenium")));
 
     ++type;
-    pix = getThumbnailForEffect(type);
-    item = new ListBoxPreviewItem(m_bwTone, pix, i18n("Platinum Tone"));
+    item = new ListBoxBWPreviewItem(m_bwTone, i18n("Platinum Tone"), m_previewPixmapFactory, type);
     whatsThis2->add( item, i18n("<img source=\"%1\"> <b>Black & White with Platinum Tone</b>:"
                                      "<p>This effect replicate traditional platinum chemical toning done "
                                      "in the darkroom.</p>").arg(previewEffectPic("platinum")));
@@ -431,7 +451,27 @@
 QPixmap ImageEffect_BWSepia::getThumbnailForEffect(int type) 
 {
     Digikam::DImg thumb = m_thumbnailImage.copy();
-    blackAndWhiteConversion(thumb.bits(), thumb.width(), thumb.height(), thumb.sixteenBit(), type);
+    int w   = thumb.width();
+    int h   = thumb.height();
+    bool sb = thumb.sixteenBit();
+    bool a  = thumb.hasAlpha();
+
+    blackAndWhiteConversion(thumb.bits(), w, h, sb, type);
+
+    if (m_curves && m_overExposureIndicatorBox) { // in case we're called before the ctor is done
+        uchar *targetData = new uchar[w*h*(sb ? 8 : 4)];
+        m_curves->curvesLutSetup(Digikam::ImageHistogram::AlphaChannel, m_overExposureIndicatorBox->isChecked());
+        m_curves->curvesLutProcess(thumb.bits(), targetData, w, h);
+
+        Digikam::DImg preview(w, h, sb, a, targetData);
+        Digikam::BCGModifier cmod;
+        cmod.setContrast(m_cInput->value() + (double)(1.00));
+        cmod.applyBCG(preview);
+
+        thumb.putImageData(preview.bits());
+
+        delete [] targetData;
+    }
     return (thumb.convertToPixmap());
 }
 
@@ -510,6 +550,10 @@
     m_bwTone->blockSignals(false);
     m_bwFilters->blockSignals(false);
 
+    m_previewPixmapFactory->invalidate();
+    m_bwFilters->triggerUpdate(false);
+    m_bwTone->triggerUpdate(false);
+
     slotEffect();
 }
 
@@ -561,6 +605,16 @@
     kapp->restoreOverrideCursor();
 }
 
+void ImageEffect_BWSepia::slotTimer()
+{
+    Digikam::ImageDlgBase::slotTimer();
+    if (m_previewPixmapFactory && m_bwFilters && m_bwTone) {
+        m_previewPixmapFactory->invalidate();
+        m_bwFilters->triggerUpdate(false);
+        m_bwTone->triggerUpdate(false);
+    }
+}
+
 void ImageEffect_BWSepia::finalRendering()
 {
     kapp->setOverrideCursor( KCursor::waitCursor() );
Index: imageplugins/imageeffect_bwsepia.h
===================================================================
--- imageplugins/imageeffect_bwsepia.h	(revision 539626)
+++ imageplugins/imageeffect_bwsepia.h	(working copy)
@@ -53,6 +53,8 @@
 namespace DigikamImagesPluginCore
 {
 
+class PreviewPixmapFactory;
+
 class ImageEffect_BWSepia : public Digikam::ImageDlgBase
 {
     Q_OBJECT
@@ -62,6 +64,11 @@
     ImageEffect_BWSepia(QWidget *parent);
     ~ImageEffect_BWSepia();
 
+    friend class PreviewPixmapFactory;
+
+protected:
+    QPixmap getThumbnailForEffect(int type);
+
 private:
 
     enum BlackWhiteConversionType
@@ -130,11 +137,12 @@
     Digikam::DImg                *m_originalImage;
     Digikam::DImg                 m_thumbnailImage;
 
+    PreviewPixmapFactory         *m_previewPixmapFactory;
+    
 private:
 
     void blackAndWhiteConversion(uchar *data, int w, int h, bool sb, int type);
     QString previewEffectPic(QString name);
-    QPixmap getThumbnailForEffect(int type);
     
 private slots:
 
@@ -145,6 +153,9 @@
     void slotSpotColorChanged(const Digikam::DColor &color);    
     void slotColorSelectedFromTarget( const Digikam::DColor &color );
 
+protected slots:
+    virtual void slotTimer();
+
 protected:
 
     void finalRendering();
Index: imageplugins/imageeffect_autocorrection.cpp
===================================================================
--- imageplugins/imageeffect_autocorrection.cpp	(revision 539626)
+++ imageplugins/imageeffect_autocorrection.cpp	(working copy)
@@ -36,6 +36,7 @@
 #include <qpushbutton.h>
 #include <qcheckbox.h>
 #include <qcombobox.h>
+#include <qlistbox.h>
 #include <qwhatsthis.h>
 #include <qtooltip.h>
 
@@ -54,6 +55,8 @@
 #include "colorgradientwidget.h"
 #include "dimgimagefilters.h"
 #include "dimg.h"
+#include "listboxpreviewitem.h"
+#include "listboxwhatsthis.h"
 
 // Local includes.
 
@@ -64,8 +67,8 @@
 
 ImageEffect_AutoCorrection::ImageEffect_AutoCorrection(QWidget* parent)
                           : Digikam::ImageDlgBase(parent, i18n("Auto Color Correction"), "autocorrection", false)
+                          ,m_destinationPreviewData(0L)
 {
-    m_destinationPreviewData = 0L;
     setHelp("autocolorcorrectiontool.anchor", "digikam");
     
     // -------------------------------------------------------------
@@ -77,6 +80,10 @@
     setPreviewAreaWidget(m_previewWidget);
     
     // -------------------------------------------------------------
+
+    Digikam::ImageIface iface(0, 0);
+    m_thumbnailImage = iface.getOriginalImg()->smoothScale(128, 128, QSize::ScaleMin);
+
     
     QWidget *gboxSettings     = new QWidget(plainPage());
     QGridLayout* gridSettings = new QGridLayout( gboxSettings, 4, 4, marginHint(), spacingHint());
@@ -142,27 +149,36 @@
 
     // -------------------------------------------------------------
     
-    m_correctionTools = new QButtonGroup(1, Qt::Horizontal, i18n("Auto-Color correction tool:"), gboxSettings);
+    m_correctionTools = new QListBox(gboxSettings);
+    m_correctionTools->setColumnMode(1);
+    m_correctionTools->setVariableWidth(false);
+    m_correctionTools->setVariableHeight(false);
+    Digikam::ListBoxWhatsThis* whatsThis = new Digikam::ListBoxWhatsThis(m_correctionTools);
 
-    QRadioButton *autoLevels = new QRadioButton(i18n("Auto Levels"), m_correctionTools);
-    QWhatsThis::add( autoLevels, i18n("<img source=\"%1\"> <b>Auto Levels</b>:"
-                                     "<p>This option maximizes the tonal range in the Red, "
-                                     "Green, and Blue channels. It search the image shadow and highlight "
-                                     "limit values and adjust the Red, Green, and Blue channels "
-                                     "to a full histogram range.</p>").arg(previewEffectPic("autolevels")));
-    m_correctionTools->insert(autoLevels, AutoLevelsCorrection);
+    QPixmap pix = getThumbnailForEffect(AutoLevelsCorrection);
     
-    QRadioButton *normalize = new QRadioButton(i18n("Normalize"), m_correctionTools);
-    QWhatsThis::add( normalize, i18n("<img source=\"%1\"> <b>Normalize</b>:"
-                                     "<p>This option scales brightness values across the active "
-                                     "image so that the darkest point becomes black, and the "
-                                     "brightest point becomes as bright as possible without "
-                                     "altering its hue. This is often a \"magic fix\" for "
-                                     "images that are dim or washed out.</p>").arg(previewEffectPic("normalize")));
-    m_correctionTools->insert(normalize, NormalizeCorrection);
+    QListBoxItem *item = new Digikam::ListBoxPreviewItem(pix, i18n("Auto Levels"));
+    
+    whatsThis->add( item, i18n("<img source=\"%1\"> <b>Auto Levels</b>:"
+                               "<p>This option maximizes the tonal range in the Red, "
+                               "Green, and Blue channels. It search the image shadow and highlight "
+                               "limit values and adjust the Red, Green, and Blue channels "
+                               "to a full histogram range.</p>").arg(previewEffectPic("autolevels")));
+    m_correctionTools->insertItem(item, AutoLevelsCorrection);
 
-    QRadioButton *equalize = new QRadioButton(i18n("Equalize"), m_correctionTools);
-    QWhatsThis::add( equalize, i18n("<img source=\"%1\"> <b>Equalize</b>:"
+    pix = getThumbnailForEffect(NormalizeCorrection);
+    item = new Digikam::ListBoxPreviewItem(pix, i18n("Normalize"));
+    whatsThis->add( item, i18n("<img source=\"%1\"> <b>Normalize</b>:"
+                               "<p>This option scales brightness values across the active "
+                               "image so that the darkest point becomes black, and the "
+                               "brightest point becomes as bright as possible without "
+                               "altering its hue. This is often a \"magic fix\" for "
+                               "images that are dim or washed out.</p>").arg(previewEffectPic("normalize")));
+    m_correctionTools->insertItem(item, NormalizeCorrection);
+
+    pix = getThumbnailForEffect(EqualizeCorrection);
+    item = new Digikam::ListBoxPreviewItem(pix, i18n("Equalize"));
+    whatsThis->add( item, i18n("<img source=\"%1\"> <b>Equalize</b>:"
                                     "<p>This option adjusts the brightness of colors across the "
                                     "active image so that the histogram for the value channel "
                                     "is as nearly as possible flat, that is, so that each possible "
@@ -171,21 +187,22 @@
                                     "enhancing the contrasts in an image. Other times it gives "
                                     "garbage. It is a very powerful operation, which can either work "
                                     "miracles on an image or destroy it.</p>").arg(previewEffectPic("equalize")));
-    m_correctionTools->insert(equalize, EqualizeCorrection);
+    m_correctionTools->insertItem(item, EqualizeCorrection);
 
-    QRadioButton *strechContrast = new QRadioButton(i18n("Stretch Contrast"), m_correctionTools);
-    QWhatsThis::add( strechContrast, i18n("<img source=\"%1\"> <b>Stretch Contrast</b>:"
-                                          "<p>This option enhances the contrast and brightness "
-                                          "of the RGB values of an image by stretching the lowest "
-                                          "and highest values to their fullest range, adjusting "
-                                          "everything in between.</p>").arg(previewEffectPic("stretchcontrast")));
-    m_correctionTools->insert(strechContrast, StretchContrastCorrection);
+    pix = getThumbnailForEffect(StretchContrastCorrection);
+    item = new Digikam::ListBoxPreviewItem(pix, i18n("Stretch Contrast"));
+    whatsThis->add( item, i18n("<img source=\"%1\"> <b>Stretch Contrast</b>:"
+                               "<p>This option enhances the contrast and brightness "
+                               "of the RGB values of an image by stretching the lowest "
+                               "and highest values to their fullest range, adjusting "
+                               "everything in between.</p>").arg(previewEffectPic("stretchcontrast")));
+    m_correctionTools->insertItem(item, StretchContrastCorrection);
 
     // -------------------------------------------------------------
     
     m_correctionTools->setFocus();
     gridSettings->addMultiCellWidget(m_correctionTools, 3, 3, 0, 4);
-    gridSettings->setRowStretch(4, 10);
+    gridSettings->setRowStretch(3, 10);
     setUserAreaWidget(gboxSettings);
    
     // Reset all parameters to the default values.
@@ -202,7 +219,7 @@
     connect(m_previewWidget, SIGNAL(spotPositionChangedFromTarget( const Digikam::DColor &, const QPoint & )),
             this, SLOT(slotColorSelectedFromTarget( const Digikam::DColor & )));
 
-    connect(m_correctionTools, SIGNAL(released(int)),
+    connect(m_correctionTools, SIGNAL(highlighted(int)),
             this, SLOT(slotEffect()));
     
     connect(m_previewWidget, SIGNAL(signalResized()),
@@ -268,7 +285,7 @@
 void ImageEffect_AutoCorrection::slotDefault()
 {
     m_correctionTools->blockSignals(true);
-    m_correctionTools->setButton( AutoLevelsCorrection );
+    m_correctionTools->setCurrentItem( AutoLevelsCorrection );
     m_correctionTools->blockSignals(false);
     slotEffect();
 }
@@ -288,7 +305,7 @@
     int h                           = iface->previewHeight();
     bool sb                         = iface->previewSixteenBit();
 
-    autoCorrection(m_destinationPreviewData, w, h, sb, m_correctionTools->selectedId());
+    autoCorrection(m_destinationPreviewData, w, h, sb, m_correctionTools->currentItem());
 
     iface->putPreviewImage(m_destinationPreviewData);
     m_previewWidget->updatePreview();
@@ -300,6 +317,14 @@
     kapp->restoreOverrideCursor();
 }
 
+QPixmap ImageEffect_AutoCorrection::getThumbnailForEffect(AutoCorrectionType type)
+{
+    Digikam::DImg thumb = m_thumbnailImage.copy();
+    autoCorrection(thumb.bits(), thumb.width(), thumb.height(), thumb.sixteenBit(), type);
+    return (thumb.convertToPixmap());
+}
+
+
 void ImageEffect_AutoCorrection::finalRendering()
 {
     kapp->setOverrideCursor( KCursor::waitCursor() );
@@ -311,7 +336,7 @@
 
     if (data)
     {
-       int type = m_correctionTools->selectedId();
+       int type = m_correctionTools->currentItem();
        autoCorrection(data, w, h, sb, type);
        QString name;
        
Index: imageplugins/imageeffect_autocorrection.h
===================================================================
--- imageplugins/imageeffect_autocorrection.h	(revision 539626)
+++ imageplugins/imageeffect_autocorrection.h	(working copy)
@@ -31,6 +31,7 @@
 
 class QHButtonGroup;
 class QComboBox;
+class QListBox;
 class QButtonGroup;
 
 namespace Digikam
@@ -84,19 +85,22 @@
     
     QHButtonGroup                *m_scaleBG;
 
-    QButtonGroup                 *m_correctionTools;
+    QListBox                     *m_correctionTools;
 
     Digikam::ImageWidget         *m_previewWidget;
 
     Digikam::ColorGradientWidget *m_hGradient;
     
     Digikam::HistogramWidget     *m_histogramWidget;    
+
+    Digikam::DImg                 m_thumbnailImage;
         
 private:
 
     void autoCorrection(uchar *data, int w, int h, bool sb, int type);
     QString previewEffectPic(QString name);
-
+    QPixmap getThumbnailForEffect(AutoCorrectionType type);
+    
 private slots:
 
     void slotDefault();    
Index: libs/dialogs/imagedlgbase.h
===================================================================
--- libs/dialogs/imagedlgbase.h	(revision 539626)
+++ libs/dialogs/imagedlgbase.h	(working copy)
@@ -62,7 +62,7 @@
 
 protected slots:
 
-    void slotTimer();       
+    virtual void slotTimer();       
     
 protected:
     
Index: utilities/imageeditor/editor/Makefile.am
===================================================================
--- utilities/imageeditor/editor/Makefile.am	(revision 539626)
+++ utilities/imageeditor/editor/Makefile.am	(working copy)
@@ -3,7 +3,8 @@
 noinst_LTLIBRARIES = libdimgeditor.la libshowfoto.la 
 
 libdimgeditor_la_SOURCES = editorwindow.cpp imageiface.cpp \
-	 		   imagewindow.cpp iofileprogressbar.cpp  
+	 		   imagewindow.cpp iofileprogressbar.cpp \
+                           listboxwhatsthis.cpp listboxpreviewitem.cpp
 
 libdimgeditor_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_KDEPRINT) 
 
