File indexing completed on 2025-01-19 03:53:48
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2004-10-04 0007 * Description : synchronize Input/Output jobs. 0008 * 0009 * SPDX-FileCopyrightText: 2006-2013 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 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_SYNC_JOB_H 0017 #define DIGIKAM_SYNC_JOB_H 0018 0019 // Qt includes 0020 0021 #include <QObject> 0022 #include <QPixmap> 0023 0024 // Local includes 0025 0026 #include "digikam_export.h" 0027 0028 class QString; 0029 0030 namespace Digikam 0031 { 0032 0033 class Album; 0034 class TAlbum; 0035 0036 // ------------------------------------------------------------------------------- 0037 0038 class DIGIKAM_GUI_EXPORT SyncJob : public QObject 0039 { 0040 Q_OBJECT 0041 0042 public: 0043 0044 /** 0045 * Load the image or icon for the tag thumbnail. 0046 */ 0047 static QPixmap getTagThumbnail(TAlbum* const album); 0048 static QPixmap getTagThumbnail(const QString& name, int size); 0049 0050 private: 0051 0052 void enterWaitingLoop() const; 0053 void quitWaitingLoop() const; 0054 0055 QPixmap getTagThumbnailPriv(TAlbum* const album) const; 0056 0057 private Q_SLOTS: 0058 0059 void slotGotThumbnailFromIcon(Album* album, const QPixmap& pix); 0060 void slotLoadThumbnailFailed(Album* album); 0061 0062 private: 0063 0064 // Disable 0065 SyncJob(); 0066 explicit SyncJob(QObject*) = delete; 0067 ~SyncJob() override; 0068 0069 private: 0070 0071 class Private; 0072 Private* const d; 0073 }; 0074 0075 } // namespace Digikam 0076 0077 #endif // DIGIKAM_SYNC_JOB_H