File indexing completed on 2025-01-19 03:57:01
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2021-07-24 0007 * Description : frame on screen display. 0008 * 0009 * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2021 by Quoc Hưng Tran <quochungtran1999 at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_FRAME_OSD_H 0017 #define DIGIKAM_FRAME_OSD_H 0018 0019 // Qt includes 0020 0021 #include <QUrl> 0022 #include <QColor> 0023 #include <QPoint> 0024 #include <QFont> 0025 #include <QImage> 0026 #include <QDateTime> 0027 0028 // Local includes 0029 0030 #include "digikam_export.h" 0031 #include "frameosdsettings.h" 0032 #include "dinfointerface.h" 0033 0034 namespace Digikam 0035 { 0036 0037 class DIGIKAM_EXPORT FrameOsd 0038 { 0039 0040 public: 0041 0042 explicit FrameOsd(); 0043 ~FrameOsd(); 0044 0045 public: 0046 0047 QString m_desc; 0048 QPoint m_descPos; 0049 QFont m_descFnt; 0050 Qt::Alignment m_descAlign; 0051 QColor m_descBg; 0052 0053 public: 0054 0055 /** 0056 * Insert OSD on frame. 0057 */ 0058 void insertOsdToFrame(QImage& frame, 0059 const QUrl& url, 0060 const FrameOsdSettings& settings, 0061 DInfoInterface* const info); 0062 0063 /** 0064 * Populate OSD items properties base on Url 0065 */ 0066 void populateOSD(const QUrl& url, 0067 const FrameOsdSettings& settings, 0068 DInfoInterface* const info); 0069 0070 /** 0071 * print comments 0072 */ 0073 void printComments(const QString& comments); 0074 0075 /** 0076 * print tags 0077 */ 0078 void printTags(QStringList& tags); 0079 0080 /** 0081 * Insert message OSD on broken frame or end frame 0082 */ 0083 void insertMessageOsdToFrame(QImage &frame, 0084 const QSize& JPEGsize, 0085 const QString& mess); 0086 }; 0087 0088 } // namespace Digikam 0089 0090 #endif // DIGIKAM_FRAME_OSD_H