File indexing completed on 2025-01-05 03:53:14

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2017-05-25
0007  * Description : a tool to print images
0008  *
0009  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_ADV_PRINT_FINAL_PAGE_H
0016 #define DIGIKAM_ADV_PRINT_FINAL_PAGE_H
0017 
0018 // Qt includes
0019 
0020 #include <QString>
0021 #include <QPainter>
0022 #include <QList>
0023 #include <QRect>
0024 #include <QStringList>
0025 
0026 // Local includes
0027 
0028 #include "dwizardpage.h"
0029 
0030 using namespace Digikam;
0031 
0032 namespace DigikamGenericPrintCreatorPlugin
0033 {
0034 
0035 class AdvPrintPhoto;
0036 class AdvPrintPhotoSize;
0037 class AdvPrintPhotoPage;
0038 
0039 class AdvPrintFinalPage : public DWizardPage
0040 {
0041     Q_OBJECT
0042 
0043 public:
0044 
0045     explicit AdvPrintFinalPage(QWizard* const dialog, const QString& title);
0046     ~AdvPrintFinalPage() override;
0047 
0048     void initializePage() override;
0049     bool isComplete() const override;
0050     void cleanupPage() override;
0051 
0052     bool checkTempPath(const QString& tempPath) const;
0053     void removeGimpFiles();
0054     void setPhotoPage(AdvPrintPhotoPage* const photoPage);
0055 
0056 private Q_SLOTS:
0057 
0058     void slotProcess();
0059     void slotPrint(bool);
0060     void slotDone(bool);
0061     void slotMessage(const QString&, bool);
0062 
0063 private:
0064 
0065     bool print();
0066 
0067 private:
0068 
0069     class Private;
0070     Private* const d;
0071 };
0072 
0073 } // namespace DigikamGenericPrintCreatorPlugin
0074 
0075 #endif // DIGIKAM_ADV_PRINT_FINAL_PAGE_H