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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-29 10:39:12 -07:00
parent 48c79d19b8
commit 57bad198cb
4 changed files with 212 additions and 1 deletions

View file

@ -3,6 +3,7 @@
#include "metrics.h"
#include "divelist.h"
#include "helpers.h"
#include <QIcon>
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: