NDL and TTS doesn't show up in the printed profiles, and it takes
significant time to calculate, so just don't do it.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This implements support for:
* uploading a zip file containing dives - untested
(the zip file must have been prepared elsewhere)
* downloading the dive list and the dive XML files
The networking part is finished, but it's missing the actual import of
the XML files sent by divelogs.de.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
The time out is 30 seconds from the start of the request or from the
last time we got any data from the server.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
QNetworkReply might emit signals after it's been told to go away. We
don't want to change the status after that.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Re-enable buttons that should be enabled by default, disable the others,
set the status to empty, make the progress bar go back to zero.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Just my OCD asserting itself. It looks cleaner this way, if the static
functions aren't interleaved in the middle of the WebServices class.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
One of the rules of using QNetworkAccessManager is to share it among all
users, since sockets and other state can be shared. Looks like Marble
doesn't allow us to set it, though, and it creates multiple instances.
I'll prepare an upstream patch to fix that sometime.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
subsurface.pro already useses that.
For consistency with the app, we use swap 4 spaces with
a tab character for indentation.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
"'GIT_DIR' is not recognized as an internal or external command",
is reported if qmake is runned on Win32.
To solve that we set a explicit syntax for Win32 that uses "Set.."
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We need to espace the backslash with '\\' on win32.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
An addition to the "Move dive notes edit message above the
scrollable widget" commit: Make sure the save/cancel message is
always displayed on top, regardless of which tab is selected.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- Removed the "Visible:" header on the column selector. It doesn't
have to be there, and it's not in the similar equipment column selector
- PO2 --> pO₂ (and others)
- Use same initial case in the units selector in preferences
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds legend for the partial gass pressures if the
graphs are active. when enabling / disabling the square
that represents the color of a gas will also appear / disappear.
Fixes: #272
[Dirk Hohndel: minor changes to layout and whitespace]
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The "Save" and "Cancel" buttons disappeared when scrolling to the
bottom of the notes widget.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the 'mouseClicked' didn't get any dives at the click-geolocation,
ignore it and do not try to select an empty selection. this was
causing a lot of issues when map-navigation.
Also, good deal of code cleanup.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Manually done by only replacing unfinished translations (and one where an
English term was used as translation).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Let's ALWAYS support the somewhat "international standard" N/S/W/E
characters, but ALSO support localized versions.
Fixes#315
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
commit 3c064d5857 ("Make the message when editing a dive fit better")
kinda fixed the wrong problem. A better solution was suggested - just drop
the instructions regarding Cancel / Safe. It's quite obvious what to do
mow that the buttons are part of the message.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
For the names that we have in our "default set" we need to store the
English name so Subsurface will "do the right thing" when opening the file
in a different locale.
With manually entered names in a local language there's not much we can
do.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Due to that we can't handle gaschanges to the same gas in another
cylinder, this changes the second gas to EAN22 to workaround that.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This piece of code didn't need to be on the for-loop, so
let's remove it out of it.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The old code ( slow++ ) ignored that each new dive-selection
we recreated all information on the profile window, so this
version ( a lot more verbose, I know. ) will ignore all dives
that are being selected and will only send the 'dive was selected'
information in the last line of the algorithm, instead of calling
it for each dive on the list of 'to be selected' dives.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Still trying to fix the same issue that I already tried to address in
commit e0b70b82ca ("Fix translation of weightsystem names") and before
in commit dc03b7e7d6 ("We need the correct context to translate event
names").
I missed the WeightModel. Hopefully this was indeed the real fix.
Fixes#312
(I know, I keep saying that)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This should keep the message widget visible without horizontal scroll bar,
even on fairly small screens.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The button box on the bottom of the window made it a bit cluttered
on small screens, this patch uses the window of the MessageWidget
to show the butons - this way less space is used and things are better
spaced on screen.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds a context menu to set the dive location
via the globe, being the dive with a coordinate or not.
It also fixes setting the dive location on edit mode.
Fixes: #315
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We add the "maximized" entry for the settings group "MainWindow",
and store it on close, so that the window state is the same on
the next run. But then also, we only store the window size and resize
to that size if not maximized. This attempts to preserve a "restored"
window size.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
As usual, I am not the author, just the person pulling from Transifex.
Authorship is tracked there (rather badly).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is very much the same as in commit dc03b7e7d6 ("We need the correct
context to translate event names"). I didn't pay enough attention when
reading the bug report and missed that the weight system names were also
not correctly translated.
Fixes#312
(I hope this time for real)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I have added a section about importing dives from other electronic
sources. There are some potential problems, because I know that the
intercation with divelogs.de is not yet fully functional
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When editing air or water temperature, you are actually editing the
information in the active divecomputer structure. But the Dive Info shows
the summary data created from the temperature data in all dive computers.
For most people who will only ever have one divecomputer per dive this may
seem like an artificial distinction, but it's very important if you track
more than one computer.
So in order to have an edit reflected in what's shown, we must redo the
"summary creation" for data from the different divecomputers into the
summary fields of the dive.
Fixes#313
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Qt assumes that all strings are in the context of the class in which you
use them. So when we want to display the translated event names from
within the ProfileGraphicsView we need to make it explicit that these are
strings that come from the C part of the code.
Doing that showed another bug in the code where we foolishly compared the
translated text to a fixed string. Not smart.
Fixes#312
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Again, the author credit to me is wrong. I only did some of the German
translations. Everything else has authorship tracked on Transifex.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Subsurface creates a lot of singleton instances on demand, but nothing
ever deleted them. Since they are singletons, these memory allocations
are technically not leaks. However, they clutter the output in valgrind
and other memory analysers, hiding the real issues.
The solution is to delete these items at exit. For the models and for
gettextFromC, the solution is to use a QScopedPointer, which will delete
its payload when it gets destroyed. For the dialogs and other widgets,
we can't do that: they need to be deleted before QApplication exits, so
we just set the parent in all of them to the main window.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>