1 #ifndef LENSSELECTMODEL_H
2 #define LENSSELECTMODEL_H
3 
4 #include <QAbstractTableModel>
5 #include <lensfun/lensfun.h>
6 
7 class LensSelectModel : public QAbstractTableModel
8 {
9     Q_OBJECT
10 
11 public:
12     explicit LensSelectModel(QObject *parent = 0);
13     ~LensSelectModel();
14 
15     QVariant data(const QModelIndex &index, int role) const;
16     int rowCount(const QModelIndex &parent = QModelIndex()) const;
17     int columnCount(const QModelIndex &parent = QModelIndex()) const;
18     QHash<int,QByteArray> roleNames() const;
19 
20     Q_INVOKABLE void update(QString camera, QString lens);
21 
22 private:
23     QHash<int,QByteArray> m_roleNames;
24     int m_rowCount;
25 
26     lfDatabase *ldb;
27     std::vector<QString> makerList;
28     std::vector<QString> modelList;
29     std::vector<int> scoreList;
30 
31 };
32 
33 #endif // LENSSELECTMODEL_H
34