aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/configuredivecomputerdialog.cpp
AgeCommit message (Collapse)Author
2018-06-04Cleanup: fold core/helpers.h into core/qthelper.hGravatar Berthold Stoeger
helpers.h included qthelper.h and all functions declared in helpers.h were defined in qthelper.h. Therefore fold the former into the latter, since the split seems completely arbitrary. While doing so, change the return-type of get_dc_nichname from "const QString" to "QString". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-21desktop-widgets: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-04-27Configure ostc3: Remove obsoleted settingGravatar Anton Lundin
In firmware version 2.97 the setting 0x38, SETPOINT FALLBACK, has bin obsoleted and we get a error when trying to write to it. This removes this setting. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-03-14Cleanup: introduce copy_qstring() functionGravatar Berthold Stoeger
strdup(qPrintable(s)) and copy_string(qPrintable(s)) were such common occurrences that they seem worthy of a short helper-function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-03-14Cleanup: consistently use qPrintable()Gravatar Berthold Stoeger
Replace constructs of the kind s.toUtf8().data(), s.toUtf8().constData(), s.toLocal8Bit().data(), s.toLocal8Bit.constData() or qUtf8Printable(s) by qPrintable(s). This is concise, consistent and - in principle - more performant than the .data() versions. Sadly, owing to a suboptimal implementation, qPrintable(s) currently is a pessimization compared to s.toUtf8().data(). A fix is scheduled for new Qt versions: https://codereview.qt-project.org/#/c/221331/ Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-03-05Configure DC dialog: Always correctly set update firmware buttonGravatar Stefan Fuchs
Always set the update firmware button correctly based on DC model. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-05Configure DC dialog: Add a few missing translationsGravatar Stefan Fuchs
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-05Configure DC dialog: Change order of DCs and correct namesGravatar Stefan Fuchs
In the configure dive computer dialog change the order of the DCs (all HW first, then Suunto) and correct the names of some HW DCs (make them the same as in the "download from DC selection list"). Plus added the OSTC Plus to the list of supported DC. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-04Correctly spell OSTC cRGravatar Stefan Fuchs
Correctly spell OSTC cR (wrong: "Cr") in two files. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-24Fix build without BT supportGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-11-13Make Bluetooth naming consistentGravatar Berthold Stoeger
Currently, on Linux, after selecting a Bluetooth device the name of the device is shown. On reopening the download dialog, on the other hand, the address is shown. In the device selection dialog both are shown. This patch changes the download dialog such that both, name and address, are shown. The bulk of the patch introduces the name of the device in the preferences and DCDeviceData. It has to be noted that DCDeviceData is an encapsulation of the libdivecomputer device_data_t. Nevertheless, the new Bluetooth-name field is, at the moment, not passed through to libdivecomputer. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-11-04Correct, cleanup, translate and unify file filtersGravatar Stefan Fuchs
Correct spelling and typos in file filters. Unify and translate file filter names. Don't pass a file filter to a directory open dialog - not needed. Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-11-04Replace QMap::operator[] with QMap::value()Gravatar Berthold Stoeger
QMap::operator[] creates a new default constructed entry in the map if no entry with the given key exists. While not problematic (since typically nullptrs are inserted) this is usually not what you want for read access. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2017-08-01Configure ostc4: Wire up reset buttonGravatar Anton Lundin
I previously forgot to enable the reset button. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-06-21Remove old duplicated codeGravatar Anton Lundin
Way back in time this code was copied from downloadfromdcthread, so de-duplicate and call that code instead. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-06-16code cleanup: remove 2 unused structsGravatar Jan Mulder
Luckily these 2 structs in this ugly code are not used. Remove them. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-04Implement OSTC4 specific settingsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-05-04Connect up all the OSTC4 common settingsGravatar Anton Lundin
Connect up all the settings that are the same, and remove those who are not, and correct those who only are minor differences. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-05-04Start to read/write and present some OSTC4 settingsGravatar Anton Lundin
This is mostly copy-paste from the ostc3 case, but there are some minor differences. Some minor things have different meaning, and there's a slightly different command set, but I couldn't figure out a sane way of joining them. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-05-04Wire up a skeleton for configure OSTC 4Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-05-04Build a gui for configure OSTC 4Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-04-29Add SPDX header to desktop widgetsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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-11We use 'setpoint' in UI. Use it also for documentation and comments. No ↵Gravatar Martin Měřinský
semantic change.
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-04divecomputer > dive computerGravatar Martin Měřinský
2017-01-12Notify Ostc 4 users about new firmwaresGravatar Anton Lundin
This adds support for notifying Ostc 4 users about new firmwares when they download dives from their computers, gives them the option to trigger the upgrade flow. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2016-12-28Document quirks with Ostc 4 versionsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28Notify all OSTC users about bluetooth prepGravatar Anton Lundin
Use more general wording about bluetooth preparations, because nowadays there are more computers than the Ostc Sport which use bluetooth. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28Check for firmware updates on new devices toGravatar Anton Lundin
The list of OSTC devices have grown, and this updates our lists of for which devices we should check for firmware updates. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Add "Dive Computer" settings to SettingsObjectWrapperGravatar Tomaz Canabrava
For some reason, the dive computer settings weren't in the settings prefs. This moves it, makes the boilerplate on Settings ObjectWrapper and make things compile. 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-23typo fixGravatar Werner Macho
small typo fix for GUI Signed-off-by: Werner Macho <werner.macho@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22configure OSTC/OSTC3: Bugfix depth parameter unitGravatar Anton Lundin
The unit for the depth parameters ain't meters, its 0.1 meters. This caused the values stored to be out of range. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09Silence warnings in configuredivecomputerdialog.cppGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22configure OSTC/OSTC3: Add safety stop parametersGravatar Anton Lundin
This adds the configure parameters for safety stops on the hwOS(OSTC3) and OSTC computers. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22configure OSTC3: Add temperature sensor offsetGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> 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>