summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/divelistview.cpp3
-rw-r--r--qt-models/divetripmodel.cpp16
-rw-r--r--qt-models/divetripmodel.h2
3 files changed, 21 insertions, 0 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 57bc0d9e1..f1fb285ef 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -98,6 +98,9 @@ void DiveListView::calculateInitialColumnWidth(int col)
case DiveTripModel::PHOTOS:
sw = 5*em;
break;
+ case DiveTripModel::BUDDIES:
+ sw = 50*em;
+ break;
case DiveTripModel::LOCATION:
sw = 50*em;
break;
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;
diff --git a/qt-models/divetripmodel.h b/qt-models/divetripmodel.h
index 32a656bfe..700ae4c12 100644
--- a/qt-models/divetripmodel.h
+++ b/qt-models/divetripmodel.h
@@ -25,6 +25,7 @@ public:
MAXCNS,
TAGS,
PHOTOS,
+ BUDDIES,
COUNTRY,
LOCATION,
COLUMNS
@@ -75,6 +76,7 @@ public:
MAXCNS,
TAGS,
PHOTOS,
+ BUDDIES,
COUNTRY,
LOCATION,
COLUMNS