digiKam
exiftoolwidget.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 widget.
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_WIDGET_H
25 #define DIGIKAM_EXIF_TOOL_WIDGET_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 #include <QStackedWidget>
31 #include <QString>
32 #include <QUrl>
33 #include <QAction>
34 
35 // Local includes
36 
37 #include "digikam_export.h"
38 
39 namespace Digikam
40 {
41 
42 class DIGIKAM_EXPORT ExifToolWidget : public QStackedWidget
43 {
44  Q_OBJECT
45 
46 public:
47 
49  {
50  NONE = 0,
52  CUSTOM
53  };
54 
55 public:
56 
57  explicit ExifToolWidget(QWidget* const parent);
58  ~ExifToolWidget() override;
59 
60  void loadFromUrl(const QUrl& url);
61 
62  QString getCurrentItemKey() const;
63  void setCurrentItemByKey(const QString& itemKey);
64 
65  QStringList getTagsFilter() const;
66  void setTagsFilter(const QStringList& list);
67 
68  int getMode() const;
69  void setMode(int mode);
70 
71 Q_SIGNALS:
72 
75 
76 private Q_SLOTS:
77 
78  void slotLoadingResult(bool ok);
79  void slotPreLoadingTimerDone();
80  void slotCopy2Clipboard();
81  void slotPrintMetadata();
82  void slotSaveMetadataToFile();
83  void slotFilterChanged(QAction*);
84 
85 private:
86 
87  void setup();
88  QString metadataToText() const;
89  void buildView();
90 
91 private:
92 
93  class Private;
94  Private* const d;
95 };
96 
97 } // namespace Digikam
98 
99 #endif // DIGIKAM_EXIF_TOOL_WIDGET_H
Definition: exiftoolwidget.h:43
TagFilters
Definition: exiftoolwidget.h:49
@ PHOTO
Definition: exiftoolwidget.h:51
@ NONE
Definition: dngconverteractions.h:44
Definition: datefolderview.cpp:43