digiKam
perspectivetool.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-02-17
7  * Description : a tool to change image perspective .
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_PERSPECTIVE_TOOL_H
25 #define DIGIKAM_EDITOR_PERSPECTIVE_TOOL_H
26 
27 // Local includes
28 
29 #include "editortool.h"
30 
31 class QRect;
32 
33 using namespace Digikam;
34 
36 {
37 
39 {
40  Q_OBJECT
41 
42 public:
43 
44  explicit PerspectiveTool(QObject* const parent);
45  ~PerspectiveTool() override;
46 
47 private Q_SLOTS:
48 
49  void slotInverseTransformationChanged(bool b);
50  void slotResetSettings() override;
51  void slotUpdateInfo(const QRect& newSize,
52  float topLeftAngle,
53  float topRightAngle,
54  float bottomLeftAngle,
55  float bottomRightAngle,
56  bool valid);
57  void slotColorGuideChanged();
58 
59 private:
60 
61  void readSettings() override;
62  void writeSettings() override;
63  void finalRendering() override;
64  void setBackgroundColor(const QColor& bg) override;
65 
66 private:
67 
68  class Private;
69  Private* const d;
70 };
71 
72 } // namespace DigikamEditorPerspectiveToolPlugin
73 
74 #endif // DIGIKAM_EDITOR_PERSPECTIVE_TOOL_H
Definition: editortool.h:50
Definition: perspectivematrix.cpp:36
Definition: datefolderview.cpp:43