File indexing completed on 2025-01-19 03:52:44
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-01-11 0007 * Description : a tool to print images 0008 * 0009 * SPDX-FileCopyrightText: 2008-2012 by Angelo Naselli <anaselli at linux dot it> 0010 * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_ADV_PRINT_WIZARD_H 0017 #define DIGIKAM_ADV_PRINT_WIZARD_H 0018 0019 // Qt includes 0020 0021 #include <QImage> 0022 0023 // Local includes 0024 0025 #include "advprintsettings.h" 0026 #include "ditemslist.h" 0027 #include "dinfointerface.h" 0028 #include "dwizarddlg.h" 0029 0030 using namespace Digikam; 0031 0032 namespace DigikamGenericPrintCreatorPlugin 0033 { 0034 0035 class AdvPrintWizard : public DWizardDlg 0036 { 0037 Q_OBJECT 0038 0039 public: 0040 0041 explicit AdvPrintWizard(QWidget* const, DInfoInterface* const iface = nullptr); 0042 ~AdvPrintWizard() override; 0043 0044 void setItemsList(const QList<QUrl>& fileList = QList<QUrl>()); 0045 QList<QUrl> itemsList() const; 0046 0047 DInfoInterface* iface() const; 0048 AdvPrintSettings* settings() const; 0049 0050 /** 0051 * Update the pages to be printed and preview first/last pages. 0052 */ 0053 void previewPhotos(); 0054 0055 void updateCropFrame(AdvPrintPhoto* const, int); 0056 0057 int nextId() const override; 0058 0059 static int normalizedInt(double n); 0060 0061 private: 0062 0063 bool eventFilter(QObject*, QEvent*) override; 0064 0065 private Q_SLOTS: 0066 0067 void slotPreview(const QImage&); 0068 0069 private: 0070 0071 class Private; 0072 Private* const d; 0073 }; 0074 0075 } // namespace DigikamGenericPrintCreatorPlugin 0076 0077 #endif // DIGIKAM_ADV_PRINT_WIZARD_H