After we created a QString from it, we need to free the char*.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As per the suggestion by Dirk Hohndel, I changed the "Type of Diver" from
RadioButton to Checkbox.
The User Survey UI was not clear earlier, so I grouped the similar options under
a question. I also modified the language and re-arranged the visual components.
Earlier, the user could choose contradicting import types at once. This has beencorrected by using RadioButtons instead of CheckBoxes.
Signed-off-by : Nikhil Bharadwaj Gosala <nikhil.gosala@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The UI in the User Survey page was not clear and the Text Blocks were getting
cut. So I increased the size of the Text Blocks.
Also the survey was using CheckBoxes instead of RadioButtons. The problem with
this is that the user could choose to be both Recreational and Technical diver
which cannot be possible. So I replaced the CheckBoxes with RadioButtons.
I also replaced the CheckBoxes, which asked the user from where he was importing data, with RadioButtons so that the user can select only one option.
I also modified the English used and made it concise and clear.
Signed-off by : Nikhil Bharadwaj Gosala <nikhil.gosala@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Earlier, there was no option for the user to explicitly open the User
Survey form. This has been corrected by placing an option in the "Help"
menu by which the user can explicity open the User Survey form.
Signed-off-by: Nikhil Bharadwaj Gosala <nikhil.gosala@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since replotting is expensive and it is triggered while scrolling
through the list of cylinders, better not do it for improved
user experience and replot only after the combo box loses
focus.
I hope this...
Fixes#768
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
<marble/MarbleDebug.h> is not availaible in all Marble versions.
As Marble::MarbleDebug::setEnabled(verbose) is only used when
MARBLE_SUBSURFACE_BRANCH is defined, also include header file only when
MARBLE_SUBSURFACE_BRANCH is set.
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Manually inserting set-point changes at negative times (left
of the profile) caused the setpoint to end up at stupid values
(probably some signed/unsigned confusion). This patch aligns
them with the start of the dive.
Fixes#774
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Calling Subsurface with -v now gets you debug output. Of course, with a
regular "release" build of Marble you still won't see much. But with the
changes in the special Subsurface-testing branch you actually get some
very useful information when debugging a lack of maps in Marble.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Depending on the options shown, the latest change appears to have moved
the temperature graph a bit too low. This seems to work better in my
experiments.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This micro patch adds the ability to sort the lists alphabetically
for user interaction. Dirk asked me to do this for location, but
this actually changes for location, divemaster, buddy and suit.
Seems a good thing for all.
Fixes#780
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When opening the filter dialog we allow the user to filter the choices
that are shown. The text that they enter in that filter for filter
criteria should be treated as case insensitive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
No idea why this code was there... but what it caused was an invalid
access to checkState[-1] when a dive had that first tag. This explains why
sometimes the dives that had that tag were shown, regardless of whether
the selected filter criteria should have excluded them or not.
Fixes#769
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The successful message was emitted in a some what older way then the
other messages so it was always emitted, even on error.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This changes the code so we include all the cylinders from a previous
dive when we re-plain a dive.
Otherwise we would have a hole in the cylinders table when we plan a
dive based on a dive where we have unused cylinders, and it makes more
sense to copy all of them rather than not.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A profiler session in the planner shows that for deep long dives
a significant amount of CPU time is spent in populate_pressure_information()
which interpolates the cylinder pressure graphs.
This patch introduces a "fast" flag for the replot of the profile
which is active while the mouse button is still pressed and that
suppresses this calculation.
In the future, this flag could be used for other responsiveness tunings
of the plot.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds a context menu entry to add a setpoint change
event. In particular, this can be used to turn a logged dive into
a CCR dive.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This allows more space between the input fields in the dialog.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Date and duration formats are not necessarily self explanatory so adding
tooltips to explain the expected format.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For each polygon that we paint we have to step through the
plot_info from the start again.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Before you could 'Cancel' the edit and then would be asked if you wanted
to 'Discard' your changes or 'Cancel'. So clicking 'Cancel' cancelled the
action of having clicked 'Cancel'. That's so confusing, it's even hard to
explain. Yes, it uses "typical" language for user interaction and kind of
makes sense, but it's not easy to understand for the non-technical user.
With the new labels the user is asked to whether they want to 'Apply' the
changes or 'Discard' them. And when they choose 'Discard' the verification
question is still 'Discard' or 'Cancel'. That seems much more consistent.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If not cylinder with type DILUENT or OXYGEN is defined, this function
returns -1 which should not be used as an index to an array. This
patch adds code to check for this return value and exit gracefully.
On line I marked with a comment. Someone more knowledgeable of that part of
code than me should double check that return is here what we want.
[Dirk Hohndel: fixed small oversight...]
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Clearly the static dialogs don't work. Even with the previous commit the
dialog still said "Save" insted of "Open". So let's just assemble our own
dialog and be done with it. I hope I got all the options right...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Using the SaveFile dialog to open a file caused it to ask the user if they
wanted to overwrite a file when they actually tried to open an existing
file. This fixes that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way we can specify file names that don't exist and therefore make our
git syntax (/path/to/dir[branch]) work.
Thanks to Tomaz for pointing this out.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added a title bar with close button.
Set an appropriate title.
Centred the window relative to mainwindow.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This code sets up the UI that will allow the user to adjust tank pressures
at a gaschange event. The actual changing of the pressure is not
implemented, yet, so this is disabled until someone finds time to do so.
The scenario is this: a tec diver or sidemount diver without pressure
sensors on at least one of their tanks still wants to reasonably
accurately track gas consumption during a dive. The diver takes notes of
the pressures at every tank switch (I find that odd, but apparently some
cave divers indeed do that as they switch back and forth between different
gases) and then wants to adjust the pressures in Subsurface to match those
written down.
One difficulty here is that the first and last pressure of a tank with no
sensor data is still considered "sensor pressure" - this is basically an
implementation detail in the code that is used to do the pressure
interpolation to have constant-SAC pressure plots for tanks without
sensors. So when we check if there is indeed no pressure data available at
the gas change, we can't just work with the interpolated pressure - if
this is the first (or last) time the tank was used, that pressure may be
marked as sensor pressure.
What's missing is the UI to enter the desired new pressure plus the black
magic that actually inserts this into the dive in a way that doesn't break
the assumptions in the rest of the code. I'm running out of time to do
that but wanted to preserve this code so someone can continue this later.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We had the variable. As a pointer. Which we used memset to clear. Ouch -
that smells like some bad cut and paste.
With this change the object keeps the corresponding plotInfo around (just
like some others do) and can use it later. I suspect this code could use
some larger cleanup, but it's a bit too late for this in the development
cycle, I guess. I'm sure I'll regret this in the future...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In the context menu of the profile it makes no sense to offer the ability
to switch gases unless there is a gas to switch to.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The only place where I'm not sure if there are unintended sideeffects of
changing over to the new domain is QCoreApplication::setOrganizationDomain
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Qt by default uses a rather simplistic text heuristic to figure out if a
menu entry is one of the special ones that need to be moved into the
application menu (About, Preferences, Quit - but for Preferences anything
that matches settings, options, config is used as well).
This patch tells Qt to keep its hands off the the DC configuration entry
in the menu.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
RulerNodeItem2::recalculate() does something which is
apparently not a good idea in combination with
RulerNodeItem2::mouseMoveEvent().
Each time the mouse moves, setPos() is called. Then in
recalculate() the x() value is checked and if less than 0
it's changed to x = 0 (setPos(0, y());).
This last call (setPos(0, y());)
however does not work and the value remains less than zero
leaving one of the ruler points outside of the graph.
To solve the issue we add a silly explicit check if x() < 0
before calling setPos() in RulerNodeItem2::mouseMoveEvent().
The 'x() > timeAxis->posAtValue(data->sec)' strangely works
on the other hand.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Extend the tooltips to be shown both on the labels and the values and add
tooltips for all min/avg/max elements.
To avoid confusion when only one dive is selected, no longer show min SAC
or max SAC or min duration or max duration.
Fixes#694
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the unused upper widget, set a somewhat random but at least more
reasonable default size and finally support Ctrl-W and Ctrl-Q shortcuts.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also fixes a bug in the diluent pressure interpolation
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Maybe it would be better to just copy the whole structure and then clear
the things we don't want to copy? This seems fragile.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We copied the string pointers instead of copying the strings. Once those
got freed, things went downhill.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
--047d7b8737f87ede8e050803e6b2
Content-Type: text/plain; charset=UTF-8
<div dir="ltr"><br></div>
From 3db4a422485374801ca2f6233ec23b8671a8656d Mon Sep 17 00:00:00 2001
From: Tomaz Canabrava <tomaz.canabrava@intel.com>
Date: Sun, 16 Nov 2014 23:22:58 -0200
Subject: [PATCH] fix 727 - position correctly the popup.
When the user entered a tag and that made the message box display
the popup with the possible choices was still in the old position
hidding the line edit.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The MultiFilter itself should walk the dives in a trip. This way the logic
(OR within a category, but AND between categories) is correctly applied
and the flags in the dives are set correctly (which makes the overall
counts for dives filtered work correctly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This makes the text easier to translate (and more meaningful).
Also modifies its position to be centereed in order to look less "squeezed
into the corner".
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
But the filter count seems to be broken for some reason and
I really don't know why. It seems to work for tags, but
not for everything else.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
And added a missing liquivision item in file open dialog.
Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Try really hard to ensure there remains a valid selection. Only if none of
the dives are selectable should we give up.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we end up trying to restore the selection where the selected dive is no
longer visible (i.e., it's now filtered away), this code caused a crash by
falling first() on an empty list. Let's not do that.
Fixes#758
c++ have some idea about in what order things should be initialized.
This makes us comply with that order.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The buddy list generated by the buddy tag logic gets separated by
,<space> so this trims away any leading spaces from the buddy name.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way any extra data probided by the dive computer is visible to the
user (without other processing). This data cannot be edited by the user as
it reflects the information given by the dive computer.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While in a multi dive edit we want to apply our usual semantics (only edit
things that are the same as in the current dive), when doing an explicit
copy and paste that doesn't seem to make sense. So we manually override
that behavior.
Fixes#753
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Previously we only applied the type of tank (description, volume, working
pressure) to all selected dives where the tank description matched.
With this patch we also copy the gas mix into all matching cylinders.
Additionally this addresses the issue that we should have a separate copy
of the cylinder description string for each dive.
Fixes#754
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When replannig a dive, offer another button that creates a new
dive rather than overwriting the old. This should help in creating
several versions of a planned dive (longer/shorter, deeper/shallower
etc). Note that this makes dives that start at the same time not
influcence each other's deco.
Also, only the first of a row of simultaneous dives contributes to
the tissue loadings of later dives.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It seems, on Linux qrgba does not work properly making
stars with alpha red when selected. So the patch returns
to just rgb without transparency but decreases the contrast
to white by a factor of 5.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Oddly Qt left the trips selected (but all dives where unselected in the
UI). This got our internal state rather confused. With this change we
clean up that mess and go back to just having those dives that were
originally selected and are still visible show up as selected.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Only dives that remain visible stay selected. And if all selected dives
are removed by the filter, pick a new selected dive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As my wife kept pointing out for a long time, the greyed out stars
were heavier as images than the yellow selected stars. This patch
makes the grey stars semi-transparent.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Acked-by: Andrea Fischer-Helling <andrea@fraufischer.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is needed to get the correct maxdepth when replanning
leads to a shallower dive.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When changing tanks we triggered a replot - but that overwrote the
displayed_dive with the current_dive before the remaining data from the
displayed_dive was used to edit the current_dive.
So now we delay this until later in the function, this way copy of paste
of both tanks and weights works.
Fixes#753
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Hunting down a different issue I managed to cause a crash here when trying
to copy a string that ended up being NULL.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Tool tip not needed, text already provided on mouse-over
Corrects captitalisation style
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use 2 subscript on ppO2
Adhere to agreed capitalisation style
Reset instead of resetted
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since we only store things in the preferences if they are different from
the default, the existing code that simply compared with the settings
value didn't work when people used the defaults.
We now compare to the actual preference at runtime which should address
that.
Fixes#731
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
forgot to add that we used multiselection when I recreated
the dive list.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Multiple layouts had the same name="gridLayout_3". Fix by shifting all
the numbers up by 1.
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I was comparing the strings in the opposite direction.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Just the skeleton of the functions, nothing working yet.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The multifilter widget is a container with all the filter
widgets inside of it. currently there's just one.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It was impossible to remove the tag filter after opening it.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Disable the possibility to collapse the pannel in the
mainwindow when seeing everything.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch moves the filter from the collapsable pannel
and puts it in an uncollapsable way above the dive list.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Yikes this was stupid. We mixed changing the displayed_dive and the
current_dive. So we'd pass in the displayed_dive and a pointer to the
dive_computer structure of the current dc in the current dive. Oops.
This makes much more sense. And:
Fixes#738
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We forgot to clear out the pre-existing tags. We did this for the actual
selected dives that were being edited, but not for the displayed_dive, so
deleted tags showed up again on screen (even though they were correctly
deleted from the selected dives in the dive list).
Fixes#732
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit d5f19c43c9.
With the changes to the headers in commit 3515ad71c1 ("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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
In commit a85a219df3 ("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>
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>
"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>
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>