~ubuntu-branches/ubuntu/intrepid/digikam/intrepid

« back to all changes in this revision

Viewing changes to digikam/imageplugins/coreplugin/imageeffect_blur.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-07-17 20:25:39 UTC
  • mfrom: (1.2.15 upstream) (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080717202539-6n7dtirbkoo7qvhd
Tags: 2:0.9.4-1
* New upstream release
  - digiKam 0.9.4 Release Plan (KDE3) ~ 13 July 08 (Closes: #490144)
* DEB_CONFIGURE_EXTRA_FLAGS := --without-included-sqlite3
* Debhelper compatibility level V7
* Install pixmaps in debian/*.install
* Add debian/digikam.lintian-overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 * Public License as published by the Free Software Foundation;
14
14
 * either version 2, or (at your option)
15
15
 * any later version.
16
 
 * 
 
16
 *
17
17
 * This program is distributed in the hope that it will be useful,
18
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
20
 * GNU General Public License for more details.
21
 
 * 
 
21
 *
22
22
 * ============================================================ */
23
23
 
24
24
// Qt includes.
51
51
{
52
52
 
53
53
ImageEffect_Blur::ImageEffect_Blur(QWidget* parent)
54
 
                : Digikam::CtrlPanelDlg(parent, i18n("Apply Gaussian Blur on Photograph"), 
55
 
                                        "gaussianblur")
 
54
        : Digikam::CtrlPanelDlg(parent, i18n("Apply Gaussian Blur on Photograph"),
 
55
                                "gaussianblur", false, true, true)
56
56
{
57
57
    setHelp("blursharpentool.anchor", "digikam");
58
 
    
 
58
 
59
59
    QWidget *gboxSettings = new QWidget(m_imagePreviewWidget);
60
60
    QGridLayout* gridSettings = new QGridLayout( gboxSettings, 1, 1, 0, spacingHint());
61
61
    QLabel *label = new QLabel(i18n("Smoothness:"), gboxSettings);
62
 
    
 
62
 
63
63
    m_radiusInput = new KIntNumInput(gboxSettings);
64
64
    m_radiusInput->setRange(0, 100, 1, true);
65
65
    m_radiusInput->setValue(0);
69
69
 
70
70
    gridSettings->addMultiCellWidget(label, 0, 0, 0, 1);
71
71
    gridSettings->addMultiCellWidget(m_radiusInput, 1, 1, 0, 1);
72
 
    
 
72
 
73
73
    m_imagePreviewWidget->setUserAreaWidget(gboxSettings);
74
 
        
75
 
    // -------------------------------------------------------------
76
 
    
77
 
    connect(m_radiusInput, SIGNAL(valueChanged (int)),
78
 
            this, SLOT(slotTimer()));
79
74
}
80
75
 
81
76
ImageEffect_Blur::~ImageEffect_Blur()
102
97
    m_radiusInput->blockSignals(true);
103
98
    m_radiusInput->setValue(0);
104
99
    m_radiusInput->blockSignals(false);
105
 
 
100
}
106
101
 
107
102
void ImageEffect_Blur::prepareEffect()
108
103
{
109
104
    m_radiusInput->setEnabled(false);
110
 
    
 
105
 
111
106
    Digikam::DImg img = m_imagePreviewWidget->getOriginalRegionImage();
112
 
        
 
107
 
113
108
    m_threadedFilter = dynamic_cast<Digikam::DImgThreadedFilter *>
114
 
                       (new Digikam::DImgGaussianBlur(&img, this, m_radiusInput->value()));    
 
109
                       (new Digikam::DImgGaussianBlur(&img, this, m_radiusInput->value()));
115
110
}
116
111
 
117
112
void ImageEffect_Blur::prepareFinal()