digiKam
exiftoollistview.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 : 2021-04-18
7  * Description : ExifTool metadata list view.
8  *
9  * Copyright (C) 2021-2022 by Gilles Caulier <caulier dot gilles 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_EXIF_TOOL_LIST_VIEW_H
25 #define DIGIKAM_EXIF_TOOL_LIST_VIEW_H
26 
27 // Qt includes
28 
29 #include <QTreeWidget>
30 #include <QWidget>
31 #include <QString>
32 #include <QStringList>
33 #include <QUrl>
34 
35 // Local includes
36 
37 #include "exiftoolparser.h"
38 #include "searchtextbar.h"
39 
40 namespace Digikam
41 {
42 
43 class ExifToolListViewGroup;
44 
45 class ExifToolListView : public QTreeWidget
46 {
47  Q_OBJECT
48 
49 public:
50 
51  explicit ExifToolListView(QWidget* const parent);
52  ~ExifToolListView() override;
53 
54  void loadFromUrl(const QUrl& url);
55  QString errorString() const;
56 
57  QString getCurrentItemKey() const;
58  void setCurrentItemByKey(const QString& itemKey);
59 
60  void setGroupList(const QStringList& tagsFilter,
61  const QStringList& keysFilter = QStringList());
62 
63 Q_SIGNALS:
64 
66  void signalLoadingResult(bool ok);
67 
68 public Q_SLOTS:
69 
71 
72 private Q_SLOTS:
73 
74  void slotExifToolDataAvailable();
75  void slotSelectionChanged(QTreeWidgetItem*, int);
76 
77 private:
78 
79  void setMetadata(const ExifToolParser::ExifToolData& map);
80  ExifToolListViewGroup* findGroup(const QString& group);
81 
82 private:
83 
84  class Private;
85  Private* const d;
86 };
87 
88 } // namespace Digikam
89 
90 #endif // DIGIKAM_EXIF_TOOL_LIST_VIEW_H
Definition: exiftoollistviewgroup.h:38
Definition: exiftoollistview.h:46
ExifToolListView(QWidget *const parent)
Definition: exiftoollistview.cpp:64
void loadFromUrl(const QUrl &url)
Definition: exiftoollistview.cpp:91
QString getCurrentItemKey() const
Definition: exiftoollistview.cpp:195
void signalLoadingResult(bool ok)
void slotSearchTextChanged(const SearchTextSettings &)
Definition: exiftoollistview.cpp:148
void setGroupList(const QStringList &tagsFilter, const QStringList &keysFilter=QStringList())
Definition: exiftoollistview.cpp:267
void signalTextFilterMatch(bool)
void setCurrentItemByKey(const QString &itemKey)
Definition: exiftoollistview.cpp:207
QString errorString() const
Definition: exiftoollistview.cpp:115
~ExifToolListView() override
Definition: exiftoollistview.cpp:86
QHash< QString, QVariantList > ExifToolData
Definition: exiftoolparser.h:97
Definition: searchtextbar.h:43
Definition: datefolderview.cpp:43