1
/* ============================================================
3
* This file is a part of kipi-plugins project
4
* http://www.kipi-plugins.org
7
* Description : a plugin to create panorama by fusion of several images.
8
* Acknowledge : based on the expoblending plugin
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>
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.
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.
23
* ============================================================ */
25
#include "itemspage.moc"
30
#include <QVBoxLayout>
36
#include <kstandarddirs.h>
41
#include <kapplication.h>
45
#include <libkipi/interface.h>
49
#include "imageslist.h"
51
#include "actionthread.h"
53
namespace KIPIPanoramaPlugin
56
struct ItemsPage::ItemsPagePriv
69
ItemsPage::ItemsPage(Manager* mngr, KAssistantDialog* dlg)
70
: WizardPage(dlg, i18n("<b>Set Panorama Images</b>")),d(new ItemsPagePriv)
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 "
87
d->list = new ImagesList(d->mngr->iface(), vbox);
88
d->list->slotAddImages(d->mngr->itemsList());
92
QPixmap leftPix = KStandardDirs::locate("data", "kipiplugin_panorama/pics/assistant-stack.png");
93
setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation));
95
connect(d->list, SIGNAL(signalImageListChanged()),
96
this, SLOT(slotImageListChanged()));
98
QTimer::singleShot(0, this, SLOT(slotSetupList()));
101
ItemsPage::~ItemsPage()
106
void ItemsPage::slotSetupList()
108
slotImageListChanged();
111
KUrl::List ItemsPage::itemUrls() const
113
return d->list->imageUrls();
116
void ItemsPage::slotImageListChanged()
118
emit signalItemsPageIsValid( d->list->imageUrls().count() > 1 );
121
} // namespace KIPIPanoramaPlugin