File indexing completed on 2025-03-09 03:50:51

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2009-11-13
0007  * Description : a tool to blend bracketed images.
0008  *
0009  * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2012      by Benjamin Girault <benjamin dot girault at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #include "expoblendinglastpage.h"
0017 
0018 // Qt includes
0019 
0020 #include <QDir>
0021 #include <QLabel>
0022 #include <QPixmap>
0023 #include <QStandardPaths>
0024 
0025 // KDE includes
0026 
0027 #include <klocalizedstring.h>
0028 
0029 // Local includes
0030 
0031 #include "enfusebinary.h"
0032 #include "expoblendingmanager.h"
0033 #include "dlayoutbox.h"
0034 
0035 namespace DigikamGenericExpoBlendingPlugin
0036 {
0037 
0038 class Q_DECL_HIDDEN ExpoBlendingLastPage::Private
0039 {
0040 public:
0041 
0042     explicit Private()
0043         : mngr(nullptr)
0044     {
0045     }
0046 
0047     ExpoBlendingManager* mngr;
0048 };
0049 
0050 ExpoBlendingLastPage::ExpoBlendingLastPage(ExpoBlendingManager* const mngr, QWizard* const dlg)
0051     : DWizardPage(dlg, QString::fromLatin1("<b>%1</b>").arg(i18nc("@title:window", "Pre-Processing is Complete"))),
0052       d          (new Private)
0053 {
0054     d->mngr                 = mngr;
0055     DVBox* const vbox       = new DVBox(this);
0056     QLabel* const title     = new QLabel(vbox);
0057     title->setOpenExternalLinks(true);
0058     title->setWordWrap(true);
0059     title->setText(QString::fromUtf8("<qt>"
0060                                      "<p><h1><b>%1</b></h1></p>"
0061                                      "<p>%2</p>"
0062                                      "<p>%3</p>"
0063                                      "<p>%4</p>"
0064                                      "</qt>")
0065                    .arg(i18nc("@info", "Bracketed Images Pre-Processing is Done"))
0066                    .arg(i18nc("@info", "Congratulations. Your images are ready to be fused."))
0067                    .arg(i18nc("@info", "To perform this operation, Enblend program from will be used."))
0068                    .arg(i18nc("@info", "Press \"Finish\" button to fuse your items and make a pseudo HDR image.")));
0069 
0070     vbox->setStretchFactor(new QWidget(vbox), 10);
0071 
0072     setPageWidget(vbox);
0073 
0074     QPixmap leftPix(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("digikam/data/assistant-enfuse.png")));
0075     setLeftBottomPix(leftPix.scaledToWidth(128, Qt::SmoothTransformation));
0076 }
0077 
0078 ExpoBlendingLastPage::~ExpoBlendingLastPage()
0079 {
0080     delete d;
0081 }
0082 
0083 } // namespace DigikamGenericExpoBlendingPlugin
0084 
0085 #include "moc_expoblendinglastpage.cpp"