~ubuntu-branches/ubuntu/vivid/digikam/vivid

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/photolayoutseditor/plugin/photolayoutseditor.cpp

  • Committer: Package Import Robot
  • Author(s): Philip Muškovac
  • Date: 2012-02-14 19:29:29 UTC
  • mfrom: (1.2.38) (3.1.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120214192929-cx2zia3b2nt67lvz
Tags: 4:2.5.0-1ubuntu1
* Merge from debian unstable, remaining changes:
  - keep seperate binary packages:
    + libkface1, libkface-data, libkface-dev
    + libkgeomap1, libkgeomap-data, libkgeomap-dev
    + libvkontakte1, libkvkontakte-dev
    + libmediawiki1, libmediawiki-dev
  - keep patches:
    + kubuntu_mysqld_executable_name.diff
  - don't fail on missing files in dh_install
  - install oxygen icons for kipi-plugins
  - build-depend on mysql 5.5 instead of 5.1
  - update install files
* digikam breaks/replaces kipi-plugins-common << 4:2.5.0~
* digikam-doc breaks/replaces digikam-data << 4:2.5.0~
* digikam-data breaks/replaces kipi-plugins << 4:2.5.0~
* kipi-plugins-common breaks/replaces kipi-plugins << 4:2.5.0~

Show diffs side-by-side

added added

removed removed

Lines of Context:
240
240
    //------------------------------------------------------------------------
241
241
    d->openRecentFilesMenu = KStandardAction::openRecent(this, SLOT(open(KUrl)), actionCollection());
242
242
    KUrl::List urls = PLEConfigSkeleton::recentFiles();
243
 
    foreach (KUrl url, urls)
 
243
    foreach(KUrl url, urls)
244
244
        d->openRecentFilesMenu->addUrl(url);
245
245
    connect(d->openRecentFilesMenu, SIGNAL(recentListCleared()), this, SLOT(clearRecentList()));
246
246
    actionCollection()->addAction("open_recent", d->openRecentFilesMenu);
253
253
    d->saveAsAction->setShortcut(KShortcut(Qt::SHIFT + Qt::CTRL + Qt::Key_S));
254
254
    actionCollection()->addAction("save_as", d->saveAsAction);
255
255
    //------------------------------------------------------------------------
256
 
    d->exportFileAction = new KAction(i18nc("Export current frame layout to image file", "Export"), actionCollection());
 
256
    d->exportFileAction = new KAction(i18nc("Export current frame layout to image file...", "Export..."), actionCollection());
257
257
    d->exportFileAction->setShortcut(KShortcut(Qt::SHIFT + Qt::CTRL + Qt::Key_E));
258
258
    connect(d->exportFileAction, SIGNAL(triggered()), this, SLOT(exportFile()));
259
259
    actionCollection()->addAction("export", d->exportFileAction);
285
285
    d->settingsAction = KStandardAction::preferences(this, SLOT(settings()), actionCollection());
286
286
    actionCollection()->addAction("settings", d->settingsAction);
287
287
    //------------------------------------------------------------------------
288
 
    d->addImageAction = new KAction(i18nc("Adds new image(s) from file", "Add image(s)..."), actionCollection());
 
288
    d->addImageAction = new KAction(i18nc("Adds new image(s) from file...", "Add image(s)..."), actionCollection());
289
289
    connect(d->addImageAction, SIGNAL(triggered()), this, SLOT(loadNewImage()));
290
290
    actionCollection()->addAction("new_image", d->addImageAction);
291
291
    //------------------------------------------------------------------------
292
 
    d->showGridToggleAction = new KToggleAction(i18nc("View grid lines", "Show"), actionCollection());
 
292
    d->showGridToggleAction = new KToggleAction(i18nc("View grid lines...", "Show..."), actionCollection());
293
293
    d->showGridToggleAction->setShortcut(KShortcut(Qt::SHIFT + Qt::CTRL + Qt::Key_G));
294
294
    d->showGridToggleAction->setChecked( PLEConfigSkeleton::self()->showGrid() );
295
295
    connect(d->showGridToggleAction, SIGNAL(triggered(bool)), this, SLOT(setGridVisible(bool)));
296
296
    actionCollection()->addAction("grid_toggle", d->showGridToggleAction);
297
297
    //------------------------------------------------------------------------
298
 
    d->gridConfigAction = new KAction(i18nc("Configure grid lines visibility", "Setup grid"), actionCollection());
 
298
    d->gridConfigAction = new KAction(i18nc("Configure grid lines visibility...", "Setup grid..."), actionCollection());
299
299
    connect(d->gridConfigAction, SIGNAL(triggered()), this, SLOT(setupGrid()));
300
300
    actionCollection()->addAction("grid_config", d->gridConfigAction);
301
301
    //------------------------------------------------------------------------
302
 
    d->changeCanvasSizeAction = new KAction(i18nc("Configure canvas size", "Change canvas size"), actionCollection());
 
302
    d->changeCanvasSizeAction = new KAction(i18nc("Configure canvas size...", "Change canvas size..."), actionCollection());
303
303
    connect(d->changeCanvasSizeAction, SIGNAL(triggered()), this, SLOT(changeCanvasSize()));
304
304
    actionCollection()->addAction("canvas_size", d->changeCanvasSizeAction);
305
305
 
358
358
    this->addDockWidget(Qt::RightDockWidgetArea, d->toolsWidget);
359
359
 
360
360
    // Layers dockwidget
361
 
    d->treeWidget = new QDockWidget("Layers", this);
 
361
    d->treeWidget = new QDockWidget(i18n("Layers"), this);
362
362
    d->treeWidget->setFeatures(QDockWidget::DockWidgetMovable);
363
363
    d->treeWidget->setFloating(false);
364
364
    d->treeWidget->setAllowedAreas(Qt::RightDockWidgetArea | Qt::LeftDockWidgetArea);
420
420
    else
421
421
    {
422
422
        KMessageBox::error(this,
423
 
                           i18n("Can't read image file."));
 
423
                           i18n("Cannot read image file."));
424
424
    }
