subsurface/qt-models/divelocationmodel.h
Tomaz Canabrava ac6a7ab24e Update DiveLocationModel when thread finishes
This patch updates the DiveLocationModel when the
GeoLoockupInformationThread finishes, and also selects
the correct index for the displayed dive.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29 20:59:11 -07:00

19 lines
486 B
C++

#ifndef DIVELOCATIONMODEL_H
#define DIVELOCATIONMODEL_H
#include <QAbstractListModel>
class LocationInformationModel : public QAbstractListModel {
Q_OBJECT
public:
static LocationInformationModel *instance();
int rowCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index = QModelIndex(), int role = Qt::DisplayRole) const;
public slots:
void update();
private:
LocationInformationModel(QObject *obj = 0);
int internalRowCount;
};
#endif