digiKam
syncjob.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2004-10-04
7  * Description : synchronize Input/Output jobs.
8  *
9  * Copyright (C) 2006-2013 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_SYNC_JOB_H
26 #define DIGIKAM_SYNC_JOB_H
27 
28 // Qt includes
29 
30 #include <QObject>
31 #include <QPixmap>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 
37 class QString;
38 
39 namespace Digikam
40 {
41 
42 class Album;
43 class TAlbum;
44 
45 // -------------------------------------------------------------------------------
46 
47 class DIGIKAM_GUI_EXPORT SyncJob : public QObject
48 {
49  Q_OBJECT
50 
51 public:
52 
56  static QPixmap getTagThumbnail(TAlbum* const album);
57  static QPixmap getTagThumbnail(const QString& name, int size);
58 
59 private:
60 
61  void enterWaitingLoop() const;
62  void quitWaitingLoop() const;
63 
64  QPixmap getTagThumbnailPriv(TAlbum* const album) const;
65 
66 private Q_SLOTS:
67 
68  void slotGotThumbnailFromIcon(Album* album, const QPixmap& pix);
69  void slotLoadThumbnailFailed(Album* album);
70 
71 private:
72 
73  // Disable
74  SyncJob();
75  explicit SyncJob(QObject*) = delete;
76  ~SyncJob() override;
77 
78 private:
79 
80  class Private;
81  Private* const d;
82 };
83 
84 } // namespace Digikam
85 
86 #endif // DIGIKAM_SYNC_JOB_H
Abstract base class for all album types.
Definition: album.h:67
Definition: syncjob.h:48
static QPixmap getTagThumbnail(const QString &name, int size)
Definition: album.h:420
@ Album
Definition: coredbfields.h:58
Definition: datefolderview.cpp:43