File indexing completed on 2025-01-19 03:55:49

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2015-08-21
0007  * Description : metadatahub manager
0008  *
0009  * SPDX-FileCopyrightText: 2015 by Veaceslav Munteanu <veaceslav dot munteanu90 at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_METADATA_HUB_MNGR_H
0016 #define DIGIKAM_METADATA_HUB_MNGR_H
0017 
0018 // Qt includes
0019 
0020 #include <QObject>
0021 #include <QPointer>
0022 
0023 namespace Digikam
0024 {
0025 
0026 class ItemInfo;
0027 
0028 class MetadataHubMngr : public QObject
0029 {
0030     Q_OBJECT
0031 
0032 public:
0033 
0034     static MetadataHubMngr* instance();
0035     ~MetadataHubMngr() override;
0036 
0037     static QPointer<MetadataHubMngr> internalPtr;
0038     static bool                      isCreated();
0039 
0040     void addPendingIds(const QList<qlonglong>& imageIds);
0041     void addPending(const ItemInfo& info);
0042     void requestShutDown();
0043 
0044 Q_SIGNALS:
0045 
0046     void signalPendingMetadata(int numbers);
0047 
0048 public Q_SLOTS:
0049 
0050     void slotApplyPending();
0051 
0052 private:
0053 
0054     // Disable
0055     MetadataHubMngr();
0056     explicit MetadataHubMngr(QObject*);
0057 
0058     class Private;
0059     Private* const d;
0060 };
0061 
0062 } // namespace Digikam
0063 
0064 #endif // DIGIKAM_METADATA_HUB_MNGR_H