summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2014-10-30Revert "Divelist: make the column headers for units left aligned"Gravatar Dirk Hohndel
This reverts commit d5f19c43c925468f363f0e509816df724f930db9. With the changes to the headers in commit 3515ad71c159 ("Divelist: remove units from header, add tooltip") I think this isn't needed anymore and actually reverting it creates a cleaner look. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-30Display dive duration in dive list in whole minutesGravatar Linus Torvalds
The whole "duration in seconds" is being way too OCD about the information, and just makes it harder to read. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-30Added close button to print preview window title bar.Gravatar John Van Ostrand
Without this I was only able to close it by choosing to print. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-30Remove debug output in preference settingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-30Divelist: remove units from header, add tooltipGravatar Dirk Hohndel
This should help with the issues we are having with alignment / visibility of the relevant information in the divelist. Most people will never switch the units (or maybe switch them once, the first time they use Subsurface). So having the units shown in the table header quickly becomes redundant - yet having the units in there causes all kinds of layout issues. This patch adds a tooltip to both the header and the main data area of the divelist. The tooltip shows the column name plus unit and the column header no longer shows the units. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-29Allow the user to switch to a gas in a specific tankGravatar Dirk Hohndel
When entering a gas switch manually, explicitly show the different tanks that are available and correctly switch between different tanks with the same gas. See #702 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-29Divelist: make the column headers for units left alignedGravatar Lubomir I. Ivanov
Fixes #739 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-28Explicit first gas only on first sampleGravatar Dirk Hohndel
Instead of the 30 second heuristic we only assume that this is an explicit first gas if the event coincides the first sample. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-28Fixed RegExp bugGravatar John Van Ostrand
This prevented import of log files other than CSV and TXT. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-28Added Cochran CAN files to the Open Logbook dialogGravatar John Van Ostrand
Subsurface can now open CAN files as an alternative to importing. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-28Improve tank handling for CobaltGravatar Dirk Hohndel
This isn't Cobalt specific, this is specific to dive computers that indicate the first tank that's in use with a gaschange event that coincides with the first sample. We need to make sure that we suppress showing that gas change event (regardless which cylinder it goes to) and instead set the correct cylinder index from the very start of the dive. This works with the test data I have and doesn't seem to break thing with any of the files that I tried... but I'm worried that this is not the right way to do things. Fixes #742 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-28dive.h: add a variant of FOR_EACH_PICTUREGravatar Lubomir I. Ivanov
This prevents a warning caused by -Waddress, that the address of 'displayed_dive' will always be defined. Exact macro variant suggested by Dirk. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-28Parse meta information from Seaber logGravatar Miika Turkia
This will parse date information from Seabear log file and skips the "header" data to allow parsing of the CSV content. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Create a delegate for depth and gas componentsGravatar Anton Lundin
This creates a delegate to simplify the handling of gas components and the change depth. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Create a delegate for gas type columnsGravatar Anton Lundin
This creates a delegate for the type column to choose the type value for gases that is less confusing then the raw value. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Finished Cochran dive log importGravatar John Van Ostrand
I fixed up the decode and finished the parse for Cochran EMC, Commander and Gemini computers. I suspect that this code may only work with files from certain versions of Cochran Analyst. It works with my own CAN files and with the samples that came with Analyst v4.01v. A seemingly arbitrary offset of 0x4914 is needed to access data. The previous code uses 0x4a14 and 0x4b14. I suspect these are from different version of Analyst. [Dirk Hohndel: whitespace cleanup, add files to subsurface.pro, made sure this compiles without the corresponding patch to libdivecomputer (that isn't upstream, yet), cleaned up the usage of structs, removed a few unused variables] Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Change the salinity setting for OSTCGravatar Anton Lundin
On the OSTC's the salinity is in kg/l and is stored as kg/l * 100 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Change the OSTC3 copied ui to be sane for OSTCGravatar Anton Lundin
The OSTC supports a bit different functionalities than the OSTC3 does. The "unsupported" bits are setBrightness setCalibrationGas setCompassGain setDiveMode - Bult into setDecoType (OC/CCR) setDiveModeColor - Lots of different colors setFlipScreen setLanguage - Controlled via flashing different firmwares setPressureSensorOffset setUnits setSetPointFallback setCcrMode - there are some ppO2 reading functionality in the fist gen OSTC that we don't care about, and the rest is controlled via choosing a CCR deco algorithm Also the OSTC have a notion of number of dives it has done, so this adds ui for that value. There are also differences in how some values are handled. Ex the OSTC don't have fixed samplerates that you can choose between. You can rather just set your sample rate to X seconds. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Copy the configure OSTC3 ui to the OSTC UIGravatar Anton Lundin
Just renumber the ui components. _3 for OSTC. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Compare image times and sample times as signed intsGravatar Robert C. Helling
The problem that we were comparing signed and unsigned ints was originally found by Lubomir. As image times can be negative (and the comparison should fail in that case) we need to compared them as signed. Signed-off-by: Robert C. Helling <helling@atdotde.de> Acked-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Add a icon to the OSTC, Mk.2/2N config lineGravatar Anton Lundin
The icon comes from heinrichsweikamp.com, the same as the ostc3.png did. I've emailed with Matthias Heinrichs at HW and they have given us permission to use both the ostc3.png and ostc2n.png under the GPL v2. They also can provide the hi-res originals if anyone needs to do more work on these icons. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Remove now obsolete forward declarationGravatar Anton Lundin
We now include the Ui header file, so we can remove the forward declaration. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Set a max value for the custom text in OSTC3Gravatar Anton Lundin
The device supports a up to 60 chars custom text. This limits the LineEdit to that amount, so users see when they reach the max limit. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Add a shortcut to Configure dive computer dialogGravatar Anton Lundin
This adds a shortcut, Ctrl+Shift+C to jump into the Configure dive computer dialog. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Correctly save a re-planned diveGravatar Dirk Hohndel
In commit a85a219df325 ("Add ability to replan a dive that we planned before") I completely mishandled the saving of the replanned data. How embarrassing. Fixes #747 See #527 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27divelistview.cpp: move a variable in a Q_OS_MAC branchGravatar Lubomir I. Ivanov
Not used on other OS and triggers a warning. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27divelogexportdialog.cpp: fix a 'uninitialized variable' warningGravatar Lubomir I. Ivanov
DiveLogExportDialog::export_depths() We set a default value of 'unit' which will silence the warning itself. Then hope that the compiler will respect the argument order i.e. call get_depth_units() (which sets 'unit') before using *unit as the last argument passsed to put_format(). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27globe.cpp: fix a NO_MARBLE warningGravatar Lubomir I. Ivanov
Make eventFilter() return a value for NO_MARBLE. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27configuredivecomputerdialog.ui: fix a UIC warningGravatar Lubomir I. Ivanov
"gridLayout_1" is used twice. Re-order the grid layouts as 1, 2, 3. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27MainWindow: prevent a possible crash on "re-plan"Gravatar Lubomir I. Ivanov
MainWindow::on_actionReplanDive_triggered(): If a dive in the divelist does not have a "DC Model" for some reason, selecting "re-plan" from the menu will pass a NULL value current_dive->dc.model to strcmp() and break before the debug output. To fix that we check if the said .model value is NULL. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-26Support for importing Poseidon MK6 logsGravatar Miika Turkia
This patch adds support for importing the logs from a Poseidon MK6 rebreather. This DC produces logs that contain of a .txt file that has all the meta data and a .csv file that contains the sample readings. The CSV file is different from the others in that it has a line per each sample reading at given time. Thus we have to merge all the lines from one point in time into one sample reading of ours. [Dirk Hohndel: addressed some compiler warnings] Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-21Correctly place the first gas label in drop to bottom modeGravatar Dirk Hohndel
When dropping to the bottom in plan (and add) mode, the gas label was placed along the diagonal line from (0,0) to the second dive data point (i.e. the one at the end of the "at deptch" segment). That looks terrible, the label needs to be along the segment that we are spending at the bottom. This patch fixes that problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Configure support for OSTC, Mk.2/2N/2CGravatar Anton Lundin
First out is firmware updates. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Add a icon for the Suunto Vyper Family config pageGravatar Anton Lundin
This adds a icon to the Vyper config page. The image is taken by me of my Suunto Vyper. Thats the reason for the quality. Question: Would it be ok to grab a PR image from Suunto's web page to use here? If so they got better ones... Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Style cleanupGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Disable update firmware button for OSTC3 for nowGravatar Anton Lundin
We currently don't support update firmware for the OSTC3. Where waiting for support in libdivecomputer for that, so disable that button for now. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Fix spelling in configure dive computer tool tipsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20HTML: Export unit preferences to settings fileGravatar Gehad elrobey
Working on HTML exports to support imperial and metric units and also custom selected units based on subsurface preferences. User selected units is exported to settings file that will be mainly used by listlib javascript file. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Recalculate the decompression if the date / time of a dive changesGravatar Dirk Hohndel
The pre-existing tissue load going into a dive can change if the start time of a dive changes. Therefore we need to recalculate the ceiling when editing start time (or date) of a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Correctly edit dive date/time when editing manually entered divesGravatar Dirk Hohndel
While the existing code worked fine for editing that start date or time of dives downloaded from a dive computer or imported from some other source, for manually entered dives this did not work and the date or time was always reset to the original time once the changes were saved. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19TableView: fix button sizingGravatar Giuseppe Bilotta
Ensure that there is no (clipped) overflowfrom the header. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Fix tableview marginsGravatar Giuseppe Bilotta
The previous hard-coded solution for GTK+ didn't work on HiDPI, and a comment hinted that even on Mac OS X it might need tuning. Find a more generic solution that should work regardless of platform and style, based purely on the geometries reported by the style itself. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Resolution-independent trash iconGravatar Giuseppe Bilotta
Also, generate the corresponding pixmap only once, and distribute it to all models that need it. Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Resolution-indepent dive picturesGravatar Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Resolution-independent DiveEventItem icon sizesGravatar Giuseppe Bilotta
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-19Make planner work again for CCR divesGravatar Robert C. Helling
The latest CCR patches had rendered the planner not usable for CCR dives. This patch corrects this (and reenables the CCR set point column for segments). The problem was that a new member setpoint of struct divepoint had been introduced, but there was already po2 which had the same meaning. This patch merges the two and renames them setpoint to prevent future confusion. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Add support to reset OSTC3 settings to defaultGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Wire up more settings in the OSTC3 settingsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Add a more settings to the OSTC3 settingsGravatar Anton Lundin
This adds the settings not previously available in the OSTC3 settings. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Create a Advanced settings page for OSTC3Gravatar Anton Lundin
This creates a Advanced settings page for the OSTC3 and moves the deco settings off to that page. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>