digiKam
inserttexttool.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-14
7  * Description : a tool to insert a text over an image.
8  *
9  * Copyright (C) 2005-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2006-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
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_EDITOR_INSERT_TEXT_TOOL_H
26 #define DIGIKAM_EDITOR_INSERT_TEXT_TOOL_H
27 
28 // Local includes
29 
30 #include "editortool.h"
31 
32 class QFont;
33 
34 using namespace Digikam;
35 
37 {
38 
39 class InsertTextTool : public EditorTool
40 {
41  Q_OBJECT
42 
43 public:
44 
45  explicit InsertTextTool(QObject* const parent);
46  ~InsertTextTool() override;
47 
48 Q_SIGNALS:
49 
51 
52 private Q_SLOTS:
53 
54  void slotResetSettings() override;
55  void slotFontPropertiesChanged(const QFont& font);
56  void slotUpdatePreview();
57  void slotAlignModeChanged(int mode);
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 DigikamEditorInsertTextToolPlugin
73 
74 #endif // DIGIKAM_EDITOR_INSERT_TEXT_TOOL_H
Definition: editortool.h:50
Definition: inserttexttool.cpp:66
Definition: datefolderview.cpp:43