File indexing completed on 2025-03-09 03:57:06
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2010-05-19 0007 * Description : a base class for a database keys collection 0008 * 0009 * SPDX-FileCopyrightText: 2009-2012 by Andi Clemens <andi dot clemens at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #include "dbkeyscollection.h" 0016 0017 namespace Digikam 0018 { 0019 0020 DbKeysCollection::DbKeysCollection(const QString& n) 0021 : name(n) 0022 { 0023 } 0024 0025 DbKeysCollection::~DbKeysCollection() 0026 { 0027 } 0028 0029 QString DbKeysCollection::getValue(const QString& key, ParseSettings& settings) 0030 { 0031 return getDbValue(key, settings); 0032 } 0033 0034 QString DbKeysCollection::collectionName() const 0035 { 0036 return name; 0037 } 0038 0039 void DbKeysCollection::addId(const QString& id, const QString& description) 0040 { 0041 if (id.isEmpty() || description.isEmpty()) 0042 { 0043 return; 0044 } 0045 0046 idsMap.insert(id, description); 0047 } 0048 0049 DbKeyIdsMap DbKeysCollection::ids() const 0050 { 0051 return idsMap; 0052 } 0053 0054 } // namespace Digikam