digiKam
advprintphotopage.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2017-05-25
7  * Description : a tool to print images
8  *
9  * Copyright (C) 2017-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_ADV_PRINT_PHOTO_PAGE_H
24 #define DIGIKAM_ADV_PRINT_PHOTO_PAGE_H
25 
26 // Qt includes
27 
28 #include <QString>
29 #include <QPrinter>
30 #include <QList>
31 #include <QUrl>
32 #include <QXmlStreamReader>
33 #include <QXmlStreamWriter>
34 
35 // Local includes
36 
37 #include "dwizardpage.h"
38 #include "ditemslist.h"
39 #include "advprintphoto.h"
40 #include "ui_advprintphotopage.h"
41 
42 using namespace Digikam;
43 
45 {
46 
47 class TemplateIcon;
48 
50 {
51  Q_OBJECT
52 
53 public:
54 
55  explicit AdvPrintPhotoPage(QWizard* const wizard, const QString& title);
56  ~AdvPrintPhotoPage() override;
57 
58  QPrinter* printer() const;
59  DItemsList* imagesList() const;
60  Ui_AdvPrintPhotoPage* ui() const;
61  bool isComplete() const override;
62  int getPageCount() const;
63 
64  void initializePage() override;
65  bool validatePage() override;
66 
70  void createPhotoGrid(AdvPrintPhotoSize* const p,
71  int pageWidth,
72  int pageHeight,
73  int rows,
74  int columns,
75  TemplateIcon* const iconpreview);
76 
77  void manageBtnPreviewPage();
78 
82  void initPhotoSizes(const QSizeF& pageSize);
83 
84 private:
85 
89  void parseTemplateFile(const QString& fn,
90  const QSizeF& pageSize);
91 
92 public Q_SLOTS:
93 
94  void slotOutputChanged(const QString&);
95 
96 private Q_SLOTS:
97 
98  void slotXMLLoadElement(QXmlStreamReader&);
99 
104  void slotXMLSaveItem(QXmlStreamWriter&, int);
105 
110  void slotXMLCustomElement(QXmlStreamWriter&);
111 
112  void slotXMLCustomElement(QXmlStreamReader&);
113  void slotContextMenuRequested();
114  void slotIncreaseCopies();
115  void slotDecreaseCopies();
116  void slotAddItems(const QList<QUrl>&);
117  void slotRemovingItems(const QList<int>&);
118  void slotBtnPrintOrderDownClicked();
119  void slotBtnPrintOrderUpClicked();
120  void slotBtnPreviewPageDownClicked();
121  void slotBtnPreviewPageUpClicked();
122  void slotListPhotoSizesSelected();
123  void slotPageSetup();
124 
125 private:
126 
127  class Private;
128  Private* const d;
129 };
130 
131 } // namespace DigikamGenericPrintCreatorPlugin
132 
133 #endif // DIGIKAM_ADV_PRINT_PHOTO_PAGE_H
Definition: advprintphotopage.h:50
Definition: ditemslist.h:196
Definition: dwizardpage.h:42
Definition: advprintphoto.cpp:43
Definition: datefolderview.cpp:43