From 57bad198cbaaae20a1357377ecfddd72bf697882 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 29 Jun 2015 10:39:12 -0700 Subject: [PATCH] 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 c582cde302d4644487553a60d1aa724291d10525..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 575 zcmeAS@N?(olHy`uVBq!ia0vp^+(69F!3-o>A0K4`QY`6?zK#qG8~eHcB(ehe3dtTp zz6=aiY77hwEes65fI^S4cycMNd;_9go36uF{EljzvoUY}PO>eSbfif7beoaw6uR zD%1b`K3FZA-`0>~tjm5pfc3*KX@|yF95>?^t~Znhn#P#q?e5~7et|a$$l)yTh%5$1 z$8`{9bkdkz0TgWVba4#fxNdu@UFcwf0Luf>CIQ_j4kgDg_pE>aM*U(+pretmq>KIb}yu6sQ53s<@4 Q0bRr3>FVdQ&MBb@0A{g=Hvj+t 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