File indexing completed on 2025-01-05 03:51:28

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2009-02-28
0007  * Description : batch tool to add visible watermark.
0008  *
0009  * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2010      by Mikkel Baekhoej Christensen <mbc at baekhoej dot dk>
0011  * SPDX-FileCopyrightText: 2017      by Ahmed Fathi <ahmed dot fathi dot abdelmageed at gmail dot com>
0012  *
0013  * SPDX-License-Identifier: GPL-2.0-or-later
0014  *
0015  * ============================================================ */
0016 
0017 #ifndef DIGIKAM_BQM_WATERMARK_H
0018 #define DIGIKAM_BQM_WATERMARK_H
0019 
0020 // Qt includes
0021 
0022 #include <QFont>
0023 
0024 // Local includes
0025 
0026 #include "batchtool.h"
0027 
0028 using namespace Digikam;
0029 
0030 namespace DigikamBqmWatermarkPlugin
0031 {
0032 
0033 class WaterMark : public BatchTool
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038 
0039     explicit WaterMark(QObject* const parent = nullptr);
0040     ~WaterMark()                                            override;
0041 
0042     BatchToolSettings defaultSettings()                     override;
0043 
0044     BatchTool* clone(QObject* const parent = nullptr) const override;
0045 
0046     void registerSettingsWidget()                           override;
0047 
0048 private Q_SLOTS:
0049 
0050     void slotSettingsChanged()                              override;
0051     void slotAssignSettings2Widget()                        override;
0052 
0053 private:
0054 
0055     bool toolOperations()                                   override;
0056     int  queryFontSize(const QString& text,
0057                        const QFont& font,
0058                        int length)                    const;
0059 
0060 private:
0061 
0062     class Private;
0063     Private* const d;
0064 };
0065 
0066 } // namespace DigikamBqmWatermarkPlugin
0067 
0068 #endif // DIGIKAM_BQM_WATERMARK_H