summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets
AgeCommit message (Collapse)Author
2017-10-20Silence random warningsGravatar Dirk Hohndel
None of these seem to point to actual issues, so let's quiet them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-19Use displayed_dc instead of current_dcGravatar Robert C. Helling
current_dc is a macro that determines the dive computer based on the current dive number. When the planner is started from an emtpy dive list, the dive number ends up being -1 and that doesn't produce a valid dive computer. Use the divecomputer of the displayed_dive instead. This is done via a macro that can also be used in two other places. Without this patch, the planner crashed when called on an empty dive list. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-10-17Tags for geo references: Nicer look, translations and warning messageGravatar Stefan Fuchs
For the geo references tags update the following: - Nicer look w/o "Tags:" text and brackets when inside location UI - Translation for "Tags:" - Warning message when no dive site layout categories are set Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-07Disable editDiveSiteButton without dive site nameGravatar Dirk Hohndel
Entering a name first creates and hooks up a dive site which we can then use in the edit dive site dialog to store modifications. This doesn't really fix these two bugs, but it might impact whether they can still be recreated See #633 See #636 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-04Change the signature of constructLocationTagsGravatar Dirk Hohndel
We actually want to be able to pass a specific divesite structure and not have it look that up by uuid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-01Use helper function dive_endtime() where apropriateGravatar Stefan Fuchs
Calculating dive.when + dive.duration doesn't always give the correct endtime of a dive especially when a dive has surface interval(s) in the middle. Using the helper function dive_endtime() fixes this issue. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-09-04remove Marble from the source treeGravatar Lubomir I. Ivanov
In desktop-widgets, remove globe.cpp, globe.h and also remove the NO_MARBLE macro usage. At this point the MapWidget will always be created and there will always be a map in the application. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28maintab: use GlobeGPS / MapWidget abstractionGravatar Lubomir I. Ivanov
Based on NO_MARBLE, call the same methods in the two different classes. Later the dummy Marble GlobeGPS (for NO_MARBLE) should be removed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-12Fix slot handling in Photos tabGravatar Dirk Hohndel
This clearly has never been tested, never worked. Oh well. Fixes #478 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-11TabDiveInformation.cpp: use lrint() for sac.mliter in updateData()Gravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-26Creation of dive duration string and surface interval stringGravatar Stefan Fuchs
Update the function to create the dive duration string in a way that it can be used also in info and stats tab and added some more flexibility. Changed layout for <1h freedives to "0:05:35" (w/o units) or "5:35min" (with units and :) or "5min 35sec" (with units with space). Add a new function to create the surface interval string. Completely remove old function get_time_string() and get_time_string_s(). Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-06Save tags when manually adding diveGravatar Dirk Hohndel
Tags are handled differently from other fields, we need to call the special handling after the new dive was added and marked as the current dive. Fixes: #369 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-01Update translation and strings for gas usage in statsGravatar Stefan Fuchs
Giving the string " and " to transiflex seems to fail and/or it's highly possible that the translators make a mistake by translating it into "and" or " and" or "and ". Change the string to "and" and hard code the whitespaces before and after. Change O2 to O₂ in statistics. Translate "He" and "O2" in statistics. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-01Show min/max SAC in statistics only if different to average...Gravatar Stefan Fuchs
...and don't show a minimum depth in stats if there is only a single dive. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-01Change layout of information and statistics tab...Gravatar Stefan Fuchs
... to make it look more similar. This includes: - Same spacings between the boxes - Same way how to use the available space Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-29Add SPDX header to desktop widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-26Hide avg max depth thingieGravatar Anton Lundin
We don't set it so just hide it. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-26Always set min/max sac in statistics tabGravatar Anton Lundin
It just looks weird when they aren't set, just because you only selected one dive. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-26Rework statistics tab to use a grid layoutGravatar Anton Lundin
This makes everything line up better Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-26Fix saving table sizeGravatar Tomaz Canabrava
We need to make sure the model is avaliable for the table until it hits the destructor. Fixes #347 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-21Move extra info tab in main window to the very right side againGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-14Also translate tab headersGravatar Jan Mulder
After the restyle of the maintab code, the translation of some tab titles went missing. Corrected here. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-12Fix build against older Qt versionsGravatar Dirk Hohndel
While the new syntax is nicer and faster, this isn't supported prior to Qt 5.6 and we still support 5.5 on older OSs. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06Aparently, remove a QXB warning.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06Clean up some widgetsGravatar Tomaz Canabrava
Simplify logic of handling the Message that this dive is being modified. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06Break down MainTab into smaller classesGravatar Tomaz Canabrava
Maintab is one of our most complex classes, and it's something I'm not actually proud of. But it currently works and the idea of splitting it was in my head for quite a while. This is the third or fourth tentative of splitting it, and this time I let the most complex part of it untouched, the Notes and Equipment tab are way too complex to untangle right now on my limited time. A new class 'TabBase' should be used for any new tab that we may create, and added on the MainTab (see the new lines on the MainTab constructor). Also, Extra Info, Information, Photos and Statistics where ported to this new way helping reduce the number of lines and functions on the MainTab quite a bit. Overall this is a step in the right direction for the future. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>