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

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2011-03-14
0007  * Description : a dialog to edit EXIF,IPTC and XMP metadata
0008  *
0009  * SPDX-FileCopyrightText: 2011      by Victor Dodon <dodon dot victor at gmail dot com>
0010  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_META_DATA_EDIT_DIALOG_H
0017 #define DIGIKAM_META_DATA_EDIT_DIALOG_H
0018 
0019 // Qt includes
0020 
0021 #include <QCloseEvent>
0022 #include <QUrl>
0023 
0024 // Local includes
0025 
0026 #include "dplugindialog.h"
0027 #include "dinfointerface.h"
0028 
0029 using namespace Digikam;
0030 
0031 namespace DigikamGenericMetadataEditPlugin
0032 {
0033 
0034 class MetadataEditDialog : public DPluginDialog
0035 {
0036     Q_OBJECT
0037 
0038 public:
0039 
0040     explicit MetadataEditDialog(QWidget* const parent, DInfoInterface* const iface);
0041     ~MetadataEditDialog() override;
0042 
0043     QList<QUrl>::iterator currentItem()                  const;
0044     QString currentItemTitleHeader(const QString& title) const;
0045 
0046 Q_SIGNALS:
0047 
0048     void signalMetadataChangedForUrl(const QUrl&);
0049 
0050 public Q_SLOTS:
0051 
0052     void slotModified();
0053 
0054 private Q_SLOTS:
0055 
0056     void slotOk();
0057     void slotClose();
0058     void slotItemChanged();
0059     void slotApply();
0060     void slotNext();
0061     void slotPrevious();
0062     void slotSetReadOnly(bool);
0063 
0064 protected:
0065 
0066     void closeEvent(QCloseEvent*)       override;
0067     bool eventFilter(QObject*, QEvent*) override;
0068 
0069 private:
0070 
0071     void saveSettings();
0072     void readSettings();
0073     void updatePreview();
0074 
0075 private:
0076 
0077     class Private;
0078     Private* const d;
0079 };
0080 
0081 } // namespace DigikamGenericMetadataEditPlugin
0082 
0083 #endif // DIGIKAM_META_DATA_EDIT_DIALOG_H