File indexing completed on 2025-01-19 03:51:13
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2005-02-17 0007 * Description : a tool to change image perspective . 0008 * 0009 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_EDITOR_PERSPECTIVE_TOOL_H 0016 #define DIGIKAM_EDITOR_PERSPECTIVE_TOOL_H 0017 0018 // Local includes 0019 0020 #include "editortool.h" 0021 0022 class QRect; 0023 0024 using namespace Digikam; 0025 0026 namespace DigikamEditorPerspectiveToolPlugin 0027 { 0028 0029 class PerspectiveTool : public EditorTool 0030 { 0031 Q_OBJECT 0032 0033 public: 0034 0035 explicit PerspectiveTool(QObject* const parent); 0036 ~PerspectiveTool() override; 0037 0038 private Q_SLOTS: 0039 0040 void slotInverseTransformationChanged(bool b); 0041 void slotResetSettings() override; 0042 void slotUpdateInfo(const QRect& newSize, 0043 float topLeftAngle, 0044 float topRightAngle, 0045 float bottomLeftAngle, 0046 float bottomRightAngle, 0047 bool valid); 0048 void slotColorGuideChanged(); 0049 0050 private: 0051 0052 void readSettings() override; 0053 void writeSettings() override; 0054 void finalRendering() override; 0055 void setBackgroundColor(const QColor& bg) override; 0056 0057 private: 0058 0059 class Private; 0060 Private* const d; 0061 }; 0062 0063 } // namespace DigikamEditorPerspectiveToolPlugin 0064 0065 #endif // DIGIKAM_EDITOR_PERSPECTIVE_TOOL_H