digiKam
printoptionspage.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 : 2009-02-06
7  * Description : image editor printing interface.
8  *
9  * Copyright (C) 2009 by Angelo Naselli <anaselli at linux dot it>
10  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * 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_PRINT_OPTIONS_PAGE_H
26 #define DIGIKAM_PRINT_OPTIONS_PAGE_H
27 
28 // Qt includes
29 
30 #include <QWidget>
31 
32 // Local includes
33 
34 #include "iccprofile.h"
35 
36 using namespace Digikam;
37 
39 {
40 
41 class PrintOptionsPage : public QWidget
42 {
43  Q_OBJECT
44 
45 public:
46 
47  enum ScaleMode
48  {
51  ScaleToCustomSize
52  };
53 
57  enum Unit
58  {
61  Inches
62  };
63 
64 public:
65 
66  explicit PrintOptionsPage(QWidget* const parent, const QSize& imageSize);
67  ~PrintOptionsPage() override;
68 
69  void loadConfig();
70  void saveConfig();
71 
72  bool enlargeSmallerImages() const;
73  bool colorManaged() const;
74  bool autoRotation() const;
75  Qt::Alignment alignment() const;
76  IccProfile outputProfile() const;
77 
78  ScaleMode scaleMode() const;
79  Unit scaleUnit() const;
80  double scaleWidth() const;
81  double scaleHeight() const;
82 
83 private Q_SLOTS:
84 
85  void adjustWidthToRatio();
86  void adjustHeightToRatio();
87  void slotAlertSettings(bool);
88  void slotSetupDlg();
89 
90 private:
91 
92  class Private;
93  Private* const d;
94 };
95 
96 } // namespace DigikamEditorPrintToolPlugin
97 
98 #endif // DIGIKAM_PRINT_OPTIONS_PAGE_H
Definition: printoptionspage.h:42
ScaleMode
Definition: printoptionspage.h:48
@ ScaleToPage
Definition: printoptionspage.h:50
@ NoScale
Definition: printoptionspage.h:49
Unit
Definition: printoptionspage.h:58
@ Millimeters
Definition: printoptionspage.h:59
@ Centimeters
Definition: printoptionspage.h:60
Definition: iccprofile.h:43
Definition: printconfig.cpp:33
double Unit
Definition: haar.h:97
Definition: datefolderview.cpp:43