~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to imageplugins/enhance/hotpixels/hotpixelstool.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
        blackFrameListView(0),
79
79
        previewWidget(0),
80
80
        gboxSettings(0)
81
 
        {}
 
81
    {}
82
82
 
83
83
    static const QString configGroupName;
84
84
    static const QString configLastBlackFrameFileEntry;
103
103
// --------------------------------------------------------
104
104
 
105
105
HotPixelsTool::HotPixelsTool(QObject* parent)
106
 
             : EditorToolThreaded(parent),
107
 
               d(new HotPixelsToolPriv)
 
106
    : EditorToolThreaded(parent),
 
107
      d(new HotPixelsToolPriv)
108
108
{
109
109
    setObjectName("hotpixels");
110
110
    setToolName(i18n("Hot Pixels"));
120
120
 
121
121
    QGridLayout* grid = new QGridLayout(d->gboxSettings->plainPage());
122
122
 
123
 
    QLabel *filterMethodLabel = new QLabel(i18n("Filter:"), d->gboxSettings->plainPage());
 
123
    QLabel* filterMethodLabel = new QLabel(i18n("Filter:"), d->gboxSettings->plainPage());
124
124
    d->filterMethodCombo      = new RComboBox(d->gboxSettings->plainPage());
125
125
    d->filterMethodCombo->addItem(i18nc("average filter mode", "Average"));
126
126
    d->filterMethodCombo->addItem(i18nc("linear filter mode", "Linear"));
220
220
void HotPixelsTool::slotAddBlackFrame()
221
221
{
222
222
    KUrl url = ImageDialog::getImageURL(kapp->activeWindow(), d->blackFrameURL, i18n("Select Black Frame Image"));
 
223
 
223
224
    if (!url.isEmpty())
224
225
    {
225
226
        // Load the selected file and insert into the list.
250
251
 
251
252
        if (area.contains( hp.rect ))
252
253
        {
253
 
           hp.rect.moveTopLeft(QPoint( hp.rect.x()-area.x(), hp.rect.y()-area.y() ));
254
 
           hotPixelsRegion.append(hp);
 
254
            hp.rect.moveTopLeft(QPoint( hp.rect.x()-area.x(), hp.rect.y()-area.y() ));
 
255
            hotPixelsRegion.append(hp);
255
256
        }
256
257
    }
257
258
 
287
288
    int i = 0;
288
289
 
289
290
    for (it = d->hotPixelsList.begin() ; it != d->hotPixelsList.end() ; ++it, ++i)
290
 
       pointList.setPoint(i, (*it).rect.center());
 
291
    {
 
292
        pointList.setPoint(i, (*it).rect.center());
 
293
    }
291
294
 
292
295
    d->previewWidget->setHighLightPoints(pointList);
293
296