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

« back to all changes in this revision

Viewing changes to extra/kipi-plugins/panorama/importwizard/itemspage.cpp

  • Committer: Package Import Robot
  • Author(s): Felix Geyer, Rohan Garg, Philip Muškovac, Felix Geyer
  • Date: 2011-09-23 18:18:55 UTC
  • mfrom: (1.2.36 upstream)
  • Revision ID: package-import@ubuntu.com-20110923181855-ifs67wxkugshev9k
Tags: 2:2.1.1-0ubuntu1
[ Rohan Garg ]
* New upstream release (LP: #834190)
  - debian/control
    + Build with libqtwebkit-dev
 - debian/kipi-plugins-common
    + Install libkvkontakte required by kipi-plugins
 - debian/digikam
    + Install panoramagui

[ Philip Muškovac ]
* New upstream release
  - debian/control:
    + Add libcv-dev, libcvaux-dev, libhighgui-dev, libboost-graph1.46-dev,
      libksane-dev, libxml2-dev, libxslt-dev, libqt4-opengl-dev, libqjson-dev,
      libgpod-dev and libqca2-dev to build-deps
    + Add packages for kipi-plugins, libmediawiki, libkface, libkgeomap and
      libkvkontakte
  - debian/rules:
    + Don't build with gphoto2 since it doesn't build with it.
  - Add kubuntu_fix_test_linking.diff to fix linking of the dngconverter test
  - update install files
  - update kubuntu_01_mysqld_executable_name.diff for new cmake layout
    and rename to kubuntu_mysqld_executable_name.diff
* Fix typo in digikam-data description (LP: #804894)
* Fix Vcs links

[ Felix Geyer ]
* Move library data files to the new packages libkface-data, libkgeomap-data
  and libkvkontakte-data.
* Override version of the embedded library packages to 1.0~digikam<version>.
* Exclude the library packages from digikam-dbg to prevent file conflicts in
  the future.
* Call dh_install with --list-missing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 * 
 
3
 * This file is a part of kipi-plugins project
 
4
 * http://www.kipi-plugins.org
 
5
 *
 
6
 * Date        : 2011-05-23
 
7
 * Description : a plugin to create panorama by fusion of several images.
 
8
 * Acknowledge : based on the expoblending plugin
 
9
 *
 
10
 * Copyright (C) 2011 by Benjamin Girault <benjamin dot girault at gmail dot com>
 
11
 * Copyright (C) 2009-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
12
 *
 
13
 * This program is free software; you can redistribute it
 
14
 * and/or modify it under the terms of the GNU General
 
15
 * Public License as published by the Free Software Foundation;
 
16
 * either version 2, or (at your option) any later version.
 
17
 *
 
18
 * This program is distributed in the hope that it will be useful,
 
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
 * GNU General Public License for more details.
 
22
 *
 
23
 * ============================================================ */
 
24
 
 
25
#include "itemspage.moc"
 
26
 
 
27
// Qt includes
 
28
 
 
29
#include <QLabel>
 
30
#include <QVBoxLayout>
 
31
#include <QPixmap>
 
32
#include <QTimer>
 
33
 
 
34
// KDE includes
 
35
 
 
36
#include <kstandarddirs.h>
 
37
#include <kdialog.h>
 
38
#include <kvbox.h>
 
39
#include <kdebug.h>
 
40
#include <klocale.h>
 
41
#include <kapplication.h>
 
42
 
 
43
// LibKIPI includes
 
44
 
 
45
#include <libkipi/interface.h>
 
46
 
 
47
// Local includes
 
48
 
 
49
#include "imageslist.h"
 
50
#include "manager.h"
 
51
#include "actionthread.h"
 
52
 
 
53
namespace KIPIPanoramaPlugin
 
54
{
 
55
 
 
56
struct ItemsPage::ItemsPagePriv
 
57
{
 
58
    ItemsPagePriv()
 
59
      : list(0),
 
60
        mngr(0)
 
61
    {
 
62
    }
 
63
 
 
64
    ImagesList* list;
 
65
 
 
66
    Manager*    mngr;
 
67
};
 
68
 
 
69
ItemsPage::ItemsPage(Manager* mngr, KAssistantDialog* dlg)
 
70
    : WizardPage(dlg, i18n("<b>Set Panorama Images</b>")),d(new ItemsPagePriv)
 
71
{
 
72
    d->mngr        = mngr;
 
73
    KVBox* vbox    = new KVBox(this);
 
74
    QLabel* label1 = new QLabel(vbox);
 
75
    label1->setWordWrap(true);
 
76
    label1->setText(i18n("<qt>"
 
77
                         "<p>Set here the list of your images to blend into a panorama. "
 
78
                         "Please follow these conditions:</p>"
 
79
                         "<ul><li>Images are taken from the same point of view.</li>"
 
80
                         "<li>Images are taken with the same camera (and lens).</li>"
 
81
                         "<li>Do not mix images with different color depth.</li></ul>"
 
82
                         "<p>Note that, in the case of a 360° panorama, the first image "
 
83
                         "in the list will be the image that will be in the center of "
 
84
                         "the panorama.</p>"
 
85
                         "</qt>"));
 
86
 
 
87
    d->list = new ImagesList(d->mngr->iface(), vbox);
 
88
    d->list->slotAddImages(d->mngr->itemsList());
 
89
 
 
90
    setPageWidget(vbox);
 
91
 
 
92
    QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_panorama/pics/assistant-stack.png");
 
93
    setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation));
 
94
 
 
95
    connect(d->list, SIGNAL(signalImageListChanged()),
 
96
            this, SLOT(slotImageListChanged()));
 
97
 
 
98
    QTimer::singleShot(0, this, SLOT(slotSetupList()));
 
99
}
 
100
 
 
101
ItemsPage::~ItemsPage()
 
102
{
 
103
    delete d;
 
104
}
 
105
 
 
106
void ItemsPage::slotSetupList()
 
107
{
 
108
    slotImageListChanged();
 
109
}
 
110
 
 
111
KUrl::List ItemsPage::itemUrls() const
 
112
{
 
113
    return d->list->imageUrls();
 
114
}
 
115
 
 
116
void ItemsPage::slotImageListChanged()
 
117
{
 
118
    emit signalItemsPageIsValid( d->list->imageUrls().count() > 1 );
 
119
}
 
120
 
 
121
}   // namespace KIPIPanoramaPlugin