File indexing completed on 2025-01-19 03:51:07
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2005-02-14 0007 * Description : a tool to insert a text over an image. 0008 * 0009 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2006-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_EDITOR_INSERT_TEXT_TOOL_H 0017 #define DIGIKAM_EDITOR_INSERT_TEXT_TOOL_H 0018 0019 // Local includes 0020 0021 #include "editortool.h" 0022 0023 class QFont; 0024 0025 using namespace Digikam; 0026 0027 namespace DigikamEditorInsertTextToolPlugin 0028 { 0029 0030 class InsertTextTool : public EditorTool 0031 { 0032 Q_OBJECT 0033 0034 public: 0035 0036 explicit InsertTextTool(QObject* const parent); 0037 ~InsertTextTool() override; 0038 0039 Q_SIGNALS: 0040 0041 void signalUpdatePreview(); 0042 0043 private Q_SLOTS: 0044 0045 void slotResetSettings() override; 0046 void slotFontPropertiesChanged(const QFont& font); 0047 void slotUpdatePreview(); 0048 void slotAlignModeChanged(int mode); 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 DigikamEditorInsertTextToolPlugin 0064 0065 #endif // DIGIKAM_EDITOR_INSERT_TEXT_TOOL_H