File indexing completed on 2024-04-28 04:21:03
0001 // SPDX-FileCopyrightText: 2003-2020 The KPhotoAlbum Development Team 0002 // SPDX-FileCopyrightText: 2021-2022 Johannes Zarl-Zierl <johannes@zarl-zierl.at> 0003 // 0004 // SPDX-License-Identifier: GPL-2.0-or-later 0005 0006 #ifndef RANGEWIDGET_H 0007 #define RANGEWIDGET_H 0008 0009 #include <kpaexif/SearchInfo.h> 0010 0011 #include <QList> 0012 #include <qobject.h> 0013 class QGridLayout; 0014 class QComboBox; 0015 0016 namespace Exif 0017 { 0018 0019 class RangeWidget : public QObject 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 class Value 0025 { 0026 public: 0027 Value() { } 0028 Value(double value, const QString &text) 0029 : value(value) 0030 , text(text) 0031 { 0032 } 0033 double value; 0034 QString text; 0035 }; 0036 0037 typedef QList<Value> ValueList; 0038 0039 RangeWidget(const QString &text, const QString &searchTag, const ValueList &list, QGridLayout *layout, int row, QObject *parent); 0040 Exif::SearchInfo::Range range() const; 0041 0042 protected Q_SLOTS: 0043 void slotUpdateTo(int index); 0044 0045 protected: 0046 QString tagToLabel(const QString &tag); 0047 0048 private: 0049 QString m_searchTag; 0050 QComboBox *m_from; 0051 QComboBox *m_to; 0052 ValueList m_list; 0053 }; 0054 0055 } 0056 0057 #endif /* RANGEWIDGET_H */ 0058 0059 // vi:expandtab:tabstop=4 shiftwidth=4: