digiKam
baloowrap.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 : 2014-08-05
7  * Description : Plasma file indexer interface.
8  *
9  * Copyright (C) 2014 by Veaceslav Munteanu <veaceslav dot munteanu90 at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_BALOO_WRAP_H
25 #define DIGIKAM_BALOO_WRAP_H
26 
27 // Qt includes
28 
29 #include <QObject>
30 #include <QStringList>
31 #include <QPointer>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 
37 class QUrl;
38 
39 namespace Digikam
40 {
41 
42 class ItemInfo;
43 
44 class BalooInfo
45 {
46 public:
47 
49  : rating(-1)
50  {
51  }
52 
53  QStringList tags;
54  QString comment;
55  int rating;
56 };
57 
68 class DIGIKAM_EXPORT BalooWrap : public QObject
69 {
70  Q_OBJECT
71 
72 public:
73 
74  BalooWrap();
75  ~BalooWrap() override;
76 
80  static QPointer<BalooWrap> internalPtr;
81  static BalooWrap* instance();
82  static bool isCreated();
83 
89  void setSemanticInfo(const QUrl& url, const BalooInfo& bInfo);
90 
97  BalooInfo getSemanticInfo(const QUrl& url) const;
98 
99  void setSyncToBaloo(bool value);
100 
101  bool getSyncToBaloo() const;
102 
103  void setSyncToDigikam(bool value);
104 
105  bool getSyncToDigikam() const;
106 
107 private:
108 
109  // Disable
110  explicit BalooWrap(QObject*) = delete;
111 
112 private:
113 
114  class Private;
115  Private* const d;
116 };
117 
118 } // namespace Digikam
119 
120 #endif // DIGIKAM_BALOO_WRAP_H
Definition: baloowrap.h:45
QStringList tags
Definition: baloowrap.h:53
int rating
Definition: baloowrap.h:55
BalooInfo()
Definition: baloowrap.h:48
QString comment
Definition: baloowrap.h:54
The BalooWrap class is a singleton class which offer functionality for reading and writing image comm...
Definition: baloowrap.h:69
static QPointer< BalooWrap > internalPtr
internalPtr - singleton implementation
Definition: baloowrap.h:80
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: datefolderview.cpp:43