aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-11-14Fix memleak on Pixmap cacheGravatar Tomaz Canabrava
as we load dives and dives, new DiveEvents will be created but the transparent pixmap never deleted, also this makes the transparent pixmap only for the correct event, not for all of them. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14Don't show a pixmap for heading eventGravatar Dirk Hohndel
Some dive computers appear to have heading data in every sample. In order to avoid a completely cluttered dive profile we no longer show a flag for every heading event but instead show a basically transparent pixmap (which is invisible to the user) that allows us to report the heading information in the tooltip but leaves the profile uncluttered. Fixes #586 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14First stab at README and ReleaseNotes for 4.3Gravatar Dirk Hohndel
It's never too early to start... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14Add .txt as dive log fileGravatar Miika Turkia
Add the .txt to the list of all dive log files as this is the file we expect to be opened for Poseidon Mk6 log files. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-14Print: support margin saving for older Qt versionsGravatar Lubomir I. Ivanov
Seems like QMarginsF and QPageLayout were added quite recently - in Qt5.3! We attempt to support older versions by using something found in the Qt4.7 documentation. Patch also fixes small ordering issue where top / left margins were swapped. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Latest strings and translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Print: add the support to store margins and printer optionsGravatar Lubomir I. Ivanov
All the print options will be stored after the user closes or "cancels" the print dialog. There seems to be no good way to store the last selected page size, because print dialogs are different and some just list them as strings - A4, A3, etc. The patch also applies the following changes: - renames display.h's 'struct options' to 'struct print_options' as these were really just for the print dialog - the print_options dialog now stores more options as 'bool' - demote PrintDialog's 'printOptions' to 'private' Fixes #653 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Better menu entry for filterGravatar Dirk Hohndel
This is no longer just a tag filter. Also, since we use this entry (and its shortcut) like a toggle we should mark the menu entry accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13When closing filter dialog via menu / shortcut, also reset themGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13When closing the filter window also clear the filterGravatar Dirk Hohndel
The tooltip already pretended that that's what it did... Also make the tooltip wording consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Random whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Adjust the counter function for filter with "none of the above"Gravatar Dirk Hohndel
So this should count dives with neither buddy nor divemaster, without a location, with no tags, etc. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>