425
425
    file.close();
426
426
}
536
536
        m_canvas->save(fileUrl, setFileAsDefault);
537
537
    else
538
538
        KMessageBox::error(this,
539
 
                           i18n("There is nothing to save!"));
 
539
                           i18n("There is nothing to save."));
540
540
}
541
541
 
542
542
void PhotoLayoutsEditor::exportFile()
564
564
            if (!writer.write(image.toImage()))
565
565
            {
566
566
                KMessageBox::detailedError(this,
567
 
                                   i18n("Unexpected error while saving an image!"),
 
567
                                   i18n("Unexpected error while saving an image."),
568
568
                                   writer.errorString());
569
569
            }
570
570
        }
702
702
            }
703
703
        }
704
704
        else
705
 
            KMessageBox::error(this, i18n("Invalid image size!"));
 
705
            KMessageBox::error(this, i18n("Invalid image size."));
706
706
    }
707
707
 
708
708
    delete ccd;
723
723
    PhotoEffectsLoader::registerEffect( stdEffects );
724
724
 
725
725
    const KService::List offers = KServiceTypeTrader::self()->query("PhotoLayoutsEditor/EffectPlugin");
726
 
    foreach (const KService::Ptr& service, offers)
 
726
    foreach(const KService::Ptr& service, offers)
727
727
    {
728
728
        if (service)
729
729
            d->effectsServiceMap[service->name()] = service;
730
730
    }
731
731
 
732
 
    foreach (const QString & name, d->effectsServiceMap.keys())
 
732
    foreach(const QString& name, d->effectsServiceMap.keys())
733
733
    {
734
734
        KService::Ptr service = d->effectsServiceMap.value(name);
735
735
        AbstractPhotoEffectFactory * plugin;
764
764
    BorderDrawersLoader::registerDrawer( stdBorders );
765
765
 
766
766
    const KService::List offers = KServiceTypeTrader::self()->query("PhotoLayoutsEditor/BorderPlugin");
767
 
    foreach (const KService::Ptr& service, offers)
 
767
    foreach(const KService::Ptr& service, offers)
768
768
    {
769
769
        if (service)
770
770
            d->bordersServiceMap[service->name()] = service;
771
771
    }
772
772
 
773
 
    foreach (const QString & name, d->bordersServiceMap.keys())
 
773
    foreach(const QString& name, d->bordersServiceMap.keys())
774
774
    {
775
775
        KService::Ptr service = d->bordersServiceMap.value(name);
776
776
        BorderDrawerFactoryInterface * plugin;