digiKam
advprintsettings.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 : 2007-11-07
7  * Description : a tool to print images
8  *
9  * Copyright (C) 2007-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_SETTINGS_H
24 #define DIGIKAM_ADV_PRINT_SETTINGS_H
25 
26 // Qt includes
27 
28 #include <QtGlobal>
29 #include <QList>
30 #include <QString>
31 #include <QStringList>
32 #include <QUrl>
33 #include <QMap>
34 #include <QColor>
35 #include <QPrinter>
36 #include <QFont>
37 
38 // Local includes
39 
40 #include "filesaveconflictbox.h"
41 
42 using namespace Digikam;
43 
44 class KConfigGroup;
45 
47 {
48 
49 class AdvPrintPhoto;
50 class AdvPrintPhotoSize;
51 
53 {
54 
55 public:
56 
58  enum Selection
59  {
60  IMAGES = 0,
61  ALBUMS
62  };
63 
65  enum Output
66  {
67  PDF = 0,
69  GIMP
70  };
71 
74  {
75  JPEG = 0,
76  PNG,
77  TIFF
78  };
79 
82  {
83  NONE = 0,
87  CUSTOM
88  };
89 
90 public:
91 
92  explicit AdvPrintSettings();
94 
96  void readSettings(KConfigGroup& group);
97  void writeSettings(KConfigGroup& group);
98 
99  QString format() const;
100  QString outputName(Output out) const;
101  QRect* getLayout(int photoIndex, int sizeIndex) const;
102 
104  static QMap<Output, QString> outputNames();
105  static QMap<ImageFormat, QString> imageFormatNames();
106  static QMap<CaptionType, QString> captionTypeNames();
107 
108 public:
109 
111 
113 
114  QString printerName;
115 
116  QSizeF pageSize;
117 
120 
123  QColor captionColor;
124  QFont captionFont;
126  QString captionTxt;
127 
129 
133 
135  QString tempPath;
136  QStringList gimpFiles;
137  QString gimpPath;
138  QString savedPhotoSize;
139 
143  QUrl outputDir;
145 
148  QPrinter* outputPrinter;
149  QString outputPath;
150 };
151 
152 } // namespace DigikamGenericPrintCreatorPlugin
153 
154 #endif // DIGIKAM_ADV_PRINT_SETTINGS_H
QList< AdvPrintPhoto * > photos
Definition: advprintsettings.h:118
int currentCropPhoto
Crop management.
Definition: advprintsettings.h:131
ImageFormat
Image format for Output::FILES.
Definition: advprintsettings.h:74
@ PNG
Definition: advprintsettings.h:76
AdvPrintPhotoSize * outputLayouts
Generic data used by printing thread.
Definition: advprintsettings.h:147
Selection
Images selection mode.
Definition: advprintsettings.h:59
Selection selMode
Items selection mode.
Definition: advprintsettings.h:110
CaptionType captionType
Caption management.
Definition: advprintsettings.h:122
Output
Print output destination, outside real printers configured.
Definition: advprintsettings.h:66
@ FILES
Definition: advprintsettings.h:68
bool disableCrop
Definition: advprintsettings.h:132
QSizeF pageSize
Page Size in mm.
Definition: advprintsettings.h:116
FileSaveConflictBox::ConflictRule conflictRule
Rule if output image files already exists.
Definition: advprintsettings.h:142
QList< AdvPrintPhotoSize * > photosizes
Definition: advprintsettings.h:119
CaptionType
Caption type to print over the images.
Definition: advprintsettings.h:82
@ FILENAME
Definition: advprintsettings.h:84
@ DATETIME
Definition: advprintsettings.h:85
@ COMMENT
Definition: advprintsettings.h:86
QFont captionFont
Definition: advprintsettings.h:124
bool openInFileBrowser
Definition: advprintsettings.h:144
int currentPreviewPage
Definition: advprintsettings.h:128
QPrinter * outputPrinter
Definition: advprintsettings.h:148
QStringList gimpFiles
Definition: advprintsettings.h:136
QString printerName
Definition: advprintsettings.h:114
ImageFormat imageFormat
For print to image files only.
Definition: advprintsettings.h:141
QString tempPath
For Print to Gimp only.
Definition: advprintsettings.h:135
QString outputPath
Definition: advprintsettings.h:149
QString savedPhotoSize
Definition: advprintsettings.h:138
QUrl outputDir
Directory where to store output images.
Definition: advprintsettings.h:143
QColor captionColor
Definition: advprintsettings.h:123
int captionSize
Definition: advprintsettings.h:125
QList< QUrl > inputImages
Definition: advprintsettings.h:112
QString gimpPath
Definition: advprintsettings.h:137
QString captionTxt
String use to customize caption with CUSTOM mode.
Definition: advprintsettings.h:126
ConflictRule
Definition: filesaveconflictbox.h:46
@ NONE
Definition: dngconverteractions.h:44
@ JPEG
Definition: panoactions.h:62
@ TIFF
Definition: panoactions.h:63
Definition: advprintphoto.cpp:43
Definition: datefolderview.cpp:43