aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-11-13Add a function to count dives with a specific suitGravatar Dirk Hohndel
Checking against the location field probably wasn't the best way to do this... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Fix use of QStringGravatar Tomaz Canabrava
We should use references when we are not wanting to make a copy of it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Fix QString useGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Suits Widget created and working.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13This is already checked in doFilterGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Create the doFilter for the Suits.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Suits filterRow method done.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Suits update method done.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Added skeleton of the Suits Filter.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Last one: Common 'data' method for StringList based Filters.Gravatar Tomaz Canabrava
This is the last of the series of Macros that I'll do to ease the creation of a QStringListModel based filter. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Call all common methods once per class in an easy way.Gravatar Tomaz Canabrava
New method to simplify the creation of 4 of the common methods for each filter in an easy way. There are a few other methods that I'm also thinking on how to do this. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Create a common macro for flagsGravatar Tomaz Canabrava
samething as the other commits, use common code. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Clear filter is always the same for a filter based on stringlistGravatar Tomaz Canabrava
So, let's always use the same codebasee Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13More cleanup using Macros.Gravatar Tomaz Canabrava
The setData of any filter based on a StringList with checkboxes should be the same, so let's use the same codebase for it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Create a CREATE_INSTANCE_METHOD macroGravatar Tomaz Canabrava
This is just to simplify the creation of more filters. more macros will be used, because I tend to abuse them. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Move the filters code to it's own file.Gravatar Tomaz Canabrava
We already have a bunch of filters, let's pack them together Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13windows.c: small cleaup in the wrapper functionsGravatar Lubomir I. Ivanov
- use an already defined 'ret' value if available - don't put free() calls in NULL check branches (saves a line) Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Add subsurface_access()Gravatar Lubomir I. Ivanov
For our usage the method will acept UTF-8 paths, which are converted to UTF-16 on Win32. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Show the number of dives with given person / location in the filter panelGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Update translations stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Support different salinity in plannerGravatar Anton Lundin
Depth is often mentioned in a length unit, but what we care about is pressure. When diving in fresh water the pressure is lower than the same depth in salt water. This adds support for using different salinities in planning. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12profile.c: fix a bug in calculate_gas_information_new()Gravatar Lubomir I. Ivanov
In a test case loading dives/test35.xml results in a infinite(-like) loop (Note: possibly requires the partial pressure plots enabled). calculate_gas_information_new() has an 'if' branch to update the cylinderindex to a dive's diluent_cylinder_index, but it does not consider that said index can be set previously to -1. This results in a random neighbour memory assigned as &dive->cylinder[-1].gasmix and passed to fill_pressures(..). Following the calculations in the function the He gas, can receive a bad value (e.g. for the test case in the E+6 ranges). Said value is then used in DivePlotDataModel()::pheMax() (defined by MAX_PPGAS_FUNC()) resulting in one of the loops (the 3rd one) in DiveCartesianAxis::updateTicks() to loop indefinitely. Fixes #759 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Shows an error about wrong permissionsGravatar Salvo 'LtWorf' Tomaselli
If an import fails, the permissions of the device are tested and an error message that mentions permissions is shown to the user. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Merge branch 'fixFilterSelection'Gravatar Dirk Hohndel
2014-11-12Deselect dives that are no longer shown as the dive list is filteredGravatar Dirk Hohndel
This cleans up the way we ensure that all dives are handled as the dive list is filtered. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Another update to strings and translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Fix typoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Latest strings and translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-12Update strings for Suunto safety levels.Gravatar Anton Lundin
By popular demand, this changes the names of the Suunto Safety levels. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Dive list and filter: when selecting a trip, only select visible divesGravatar Dirk Hohndel
Otherwise dives that aren't shown to the user would be included in statistics or (worse) in edit operations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Embed the information whether a dive is hidden by a filter in the diveGravatar Dirk Hohndel
This way other parts of the code can act on the "hidden_by_filter" state. This also cleans up the way we track if a dive is hidden - do it in the multi filter instead of the individual filters. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Clean FiltersGravatar Tomaz Canabrava
Code to clean the filters. Maybe I'll also need to call this upon closing the dialog? Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11A bit of code cleanup.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Make the close button workGravatar Tomaz Canabrava
clicking on the close button will close the widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Added buttons to control the multi filterGravatar Tomaz Canabrava
Buttons to close, minimize and clear were added. We need better icons. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Better size for the filterGravatar Tomaz Canabrava
a bit of extra spacing was necessary to get rid of the scrollbar. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Better layout for the Extra Info panelGravatar Tomaz Canabrava
The extra info didn't had a Layout set, this makes the design hard and not resizable. fixed by using a layout. I also changed a ScrollArea for a GroupBox, since the Model already has a ScrollArea. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11maintab.cpp: use copy_string() instead of strdup()Gravatar Lubomir I. Ivanov
The .location and .notes fields can end up being NULL, in which case copy_string() is safer. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Show the number of dives with each tag in the filter panelGravatar Dirk Hohndel
This is a rather brute force implementation. It might be worth while caching this information - but I'd like to do some benchmarking, first. Sadly this code also shows that there are some bugs hidden in the selection code when filtering is present. When a trip is selected all dives in the trip get selected, even those that are not visible under the current filter. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Add tag helper functions to allow us to count dives with a given tagGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Remove leftover code for directly parsing Cobalt tank sizesGravatar Dirk Hohndel
This should have been ripped out as part of commit 4be760463422 ("Use libdivecomputer tank size when available"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Fix getting tank information from libdivecomputerGravatar Dirk Hohndel
Silly type made us always get tank 0. So tanks 1 through n where wrong (and repeating tank 0 instead). Reported-by: Jef Driesen <jef@libdivecomputer.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Support timedepth mode on UDCF importGravatar Miika Turkia
Fixes #756 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Text consistency changesGravatar Tim Wootton
ppO2 represented with 2 as subscript. Special l symbol for litres. Capitalisation to bring in line with existing style. Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Two small fixes regarding translation textsGravatar Dirk Hohndel
Spelling fix for ampoea Remove bogus HTML string from UI file And fix the translation sources accordingly Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Update translation strings and translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Fix memory leakGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Use the new extra data interface for Poseidon importGravatar Miika Turkia
Rather than overflowing the notes field, let's add all the details from DC using the extra data API. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Replace XML reference log for PoseidonGravatar willem ferguson
The Poseidon xml dive log in the /dives folder is faulty. This patch replace it with a fully working one. Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-10Support for Liquivision version 2 log files.Gravatar John Van Ostrand
I was able to test against a v2.0 log file and fixed some problems. Also removed a file save that was being done for debug purposes. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>