digiKam
watermark.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 : 2009-02-28
7  * Description : batch tool to add visible watermark.
8  *
9  * Copyright (C) 2009-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2010 by Mikkel Baekhoej Christensen <mbc at baekhoej dot dk>
11  * Copyright (C) 2017 by Ahmed Fathi <ahmed dot fathi dot abdelmageed at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_BQM_WATERMARK_H
27 #define DIGIKAM_BQM_WATERMARK_H
28 
29 // Qt includes
30 
31 #include <QFont>
32 
33 // Local includes
34 
35 #include "batchtool.h"
36 
37 using namespace Digikam;
38 
40 {
41 
42 class WaterMark : public BatchTool
43 {
44  Q_OBJECT
45 
46 public:
47 
48  explicit WaterMark(QObject* const parent = nullptr);
49  ~WaterMark() override;
50 
51  BatchToolSettings defaultSettings() override;
52 
53  BatchTool* clone(QObject* const parent = nullptr) const override;
54 
55  void registerSettingsWidget() override;
56 
57 private Q_SLOTS:
58 
59  void slotSettingsChanged() override;
60  void slotAssignSettings2Widget() override;
61 
62 private:
63 
64  bool toolOperations() override;
65  int queryFontSize(const QString& text,
66  const QFont& font,
67  int length) const;
68 
69 private:
70 
71  class Private;
72  Private* const d;
73 };
74 
75 } // namespace DigikamBqmWatermarkPlugin
76 
77 #endif // DIGIKAM_BQM_WATERMARK_H
Definition: watermark.h:43
Definition: batchtool.h:56
Definition: watermark.cpp:66
Definition: datefolderview.cpp:43
QMap< QString, QVariant > BatchToolSettings
Definition: batchtool.h:48