summaryrefslogtreecommitdiffstats
path: root/qt-ui/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-05-17 16:33:23 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-17 13:52:19 -0700
commit81158554280420224b99ac172ed20ffed4fd9f11 (patch)
tree07ed001a1a86e507537bb22dcc239783fc615a57 /qt-ui/locationinformation.cpp
parent5eb572b9c63f828e547c502b0dd4df55ff878cad (diff)
downloadsubsurface-81158554280420224b99ac172ed20ffed4fd9f11.tar.gz
Start the model for location information.
And implement the reset method. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r--qt-ui/locationinformation.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp
index 5c11f96f2..38c1492f7 100644
--- a/qt-ui/locationinformation.cpp
+++ b/qt-ui/locationinformation.cpp
@@ -7,6 +7,37 @@
#include <QDebug>
#include <QShowEvent>
+LocationInformationModel::LocationInformationModel(QObject *obj)
+{
+}
+
+int LocationInformationModel::rowCount(const QModelIndex &parent) const
+{
+
+}
+
+QVariant LocationInformationModel::data(const QModelIndex &index, int role) const
+{
+
+}
+
+void LocationInformationModel::update()
+{
+ int i;
+ struct dive_site *ds;
+ for_each_dive_site (i, ds);
+
+ if (rowCount()) {
+ beginRemoveRows(QModelIndex(), 0, rowCount());
+ endRemoveRows();
+ }
+ if (i) {
+ beginInsertRows(QModelIndex(), 0, i);
+ internalRowCount = i;
+ endRemoveRows();
+ }
+}
+
LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBox(parent), modified(false)
{
ui.setupUi(this);