From 57bad198cbaaae20a1357377ecfddd72bf697882 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 29 Jun 2015 10:39:12 -0700 Subject: Show icon in dive list to mark dives that have GPS data The icon is public domain and came from https://commons.wikimedia.org/wiki/File:Emblem-earth.svg (also removed the redundant entry for "edit" from the .qrc file) Signed-off-by: Dirk Hohndel --- icons/Emblem-earth.svg | 203 ++++++++++++++++++++++++++++++++++++++++++++ icons/satellite.png | Bin 575 -> 0 bytes qt-models/divetripmodel.cpp | 8 ++ subsurface.qrc | 2 +- 4 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 icons/Emblem-earth.svg delete mode 100644 icons/satellite.png diff --git a/icons/Emblem-earth.svg b/icons/Emblem-earth.svg new file mode 100644 index 000000000..40a7790b6 --- /dev/null +++ b/icons/Emblem-earth.svg @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + Jakub Steiner + + + + + Tuomas Kuosmanen + + + + http://jimmac.musichall.cz + + + internet + tools + applications + category + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/icons/satellite.png b/icons/satellite.png deleted file mode 100644 index c582cde30..000000000 Binary files a/icons/satellite.png and /dev/null differ diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index 3b08e6838..fcba4a570 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -3,6 +3,7 @@ #include "metrics.h" #include "divelist.h" #include "helpers.h" +#include static int nitrox_sort_value(struct dive *dive) { @@ -178,6 +179,13 @@ QVariant DiveItem::data(int column, int role) const break; } break; + case Qt::DecorationRole: + if (column == LOCATION) + if (dive_has_gps_location(dive)) { + IconMetrics im = defaultIconMetrics(); + retVal = QIcon(":satellite").pixmap(im.sz_small, im.sz_small); + } + break; case Qt::ToolTipRole: switch (column) { case NR: diff --git a/subsurface.qrc b/subsurface.qrc index 7eff0d952..a28c86ad6 100644 --- a/subsurface.qrc +++ b/subsurface.qrc @@ -7,7 +7,6 @@ icons/units.png icons/advanced.png icons/network.png - icons/advanced.png icons/graph.png icons/minimum.png icons/maximum.png @@ -78,5 +77,6 @@ icons/go-top.svg icons/process-stop.svg icons/edit-circled.svg + icons/Emblem-earth.svg -- cgit v1.2.3-70-g09d2