1 // SPDX-FileCopyrightText: 2003-2020 The KPhotoAlbum Development Team 2 // SPDX-FileCopyrightText: 2021 Johannes Zarl-Zierl <johannes@zarl-zierl.at> 3 // 4 // SPDX-License-Identifier: GPL-2.0-or-later 5 6 #ifndef RANGEWIDGET_H 7 #define RANGEWIDGET_H 8 9 #include <kpaexif/SearchInfo.h> 10 11 #include <QList> 12 #include <qobject.h> 13 class QGridLayout; 14 class QComboBox; 15 16 namespace Exif 17 { 18 19 class RangeWidget : public QObject 20 { 21 Q_OBJECT 22 23 public: 24 class Value 25 { 26 public: Value()27 Value() { } Value(double value,const QString & text)28 Value(double value, const QString &text) 29 : value(value) 30 , text(text) 31 { 32 } 33 double value; 34 QString text; 35 }; 36 37 typedef QList<Value> ValueList; 38 39 RangeWidget(const QString &text, const QString &searchTag, const ValueList &list, QGridLayout *layout, int row, QObject *parent); 40 Exif::SearchInfo::Range range() const; 41 42 protected slots: 43 void slotUpdateTo(int index); 44 45 protected: 46 QString tagToLabel(const QString &tag); 47 48 private: 49 QString m_searchTag; 50 QComboBox *m_from; 51 QComboBox *m_to; 52 ValueList m_list; 53 }; 54 55 } 56 57 #endif /* RANGEWIDGET_H */ 58 59 // vi:expandtab:tabstop=4 shiftwidth=4: 60