diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2018-09-04 17:10:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-04 15:02:07 -0700 |
commit | 12789a3f9ff81f77bda76ccb0cc6ba5aa6aa0ace (patch) | |
tree | ab46579096c92332df0ae6d9ccc986c6013e1a18 /qt-models/divetripmodel.cpp | |
parent | 77577f717f5aad38ea8c4c41c10c181486c4337f (diff) | |
download | subsurface-12789a3f9ff81f77bda76ccb0cc6ba5aa6aa0ace.tar.gz |
Desktop: buddies in the dive list
As proposed in RFC #1587, now also alllow buddies to be shown in the
divelist.
Fixes: #1587
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'qt-models/divetripmodel.cpp')
-rw-r--r-- | qt-models/divetripmodel.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp index b94eaa985..41c8dea80 100644 --- a/qt-models/divetripmodel.cpp +++ b/qt-models/divetripmodel.cpp @@ -39,6 +39,7 @@ static QVariant dive_table_alignment(int column) case DiveTripModel::TAGS: case DiveTripModel::PHOTOS: case DiveTripModel::COUNTRY: + case DiveTripModel::BUDDIES: case DiveTripModel::LOCATION: retVal = int(Qt::AlignLeft | Qt::AlignVCenter); break; @@ -151,6 +152,9 @@ QVariant DiveItem::data(int column, int role) const case COUNTRY: retVal = QString(get_dive_country(dive)); break; + case BUDDIES: + retVal = QString(dive->buddy); + break; case LOCATION: retVal = QString(get_dive_location(dive)); break; @@ -203,6 +207,9 @@ QVariant DiveItem::data(int column, int role) const case COUNTRY: retVal = QString(get_dive_country(dive)); break; + case BUDDIES: + retVal = QString(dive->buddy); + break; case LOCATION: retVal = QString(get_dive_location(dive)); break; @@ -286,6 +293,9 @@ QVariant DiveItem::data(int column, int role) const case COUNTRY: retVal = tr("Country"); break; + case BUDDIES: + retVal = tr("Buddy"); + break; case LOCATION: retVal = tr("Location"); break; @@ -522,6 +532,9 @@ QVariant DiveTripModel::headerData(int section, Qt::Orientation orientation, int case COUNTRY: ret = tr("Country"); break; + case BUDDIES: + ret = tr("Buddy"); + break; case LOCATION: ret = tr("Location"); break; @@ -576,6 +589,9 @@ QVariant DiveTripModel::headerData(int section, Qt::Orientation orientation, int case PHOTOS: ret = tr("Media before/during/after dive"); break; + case BUDDIES: + ret = tr("Buddy"); + break; case LOCATION: ret = tr("Location"); break; |