digiKam
dbkeyscollection.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 : 2010-05-19
7  * Description : a db option key
8  *
9  * Copyright (C) 2009-2012 by Andi Clemens <andi dot clemens 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_DB_KEYS_COLLECTION_H
25 #define DIGIKAM_DB_KEYS_COLLECTION_H
26 
27 // Qt includes
28 
29 #include <QMap>
30 
31 // Local includes
32 
33 #include "parsesettings.h"
34 
35 namespace Digikam
36 {
37 
38 typedef QMap<QString, QString> DbKeyIdsMap;
39 
47 {
48 public:
49 
55  explicit DbKeysCollection(const QString& n);
56  virtual ~DbKeysCollection();
57 
65  QString getValue(const QString& key, ParseSettings& settings);
66 
71  DbKeyIdsMap ids() const;
72 
77  QString collectionName() const;
78 
79 protected:
80 
94  virtual QString getDbValue(const QString& key, ParseSettings& settings) = 0;
95 
102  void addId(const QString& id, const QString& description);
103 
104 private:
105 
106  DbKeyIdsMap idsMap;
107  QString name;
108 
109 private:
110 
111  DbKeysCollection(const DbKeysCollection&) = delete;
112  DbKeysCollection& operator=(const DbKeysCollection&) = delete;
113 };
114 
115 } // namespace Digikam
116 
117 #endif // DIGIKAM_DB_KEYS_COLLECTION_H
A class for managing / grouping database keys.
Definition: dbkeyscollection.h:47
DbKeysCollection(const QString &n)
Definition: dbkeyscollection.cpp:29
virtual ~DbKeysCollection()
Definition: dbkeyscollection.cpp:34
QString getValue(const QString &key, ParseSettings &settings)
Definition: dbkeyscollection.cpp:38
QString collectionName() const
Definition: dbkeyscollection.cpp:43
virtual QString getDbValue(const QString &key, ParseSettings &settings)=0
void addId(const QString &id, const QString &description)
Definition: dbkeyscollection.cpp:48
DbKeyIdsMap ids() const
Definition: dbkeyscollection.cpp:58
Definition: parsesettings.h:43
Definition: datefolderview.cpp:43
QMap< QString, QString > DbKeyIdsMap
Definition: dbkeyscollection.h:38