aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
AgeCommit message (Collapse)Author
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ý
2017-03-11Use 'Temp.' for abbreviations.Gravatar Martin Měřinský
2017-03-11Add tooltip for add cylinder button in plannerGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Make depth conversion work for negative depthsGravatar Robert C. Helling
This is needed in the altitude pressure conversion as there negative altitudes are possible (for diving in the netherlands or the Dead Sea). Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-03-11Disable minimum gas calculation for recreational modeGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-11Minimum gas calculation - Calculations and UI parametersGravatar Stefan Fuchs
Add minimum gas calculation to planner output. Add the two UI parameters prefs.sacfactor and prefs.problemsolvingtime. Connect UI signals and slots for recalculation of diveplan. Disable minimum gas calculation if there was already a warning before. If minimum gas result is larger then cylinder start pressure give warning message instead of result. Add line break before pO2 warnings but only if warnings exist. Signed-off-by: Joachim Ritter <jritter@bitsenke.de> Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-08Change calls to rint into lrint avoiding conversion warningsGravatar Jeremie Guichard
Using gcc option "-Wfloat-conversion" is useful to catch potential conversion errors (where lrint should be used). rint returns double and still raises the same warning, this is why this change updates all rint calls to lrint. In few places, where input type is a float, corresponding lrinf is used. Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2017-03-07For About UI window layout, use SetFixedSize.Gravatar Martin Měřinský
Window is resized according to its content. There is no need for user to resize this window.
2017-03-07Enable bottom pO2 option also for recreational dives in plannerGravatar Stefan Fuchs
Bottom pO2 gas option in planner should be always enabled because also recreational dives can use nitrox and produce "high pO2" warnings. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-03-06Printing: support the "Border width" setting for templatesGravatar Lubomir I. Ivanov
Going to "Template -> Edit" now has a field to enter the border width (in pixels as only that makes sense in CSS as a flexible unit, TMK). This field modifies the template_options.borderwidth Grantlee property which is part of the bundled templates already and allows the users to modify the borders of tables. The C++ implementation was missing, while the HTML (template) implementation was already in place. Overlooked during GSoC. Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-06fix: User survey UI.Gravatar Martin Měřinský
Enable window resize (Lay Out in a Grid). Center first label and it's text.
2017-03-04Get initial depth/duration correct when manually adding diveGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04Enable manual setting of durationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04Implement manual setting of depthGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04Initial response to entering duration or depthGravatar Dirk Hohndel
This marks the UI as modified and updates the maxdepth of the dive; it ignores changes to the duration, doesn't modify the profile, so it's nowhere near ready. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04For manually added dives, show depth and durationGravatar Dirk Hohndel
So far this is purely informational, you can't edit this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04Add depth and duration fields to maintabGravatar Dirk Hohndel
And hide them for now. This doesn't change anything visible, it's just putting in place the pieces for later use. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-04divecomputer > dive computerGravatar Martin Měřinský
2017-03-04cu ft > cuftGravatar Martin Měřinský
2017-03-04ppO2 > pO₂Gravatar Martin Měřinský
2017-03-04Correct "set-point" -> "setpoint" and window title setpoint changeGravatar Stefan Fuchs
Change 2x "set-point" to "setpoint". Correct window title for "Add setpoint change" window. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-02-25Add 4 file types op file-open logbook menu filter, consistencyGravatar Jan Mulder
4 file types (that are very rarely used), did showup in the import-import dive logs menu (e.g. the file filter), but were missing from file-open logbook file type filter. Just added them to the file-open part to be more consistent. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-02-25Correct file list in file-open filter boxGravatar Jan Mulder
Some missing ;; caused the filter on filetypes in open-open logbook to be garbled. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-02-24Bring back style sheet HTML for planner outputGravatar Dirk Hohndel
This is a partial revert of commit 4f2a7dc972cc ("Remove default stylesheet from planner output"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-23Menu keyboard shortcuts in translationsGravatar Robert C. Helling
It seems that in the .ui file, keyboard shortcut strings need the notr="true" attribute to make them appear also in translations. I found this on http://www.qtcentre.org/threads/62774-Translation-of-Shortcuts Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-21Translate names of additional dive events and nicer format info box textGravatar Stefan Fuchs
Enable translation for a few additional internal dive events. Ensure that all event names in datatrak.c are collected for translation. Ensure that for gaschange in profile info box the "cyl." string is also translated. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>