aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2014-08-13Hide status message when an error message is presentGravatar Joseph W. Joshua
To avoid confusion, this code update makes the status text empty whenever there is an error message. This makes the error message more prominent. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Change Dive Computer Configuration dialogGravatar Joseph W. Joshua
Changes the layout of the ConfigureDiveComputer dialog to use a list of supported computers on the left, with a stacked widget showing the configurable details. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Start Work on Firmware UpdateGravatar Joseph W. Joshua
This patch implements the first step towards OSTC 3 firmware update. Its not much, just file selection, but I will build up on it from there. Implements a thread to initiate firmware updates. Currently, this is for the OSTC 3. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Add read/write support for OSTC 3 SetPoint settingsGravatar Joseph W. Joshua
Implements support for reading, writing and backup/restore of set point settings for the OSTC 3. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Add reading and writing of OSTC 3 Dil valuesGravatar Joseph W. Joshua
Implements reading, writing and backup/restore of OSTC 3 Dil Values (setting 0x15 to 0x19) Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Implement saving of OSTC3 Gas SettingsGravatar Joseph W. Joshua
Implements writing OSTC3 gas settings to the device. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Read OSTC3 GasSetting ValuesGravatar Joseph W. Joshua
Implements the reading of OSTC3 Gas Settings. These are settings 0x10 to 0x14 Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Move non gui code from qt-uiGravatar Joseph W. Joshua
Moves non gui classes (configuredivecomputer, configuredivecomputerthreads and devicedetails) from qt-ui to the top level folder. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Start working on GAS and DIL tablesGravatar Joseph W. Joshua
Start work for gas1-5 and dil1-5. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13THIS COMMIT NEEDS A COMMIT MESSAGEGravatar Joseph W. Joshua
I've moved the .pro file fixes to where it happened, so the rest of the changes need explanation now. -Thiago Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Add more OSTC 3 settingsGravatar Joseph W. Joshua
I am adding more OSTC 3 settings as I go along. Here, I have added dive mode and saturation. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Change ConfigureDiveComputerDialog to use tabbed interfaceGravatar Joseph W. Joshua
Changes the dive computer configuration dialog to use a tabbed interface. This will make it easier to add new dive computer models to the interface. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Add Support for more OSTC 3 SettingsGravatar Joseph W. Joshua
Adds support for more OSTC 3 Settings to the reading, writing, backup and restore functions. These settings are: last deco, units, sampling rate, salinity, dive mode colour and compass gain. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Working XML Backup and RestoreGravatar Joseph W. Joshua
The ConfigureDiveComputer class now has functions for complete XML backup and restore. These dump the loaded settings on a dive computer to an XML file, and there is an option to restore them. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Backup basic settings as XMLGravatar Joseph W. Joshua
This patch enables XML backup. We can now save the settings to an XML file. Currently this backs up just the basic stuff such as custom text, language and brightness. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Port writing of date and time to new classesGravatar Joseph W. Joshua
After splitting dive computer configuration classes, the date/time setting had not been ported. This adds the same to the classes. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13Polish up on classesGravatar Joseph W. Joshua
This patch polishes up on all classes added for dive computer configuration to give a clean workflow. The classes can now write and read data from the OSTC 3. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-11Rename dive gas function and defines for clarityGravatar Anton Lundin
This renames the dive gas functions to not talk about just nitrox, and to instead talk about gas. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11Rename the model column from NITROX to GASGravatar Anton Lundin
The column isn't just about NITROX, there might be air and trimix in there too. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11Rename list column from O2% to GasGravatar Anton Lundin
In the dive list, calling the column O2% is kinda wrong, because in at least my dive list there are both air and trimix showing up, so this renames that column to Gas. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11HTML: export Translated strings to JSON files.Gravatar Gehad elrobey
First step towards multilingual export. Use the existing translation API to translate and save words to JSON file. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11HTML: Don't export total statistics value if not chosenGravatar Gehad elrobey
Don't export total row in yearly statistics unless exporting the statistics is checked Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11HTML: Remember General Export Settings.Gravatar Gehad elrobey
Set Default values and remember user selected general HTML export settings. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11HTML: Add total row to yearly statistics table.Gravatar Gehad elrobey
Add new row to the yearly statistics table containing the total. Total values are calculated to some columns only, it doesn't make any sense to add the total value to other columns (Temperature cols for example). Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-11HTML: Make export statistics optional.Gravatar Gehad elrobey
Make exporting statistics to the HTML page optional. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-09Move divecomputer configuration code to different filesGravatar Joseph W. Joshua
This splits the code in configuredivecomputer.cpp into multiple files. The read and write threads are moved to configuredivecomputerthreads.h/cpp, and the device details class is moved to devicedetails.h/.cpp Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09Add brightness settingGravatar Joseph W. Joshua
Adds a setting to control the device's brightness. Currently I have only the OSTC 3. Will add more afterwards. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09Improve writing of device name to dive computers.Gravatar Joseph W. Joshua
Improves the writing of device name to the dive computer. The code has been updated to use a switch statement. This will make it easier to add new devices in the future. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09Improve writing of date and time to dive computerGravatar Joseph W. Joshua
Improves writing of date and time to the dive computer. This has been tested using the Heinrichs Weikamp OSTC-3. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09Change dive computer family detectionGravatar Joseph W. Joshua
Following suggestions on the mailing list, this changes the method used to detect the dive computer family. Detection is now done using: dc_device_get_type. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09Create class to write settings to dive computerGravatar Joseph W. Joshua
Adds a class to write settings to dive computer, and modifies the existing ones to integrate it. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09Read basic details from dive computerGravatar Joseph W. Joshua
Added classes for reading data from dive computer. This is at the basic level and I will expand it as I go along. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09Load vendor list and product listGravatar Joseph W. Joshua
Using code from 'downloadfromdivecomputer' class, this code loads the vendors and products to the respective comboboxes. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-09Create Dive Computer configuration dialogGravatar Joseph W. Joshua
Create a dialog for reading and writing settings to and from dive computers, with a menu entry in MainWindow to open the dialog. I will build up on this dialog and change it as needed. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-08Better User Agent for SubsurfaceGravatar Dirk Hohndel
This one is less verbose and very easy to parse. It's guaranteed to have five components, separated by ':' with no other ':' in the string: Subsurface:<version>:<PrettyOSName>:<appCpuArch[/osCpuArch]>:<UILang> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08Revert "Don't translate components of the version"Gravatar Dirk Hohndel
This reverts commit 6fdbf2069df4f238d7966fef67a31cee5c5eddbb. That was actually the wrong thing to do, now that I think about it. Instead we should show the translated version on screen and send a compact, easy to parse variation of this as the User-Agent header. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08Fix possible crash attempting network connectionGravatar Dirk Hohndel
If we didn't get back a JSON encoded string (i.e., if the response contained no '"') we would access a QList past its boundary. I'm somewhat hopeful that this is a last second fix for an annoying bug I've been trying to figure out for a while. See #514 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08Don't translate components of the versionGravatar Dirk Hohndel
When transmitting the Subsurface version string we always want to use the English terms, not the localized terms. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07Move the Trash bin to the topRight on the picturesGravatar Tomaz Canabrava
It was too easy to remove a picture by mistake, not anymore. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07Reload the dive list after accepting changesGravatar Dirk Hohndel
So far we only did it when we added a dive or modified a manually added dive. But the reality is that an edit of any dive could cause changes that require the dive list to be reloaded. Fixes #698 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Delete pictures from the Widget by pressing deleteGravatar Tomaz Canabrava
Select the picture, press delete, profit. [Dirk Hohndel: removed the stray hunk that snuck into this patch] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Show the cross hair only when planning or adding a diveGravatar Dirk Hohndel
In normal profile mode it's rather redundant and clatters the profile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Remove unused static functionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Fix order of initialization warningGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Make gas use statistics be coherent and more completeGravatar Linus Torvalds
The gas use logic in the dive statistics page is confused. The SAC case had a special case for "unknown", but only for the first gas. Other gases had the normal empty case. Also, the logic was really odd - if you had gases that weren't used (or pressures not known) intermixed with gases you *did* have pressure for, the statistics got really confused. The list of gases showed all gases that we know about during the dive, but then the gas use and SAC-rate lists wouldn't necessarily match, because the loops that computed those stopped after the first gas that didn't have any pressure change. To make things worse, the first cylinder was special-cased again, so it all lined up for the single-cylinder case. This makes all the cylinders act the same way, leaving unknown gas use (and thus SAC) just empty for that gas. It also fixes the SAC calculation case where we don't have real samples, and the profile is a fake profile - possibly with gas changes in between the fake points. We now make the SAC calculations match what we show - which is admittedly not at all necessarily what the dive was, but at least we're consistent. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Don't make the preferences dialog so hugeGravatar Dirk Hohndel
Let Qt figure out a good size instead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Don't show a SAC of 0.0l/min (or cuft/min)Gravatar Dirk Hohndel
When we have no data about the gas consumption it makes no sense to show a SAC of 0. Instead we should show either "unknown" or nothing. Fixes #693 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Don't list gases that weren't used in profile printGravatar Dirk Hohndel
If the divecomputer adds additional, unused cylinders to the dive, they would be listed in the profile based printouts. Given that the field is named "Gas used" that seems wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-06Don't zoom the profile when the left button is pressedGravatar Robert C. Helling
This prevents zooming out to more than max in the planner. Using a Mac MagicMouse it happens at times that the finger slides on the mouse while dragging a waypoint which can result in zooming out further than max. Fixes #695 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-05Data validationGravatar Dirk Hohndel
Instead of refusing cylinder pressure data let's just mark it as red when the values don't seem to make sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>