1 /* SPDX-FileCopyrightText: 2020-2021 Tobias Leupold <tobias.leupold@gmx.de>
2 
3    SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-KDE-Accepted-GPL
4 */
5 
6 #ifndef PREVIEWWIDGET_H
7 #define PREVIEWWIDGET_H
8 
9 // Local includes
10 #include "KGeoTag.h"
11 
12 // Qt includes
13 #include <QWidget>
14 #include <QHash>
15 #include <QModelIndex>
16 
17 // Local classes
18 class SharedObjects;
19 class CoordinatesFormatter;
20 class ImagePreview;
21 
22 // Qt classes
23 class QLabel;
24 class QLocale;
25 
26 class PreviewWidget : public QWidget
27 {
28     Q_OBJECT
29 
30 public:
31     explicit PreviewWidget(SharedObjects *sharedObjects, QWidget *parent = nullptr);
32     QString currentImage() const;
33     void setCameraClockDeviation(int deviation);
34     void reload();
35 
36 public slots:
37     void setImage(const QModelIndex &index = QModelIndex());
38 
39 private: // Variables
40     CoordinatesFormatter *m_formatter;
41     const QLocale *m_locale;
42 
43     ImagePreview *m_preview;
44 
45     QLabel *m_path;
46     QLabel *m_dateTimeLabel;
47     QLabel *m_date;
48     QLabel *m_coordinates;
49     QHash<KGeoTag::MatchType, QString> m_matchString;
50     QString m_currentImage;
51     QModelIndex m_currentIndex;
52     int m_cameraClockDeviation = 0;
53 
54 };
55 
56 #endif // PREVIEWWIDGET_H
57