aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/divelistview.cpp
AgeCommit message (Collapse)Author
2017-10-26Divelistview: use report_error to report and errorGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-23Fix broken multi selected dive to tripGravatar Jan Mulder
See referenced issue number. It leads back to an ancient (3 year old) commit 512c42e. Not sure this issue is introduced there, but that's not relevant. Key in reproducing this is the location where the context menu is requested (using the right mouse button). When it is the row next to the trip, the add-to-trip succeeds correctly, otherwise it is a no-op. The solution is rather trivial (in hindsight). Just loop over the selected dives, and try to find the trip we want to add to. Fixes: #522 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-03dive-list: maintain a single instance of DiveTripModelGravatar Lubomir I. Ivanov
A weird crash occurs if DiveListView creates another local instance of DiveTripModel inside reload(). Re-use the member variable tripModel and assign it a new instance of DiveTripModel. Reported-by: Gaetan Bisson <bisson@archlinux.org> Tested-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
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-05-06File selector should filter images we can actually handle.Gravatar Robert C. Helling
So better ask Qt about image formats known to it. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-04-29Fix call to tr in order to create translation stringsGravatar Dirk Hohndel
Fixes #365 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29Add SPDX header to desktop widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-11Silence warning about unused parameterGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-28Ignore double clicks on the divelistGravatar Joakim Bygdell
Fixes #170 on GitHub Simple catch function for double click events in the divelist, prevents users from trying to edit the divenumber ithe wrong way. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-12Images from web currently only works for single picturesGravatar Robert C. Helling
so we should not suggest otherwise by plural form. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-11Provide an error message when downloadig image from web fails.Gravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-11-24Provide phots summary on dive list (Part 2)Gravatar Willem Ferguson
Please apply this patch on top of the previous patch with the same title. 1) Provide icons with white margin to look more like photos 2) Optimise code, following Robert's suggestions. 3) Column heading for photos column is now: Photos. This takes up extra horizontal space but makes the user interface more understandable. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> 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-08-27Settings update: Some code cleanupGravatar Tomaz Canabrava
The only block of code that I removed here is because the QSettings preferences that is being read is the exact one that we populate on the prefs. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> 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>
2016-03-09Silence warnings in divelistview.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-30Move qt-ui to desktop-widgetsGravatar Tomaz Canabrava
Since we have now destkop and mobile versions, 'qt-ui' was a very poor name choice for a folder that contains only destkop-enabled widgets. Also, move the graphicsview-common.h/cpp to subsurface-core because it doesn't depend on qgraphicsview, it merely implements all the colors that we use throughout Subsurface, and we will use colors on both desktop and mobile versions Same thing applies for metrics.h/cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>