mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
b8092c07a4
Also reorganized a bit of the code, and renamed a few misleading methods. [Dirk Hohndel: remove some C++11 code] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
22 lines
598 B
C++
22 lines
598 B
C++
#ifndef DIVELOCATIONMODEL_H
|
|
#define DIVELOCATIONMODEL_H
|
|
|
|
#include <QAbstractListModel>
|
|
|
|
class LocationInformationModel : public QAbstractListModel {
|
|
Q_OBJECT
|
|
public:
|
|
enum { DIVE_SITE_UUID = Qt::UserRole+1};
|
|
static LocationInformationModel *instance();
|
|
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
|
QVariant data(const QModelIndex &index = QModelIndex(), int role = Qt::DisplayRole) const;
|
|
int32_t addDiveSite(const QString& name, int lat = 0, int lon = 0);
|
|
|
|
public slots:
|
|
void update();
|
|
private:
|
|
LocationInformationModel(QObject *obj = 0);
|
|
int internalRowCount;
|
|
};
|
|
|
|
#endif
|