diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-06-22 17:24:15 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-22 17:10:57 -0700 |
commit | 7f83b35ec9e7e15e085604c37956510e5703e6f3 (patch) | |
tree | 3ce5d97b58ca49b98cb109a190e780b3d4a06e38 /qt-models/divelocationmodel.cpp | |
parent | a19bbcc715b9032ee5aa41dfcfe47a1607600e67 (diff) | |
download | subsurface-7f83b35ec9e7e15e085604c37956510e5703e6f3.tar.gz |
Add model to populate the Preferences for GeoRef
Simple model that list the options for GeoRef.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models/divelocationmodel.cpp')
-rw-r--r-- | qt-models/divelocationmodel.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index c917cddf1..e34e20a5d 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -77,7 +77,8 @@ bool LocationInformationModel::setData(const QModelIndex &index, const QVariant return true; } -bool LocationInformationModel::removeRows(int row, int count, const QModelIndex & parent) { +bool LocationInformationModel::removeRows(int row, int count, const QModelIndex & parent) +{ if(row >= rowCount()) return false; @@ -89,3 +90,15 @@ bool LocationInformationModel::removeRows(int row, int count, const QModelIndex endRemoveRows(); return true; } + +GeoReferencingOptionsModel *GeoReferencingOptionsModel::instance() { + static GeoReferencingOptionsModel *self = new GeoReferencingOptionsModel(); + return self; +} + +GeoReferencingOptionsModel::GeoReferencingOptionsModel(QObject *parent) : QStringListModel(parent) +{ + QStringList list; + list << "Country" << "State" << "District" << "Town" << "Suburb" << "Body of Water" << "Site Name"; + setStringList(list); +} |