File indexing completed on 2025-01-19 03:51:25

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2007-10-18
0007  * Description : XMP content settings page.
0008  *
0009  * SPDX-FileCopyrightText: 2007-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_XMP_CONTENT_H
0016 #define DIGIKAM_XMP_CONTENT_H
0017 
0018 // Qt includes
0019 
0020 #include <QWidget>
0021 
0022 // Local includes
0023 
0024 #include "dmetadata.h"
0025 #include "metadataeditpage.h"
0026 
0027 using namespace Digikam;
0028 
0029 namespace DigikamGenericMetadataEditPlugin
0030 {
0031 
0032 class XMPContent : public MetadataEditPage
0033 {
0034     Q_OBJECT
0035 
0036 public:
0037 
0038     explicit XMPContent(QWidget* const parent);
0039     ~XMPContent() override;
0040 
0041     void applyMetadata(const DMetadata& meta);
0042     void readMetadata(const DMetadata& meta);
0043 
0044     bool syncJFIFCommentIsChecked()   const;
0045     bool syncEXIFCommentIsChecked()   const;
0046     bool syncEXIFCopyrightIsChecked() const;
0047 
0048     void setCheckedSyncJFIFComment(bool c);
0049     void setCheckedSyncEXIFComment(bool c);
0050     void setCheckedSyncEXIFCopyright(bool c);
0051 
0052     QString getXMPCaption()           const;
0053     QString getXMPCopyright()         const;
0054 
0055 Q_SIGNALS:
0056 
0057     void signalModified();
0058 
0059 private Q_SLOTS:
0060 
0061     void slotSyncCaptionOptionsEnabled(bool);
0062     void slotSyncCopyrightOptionsEnabled(bool);
0063 
0064 private:
0065 
0066     class Private;
0067     Private* const d;
0068 };
0069 
0070 } // namespace DigikamGenericMetadataEditPlugin
0071 
0072 #endif // DIGIKAM_XMP_CONTENT_H