digiKam
metadatalistview.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 : 2006-02-21
7  * Description : a generic list view widget to
8  * display metadata
9  *
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_META_DATA_LIST_VIEW_H
26 #define DIGIKAM_META_DATA_LIST_VIEW_H
27 
28 // Qt includes
29 
30 #include <QString>
31 #include <QMap>
32 #include <QResizeEvent>
33 #include <QTreeWidget>
34 
35 // Local includes
36 
37 #include "searchtextbar.h"
38 #include "metadatawidget.h"
39 #include "digikam_export.h"
40 
41 namespace Digikam
42 {
43 
44 class MdKeyListViewItem;
45 
46 class DIGIKAM_EXPORT MetadataListView : public QTreeWidget
47 {
48  Q_OBJECT
49 
50 public:
51 
52  explicit MetadataListView(QWidget* const parent);
53  ~MetadataListView() override;
54 
55  QString getCurrentItemKey() const;
56  void setCurrentItemByKey(const QString& itemKey);
57 
58  void setIfdList(const DMetadata::MetaDataMap& ifds, const QStringList& tagsFilter);
59  void setIfdList(const DMetadata::MetaDataMap& ifds, const QStringList& keysFilter,
60  const QStringList& tagsFilter);
61 
62 Q_SIGNALS:
63 
65 
66 public Q_SLOTS:
67 
68  void slotSearchTextChanged(const SearchTextSettings&);
69 
70 private Q_SLOTS:
71 
72  void slotSelectionChanged(QTreeWidgetItem*, int);
73 
74 private:
75 
76  MdKeyListViewItem* findMdKeyItem(const QString& key);
77  void cleanUpMdKeyItem();
78 
79 private:
80 
81  QString m_selectedItemKey;
82 
83  MetadataWidget* m_parent;
84 };
85 
86 } // namespace Digikam
87 
88 #endif // DIGIKAM_META_DATA_LIST_VIEW_H
Definition: mdkeylistviewitem.h:44
QMap< QString, QString > MetaDataMap
Definition: metaengine.h:136
Definition: metadatalistview.h:47
void signalTextFilterMatch(bool)
Definition: metadatawidget.h:44
Definition: searchtextbar.h:43
Definition: datefolderview.cpp:43