diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-12 14:14:25 -0300 |
---|---|---|
committer | Tomaz Canabrava <tcanabrava@kde.org> | 2013-06-12 14:14:25 -0300 |
commit | ab0213f28ecfb1b49ca0c5c7c1d6900ab1fb8d71 (patch) | |
tree | 047ddf336fb5e15f013a51623e7a833bc6d18911 /qt-ui/models.cpp | |
parent | bd8470ebcfe07a347c3c47d2a72e0b8cdd316630 (diff) | |
download | subsurface-ab0213f28ecfb1b49ca0c5c7c1d6900ab1fb8d71.tar.gz |
Implements the DiveList to behave like Linus Explained.
Implements the divelist to behave like linus explained,
essentially, it filters the layoutChanges of the model,
greps for trips, and for each trip that it finds, it set
the 'firstColumnSpanned' property, to make the column
to have the size of the whole table. e
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'qt-ui/models.cpp')
-rw-r--r-- | qt-ui/models.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 86773fd52..8575d6539 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -785,11 +785,8 @@ QVariant TripItem::data(int column, int role) const if (role == Qt::DisplayRole) { switch (column) { - case LOCATION: - ret = QString(trip->location); - break; - case DATE: - ret = QString(get_trip_date_string(trip->when, trip->nrdives)); + case NR: + ret = QString(trip->location) + QString(get_trip_date_string(trip->when, trip->nrdives)); break; } } |