digiKam
resizetool.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 : 2005-04-07
7  * Description : a tool to resize an image
8  *
9  * Copyright (C) 2005-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)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_EDITOR_RESIZE_TOOL_H
25 #define DIGIKAM_EDITOR_RESIZE_TOOL_H
26 
27 // Qt includes
28 
29 #include <QString>
30 
31 // Local includes
32 
33 #include "editortool.h"
34 
35 using namespace Digikam;
36 
38 {
39 
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit ResizeTool(QObject* const parent);
47  ~ResizeTool() override;
48 
49 private:
50 
51  void writeSettings() override;
52  void readSettings() override;
53  void preparePreview() override;
54  void prepareFinal() override;
55  void setPreviewImage() override;
56  void setFinalImage() override;
57  void renderingFinished() override;
58  void blockWidgetSignals(bool b);
59 
60  double pixelsToUnits(int pix);
61  int unitsToPixels(double val);
62 
63 private Q_SLOTS:
64 
65  void slotSaveAsSettings() override;
66  void slotLoadSettings() override;
67  void slotResetSettings() override;
68  void slotValuesChanged();
69  void slotUnitsChanged();
70  void slotPresetsChanged();
71  void slotRestorationToggled(bool);
72 
73 private:
74 
75  class Private;
76  Private* const d;
77 };
78 
79 } // namespace DigikamEditorResizeToolPlugin
80 
81 #endif // DIGIKAM_EDITOR_RESIZE_TOOL_H
Definition: editortool.h:136
Definition: resizetool.cpp:78
Definition: datefolderview.cpp:43