aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
AgeCommit message (Collapse)Author
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-05-01Picture feature: Improve UI and translation of shift image times...Gravatar Stefan Fuchs
... dialog (part 2) Show date/time of first/last selected dive instead of displayed_dive. Thats more useful to identify the right time offset for the images. Trigger first update of image info already in constructor of the dialog. Update the results and UI also when the "backwards" radio button is changed. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-30Picture feature: Improve UI and translation of shift image times dialogGravatar Stefan Fuchs
For the list of pictures with inappropriate date/time not fitting with the dive time use a QTextEdit in read only mode with scroll bars enabled instead of a QLabel. Also update and translate some strings used there. Signed-off-by: Stefan Fuchs <sfuchs@gmx.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-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-25OSTC3 incorrect notice to upgrade firmwareGravatar Jan Mulder
See https://github.com/Subsurface-divelog/subsurface/issues/342. The reason is that we never get a DC_EVENT_DEVINFO when doing a memory dump. Just do not offer to update firmware when we are creating a libdc dump. Full credits of this fix go to Anton. Fixed-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-23Translate string "cancel download" in DC download widget...Gravatar Stefan Fuchs
and change string "Retry" to "Retry download". Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-22Download from divecomputer: reset progress bar fractionGravatar Dirk Hohndel
Otherwise when retrying, the progress bar might already be reset, but its text might still show 100%. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22Download from divecomputer: don't show bogus progress textGravatar Dirk Hohndel
On some divecomputers we download all the data from the device and then parse the data afterwards just in memory (at which point the progress bar has already run all the way to 100%). So don't try to show the dive number and time in that case. Fixes #335 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22Download from divecomputer: stop timer on errorGravatar Dirk Hohndel
If we run into an error during the download, stop the timer that triggers the update to the progressbar. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-22Reduce default verbosityGravatar Dirk Hohndel
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-21After DC import don't do RemoveRows if there is nothing to removeGravatar Stefan Fuchs
This fixes an issue where beginRemoveRows is called with argument -1 in DiveImportedModel::setImportedDivesIndexes. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-20Do not abort when there is no current diveGravatar Jan Mulder
Yes, currentdive can be undefined in case of of a new logbook and starting the planner right away. Do not abort on that. Reported-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-20Preserve dive mode when planning a diveGravatar Jan Mulder
Data such as cilinders and used gasses are populated fromn the currently selected dive when starting the planner. It is more logical to use the dive mode (OC, CCR, pSCR) of the currently selected dive as well. This commits changes this. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-18More strict filter for URL handling in dive notesGravatar Stefan Fuchs
Applie a more strict filter to URL handling in dive notes: The URL needs to have: - Scheme like "http:" or "mailto:" - Host name like "www.test.de" or path like "/pathtosomewhere/" Otherwise strings like "OTU:" or "Runtime:" are treated as URL. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-18Fix a crash in the URL handling for the dive notesGravatar Stefan Fuchs
URLs in the dive notes are detected today. A tooltip is displayed and one can follow the URL by Ctrl-click. In the function fromCursorTilWhitespace there is an issue with incorrect return value of Qt (5.7?!) function cursor->movePosition(). This value is erroneous true in some condition e.g. if the cursor is inside a table at the very beginning or the very end of a table line and not moving any more. This can cause the function end up in an infinite loop. Bugfix adds an additional exit criteria for the loop if the string is not growing any more. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-18Fix a crash on exitGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-16Restore FB grayed out when disconnectedGravatar Jan Mulder
See https://github.com/Subsurface-divelog/subsurface/issues/253. The original behaviour (greyed out when disconnected) is restored. Not sure where and when got lost, but this simple change fixes it. Fixes #253 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
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>
2017-03-29UI: preferences-profile screen beautifyGravatar Jan Mulder
Stefan suggested "Maybe it would be nicer to move the 3 fields for the maximum pressure for N2, He, O2 for MOD to the right in the UI window exactly below the maximum field for the O2 (where we now have minimum + maximum)." And I agree, so this is the change. At the same time, reset the tab-order to a logical one. Reported-by: Stefan Fuchs <sfuchs@gmx.de> Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-28minimal pO2 threshold: split max threshold into min and maxGravatar Jan Mulder
Nothing really special here. Just a split of the only p02 max threshold into a min threshold and max threshold, and the adaptation of the UI. Change of translatable strings included. ref: https://github.com/Subsurface-divelog/subsurface/issues/259 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-26compile fixGravatar Jan Mulder
commit 597539ce39ab10 breaks my compile. Fixed here. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-26UI: typo fixGravatar Jan Mulder
Trivial typo fix, suggested in issue #274. Apnea is more common than Apnoea, and Apnea is also used in the code already, so, more common and more consistent. Hmm. A lot of text for a one letter fix. Close of issue suggested #274. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-26Fix issue 280: Facebook without a dive selectedGravatar Jan Mulder
Accessing Facebook stuff without a dive selected (as in an empty logbook) just SIGSEGVs. Just be more carefull. After this fix, it is still possible to upload an "empty dive" to FB. Ok, a little pointless, but a nice picture of the Subsurface logo is uploaded to FB. Consider it an easter egg :-) Fixes: #280 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-26QStyleOptionViewItemV4 is deprecated as of Qt 5.7Gravatar Jan Mulder
Trivial change to silence compiler waring about QStyleOptionViewItemV4 being deprecated. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-26Allow cylinder names to be editedGravatar Robert C. Helling
The same ComboBoxDelegate is used for picking a cylinder model and picking a gas in the planner waypoint table. In the former case we want to allow the user to edit the string in the second we don't. The difference is not if we are in the planner but which use of the class. So add a bool allowEdit to the constructor. Fixes #272 Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-03-24Fix double to int truncation in C++ codeGravatar Jeremie Guichard
Wfloat-conversion enabled for C++ part of the code Fix warnings raised by the flag using lrint Original issue reported on the mailing list: The ascent/descent rates are sometimes not what is expected. E.g. setting the ascent rate to 10m/min results in an actual ascent rate of 9m/min. This is due to truncating the ascent rate preference, then effectively rounding up the time to reach each stop to 2s intervals. The result being that setting the ascent rate to 10m/min results in 20s to ascend 3m (9m/min), when it should be exactly 18s. Reported-by: John Smith <noseygit@hotmail.com> Reported-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-18Prefix and suffix changes in preferences and planner preferencesGravatar Stefan Fuchs
In preferences->profile: Move "bar" from text description to entry field (5x) Move "l/min" from text description to entry field Add suffix "%" to GF values Rename VPM-B conservatism In planner preferences: Add prefix "+" to VPM-B conservatism Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-13Settings Graph is about dive Profile.Gravatar Martin Měřinský
2017-03-13Settings Defaults > GeneralGravatar Martin Měřinský
These are more general options, than default values.
2017-03-13Use GFLow, GFHigh (not GFlow, GF Low, GF low).Gravatar Martin Měřinský
2017-03-13Planner uses "Conservatism level", do the same for Settings.Gravatar Martin Měřinský
2017-03-13Remove unused DateWidget with its icon.Gravatar Martin Měřinský
2017-03-12templateedit.ui: give the layout for "Border width" unique nameGravatar Lubomir I. Ivanov
Warning introduced in e8c918622fb: desktop-widgets\templateedit.ui: Warning: The name 'horizontal Layout_3' (QHBoxLayout) is already in use, defaulting to 'horizontalLayout_31'. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> 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-03-11Merge branch 'master' of https://github.com/dje29/subsurfaceGravatar Dirk Hohndel
2017-03-11O2 > O₂Gravatar Martin Měřinský
2017-03-11We use 'setpoint' in UI. Use it also for documentation and comments. No ↵Gravatar Martin Měřinský
semantic change.
2017-03-11Use abbreviations with dots.Gravatar Martin Měřinský