aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/divetripmodel.h
AgeCommit message (Collapse)Author
2017-10-09Display units in dive list table based on prefs optionGravatar Stefan Fuchs
Add a preferences option which enables or disables display of units in the main dive liste table. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-03divelist: prevent a crash for missing column widthGravatar Lubomir I. Ivanov
The `static int defaultWidth[]` definition in divelistview.cpp could potentially end up missing an element which can later result in out-of-bounds access when iterating through the list of columns and updating their widths. Add a couple of methods in DiveTripModel for setting and getting the widths and use those. The default values are now pre-set in a QVector in the DiveTripModel() constructor. Throw warnings if out-of-bounds columns are requested. Reported-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-02[Divesite] Hook qt model for countryGravatar Tomaz Canabrava
See #144 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29Add SPDX header to Qt modelsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-11-24Provide photos summary on dive listGravatar Willem Ferguson
1) Add an extra column to dive list, just left of Locality field. 2) For each dive, give summary of photos as follows: i) no photos: no icon in that column ii) photos taken during dive: show icon of fish iii) photos taken before/after dive: show icon of sun iv) photos taken during as well as before/after dive: show icon with both fish and sun 3) Provide information for the sort operation to work on this column of the dive list. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04Move subsurface-core to core and qt-mobile to mobile-widgetsGravatar Dirk Hohndel
Having subsurface-core as a directory name really messes with autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an autocomplete conflict and also was inconsistent with the desktop-widget name for the directory containing the "other" UI. And while cleaning up the resulting change in the path name for include files, I decided to clean up those even more to make them consistent overall. This could have been handled in more commits, but since this requires a make clean before the build, it seemed more sensible to do it all in one. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-23Add missing tr() implementationsGravatar Jan Mulder
One specific string did not translate. First, Dirk and I (via IRC) suspected a leading space was the issue (see commit eccac1321f512d8). However, I found out that the problem was still there. A non translated string "%1 shown", when applying a filter on the divelist, and looking at a trip line. It shows always untranslated "%1 shown". Extracting to-be-translated strings from the code, I found 2 errors: Class <classname> lacks Q_OBJECT macro. This patch adds a missing tr() definition and implementation to 2 structs. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DiveTripModel to qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>