File indexing completed on 2024-04-28 15:39:56

0001 /* SPDX-FileCopyrightText: 2003-2019 The KPhotoAlbum Development Team
0002 
0003    SPDX-License-Identifier: GPL-2.0-or-later
0004 */
0005 
0006 #ifndef GROUPCOUNTER_H
0007 #define GROUPCOUNTER_H
0008 #include "Category.h"
0009 
0010 #include <kpabase/SettingsData.h>
0011 
0012 #include <QHash>
0013 
0014 namespace DB
0015 {
0016 using Utilities::StringSet;
0017 
0018 class GroupCounter
0019 {
0020 public:
0021     explicit GroupCounter(const QString &category);
0022     void count(const StringSet &, const ImageDate &date);
0023     QMap<QString, CountWithRange> result();
0024 
0025 private:
0026     QHash<QString, QStringList> m_memberToGroup;
0027     QHash<QString, CountWithRange> m_groupCount;
0028 };
0029 
0030 }
0031 
0032 #endif /* GROUPCOUNTER_H */
0033 
0034 // vi:expandtab:tabstop=4 shiftwidth=4: