digiKam
advprintphoto.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 : 2002-12-09
7  * Description : a tool to print images
8  *
9  * Copyright (C) 2002-2003 by Todd Shoemaker <todd at theshoemakers dot net>
10  * Copyright (C) 2007-2012 by Angelo Naselli <anaselli at linux dot it>
11  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
12  *
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.
17  *
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.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_ADV_PRINT_PHOTO_H
26 #define DIGIKAM_ADV_PRINT_PHOTO_H
27 
28 // Qt includes
29 
30 #include <QRect>
31 #include <QFont>
32 #include <QColor>
33 #include <QUrl>
34 #include <QPointer>
35 #include <QIcon>
36 #include <QList>
37 #include <QSize>
38 #include <QTransform>
39 
40 // Local includes
41 
42 #include "dinfointerface.h"
43 #include "dimg.h"
44 #include "advprintsettings.h"
45 
46 using namespace Digikam;
47 
49 {
50 
52 {
53 public:
54 
55  explicit AdvPrintPhotoSize();
58 
59 public:
60 
61  QString m_label;
62  int m_dpi;
65  QIcon m_icon;
66 };
67 
68 // -----------------------------------------------------------
69 
71 {
72 public:
73 
74  explicit AdvPrintAdditionalInfo();
77 
78 public:
79 
80  int m_unit;
85  double m_printWidth;
86  double m_printHeight;
88 };
89 
90 // -----------------------------------------------------------
91 
93 {
94 
95 public:
96 
97  explicit AdvPrintCaptionInfo();
98 
102 
103 public:
104 
109  QString m_captionText;
110 };
111 
112 // -----------------------------------------------------------
113 
115 {
116 
117 public:
118 
119  explicit AdvPrintPhoto(int thumbnailSize, DInfoInterface* const iface);
120  AdvPrintPhoto(const AdvPrintPhoto& other);
121  ~AdvPrintPhoto();
122 
123  DImg& thumbnail();
124  DImg loadPhoto();
125  int width();
126  int height();
127  QSize& size();
128 
129  QTransform updateCropRegion(int woutlay, int houtlay, bool autoRotate);
130 
131  double scaleWidth(double unitToInches);
132  double scaleHeight(double unitToInches);
133 
134 public:
135 
137  QUrl m_url;
138 
141 
144 
146  bool m_first;
147 
149  int m_copies;
150 
153 
157 
158 private:
159 
160  void loadInCache();
161 
162 private:
163 
164  DImg* m_thumbnail;
165  QSize* m_size;
166 };
167 
168 } // Namespace Digikam
169 
170 #endif // DIGIKAM_ADV_PRINT_PHOTO_H
bool m_autoRotate
Definition: advprintphoto.h:84
double m_printWidth
Definition: advprintphoto.h:85
bool m_keepRatio
Definition: advprintphoto.h:83
double m_printHeight
Definition: advprintphoto.h:86
int m_printPosition
Definition: advprintphoto.h:81
bool m_enlargeSmallerImages
Definition: advprintphoto.h:87
QFont m_captionFont
Definition: advprintphoto.h:106
QColor m_captionColor
Definition: advprintphoto.h:107
QString m_captionText
Definition: advprintphoto.h:109
int m_captionSize
Definition: advprintphoto.h:108
AdvPrintSettings::CaptionType m_captionType
Definition: advprintphoto.h:105
QIcon m_icon
Definition: advprintphoto.h:65
QList< QRect * > m_layouts
first element is page size
Definition: advprintphoto.h:64
bool m_autoRotate
Definition: advprintphoto.h:63
int m_dpi
Definition: advprintphoto.h:62
QString m_label
Definition: advprintphoto.h:61
DInfoInterface * m_iface
Definition: advprintphoto.h:156
QUrl m_url
Url of original image file.
Definition: advprintphoto.h:137
AdvPrintCaptionInfo * m_pAdvPrintCaptionInfo
Definition: advprintphoto.h:155
AdvPrintAdditionalInfo * m_pAddInfo
Definition: advprintphoto.h:154
QRect m_cropRegion
Region to crop while print from original image.
Definition: advprintphoto.h:143
int m_copies
Number of copies while printing stage.
Definition: advprintphoto.h:149
int m_thumbnailSize
Thumbnail size in pixels.
Definition: advprintphoto.h:140
bool m_first
To get first copy quickly.
Definition: advprintphoto.h:146
int m_rotation
Rotation angle in degrees.
Definition: advprintphoto.h:152
CaptionType
Caption type to print over the images.
Definition: advprintsettings.h:82
Definition: dimg.h:62
Definition: dinfointerface.h:56
Definition: advprintphoto.cpp:43
Definition: datefolderview.cpp:43