mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
48c79d19b8
commit
57bad198cb
4 changed files with 212 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue