Removed some merge artefacts and made sure code compiles and
produces wellformed TeX. Shortend some comments.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
The purpose of this work is to allow for generation of more complete log
pages using TeX/LaTeX.
Previously, the exporting to TeX generated a document that contained
very limited information about the dive. For example: the only details
reported about air consumption were delta pressure and SAC. In addition
no data was reported about what equipment (weights, tanks, suit) was
used.
Per feedback, code was updated to use helper functions, and now exports
data with the units set by the user in the Subsurface preferences. Some
characters (Degree symbol) do not render correctly by default in LaTeX,
so sample code to address this was included in the top comments. Volume
units do not export an ideal character string, so another string was
substituted.
This update adds the following information:
* GPS Location
* Dive computer used
* Max, Min, Air, and Water Temperatures
* Average depth
* Number of cylinders listed, mix, and start/end pressure for each
* Total weight used, and the description and quantity of each weight
* Dive rating (previously, only visibility was reported)
* Buddy
* Dive master
* Suit
This update moved several fields that had no output or had unexpected
names (i.e. "spot", "place") into a "Deprecated section"
Future work:
* The export currently only includes the first entry in the tag list.
* Future versions should export all tags.
* Ideally, this would export a screenshot of the dive location.
* Create a table of correct size for weights and cylinders.
* It would be nice to have a bit more control over the generation of
profile images, but that may be beyond me.
Rebased-and-cleaned-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Ben McCandless <mccand@gmail.com>
I thought we had this automated, but Lubomirs commits introduced a few
files with dos line endings. This is purely a change of line endings, no
other changes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A user reports a SIGSEGV that points to DownloadFromDCWidget::updateProgressBar()
in relation to strlen()/strdup(), at end of download. Reading the code, as I
can't reproduce the crash, it seems that the progress_bar_text is set to NULL
and later strdup-ped. The man page is not fully clear on this, but setting it
to the empty strings is much safer.
Might fix: #507
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The local slot coordinatesChangedLocal() tracks the MapWidgetHelper
coordinatesChanged() signal and emit a coordinatesChanged() signal
to any listeners (e.g. MainWindow).
Also add a small change in centerOnDiveSite(), to not be called if
we are skipping the reload (skipReload is updated by
selectedDivesChanged()).
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This guard is to prevent a meaningless reload on the map marker list,
when the user selects a new dive and nearby dives. The flag is updated
in selectedDivesChanged() which on it's now cannot possibly trigger
changes in the markers, only the selection. The selection of active flags
is already handled by the model and automatically updated in the QML.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The selectedDivesChanged() signal from MapWidgetHelper is connected
to a local slot. One problem here is that this crashes with the calls to
DiveListView().
The dive list widget triggers events that call reload() on the MapWidget
(same happens for Marble's Globe class) and that crashes somewhere in
the QML shared library. TODO: investigate.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Apparently, if it's required to import a QML component inside any QML
file from resource, the compoment QRC alias has to have the same name
as the component - e.g. add QRC alias MapWidgetContextMenu.qml allows
creating a MapWidgetContextMenu compoment inside MapWidget.qml.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
MapWidgetHelper::reloadMapLocations() is now called from MapWidget::reload()
and MapWidget::repopulateLabels().
The mobile version should do similar.
NOTE: These MapWidget methods names are from the Marble "port".
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Apparently the "safe way" is to register C++ types is before the QML
code has loaded. The idea here is that the QML code should know about
these type definitions and be able to operate with them.
TODO: do the same for the mobile version.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
MapWidget sould not handle any of the map backend.
Instead it should just pass calls to MapWidgetHelper.
Do that for centerOnDiveSite().
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Use findChild() to obtain the only MapWidgetHelper object created
in the MapWidget.qml. Store the reference as a member variable -
m_mapHelper.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
As noted in previous commits, a folder named "shared-widgets" which
holds QML/CPP files might be the better (less confusing) choice.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
If NO_MARBLE is defined don't create a dummy replacement widget in
the GlobeGPS class.
At this point all cases of NO_MARBLE are covered by the MapWidget
solution.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
By including <QQuickWidget>, <winbase.h> is included from <windows.h>.
<winabase.h> has the IGNORE macro defined.
Undefine it localy in mapwidget.h to prevent a conflict with maintah.h's
EditMode::IGNORE enum.
NOTE: possibly similar case to the undefine in
btdeviceselectiondialog.h:22.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Based on NO_MARBLE, call the same methods in the two different classes.
Later the dummy Marble GlobeGPS (for NO_MARBLE) should be removed.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Also change the menu entry text itself to "Map" instead of "Globe".
"Map" covers both Marble and Qt Location in terms of "map" solutions.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This is WIP and would be developed futher, so that the new
map widget can center on a divesite location.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This is an attempt for a smooth transition between Marble
and Qt Location map integration. If NO_MARBLE is defined
an instance of MapWidget (Qt Location) is created,
else an instance of the Marble widget would be used.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The files are WIP and located in desktop-widgets, as these
would only be used by the desktop version.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This seems a bit odd, but it actually has three different reasons for it:
- It's a visual indication of BT LE mode for users
- the rfcomm code only works with legacy BT support, and if we scan a
device that only does LE, we want the custom serial code to instead
automatically fall back on a "emulate serial over LE packets" model.
- we want rfcomm to remain the default for devices that do both legacy
BT _and_ LE, but we want people to have the ability to override the
choice manually. They can now do so by just editing the address
field and adding the "LE:" prefix manually, and it automatically gets
saved for next time.
So while a bit hacky, it's actually a very convenient model that not
only works automatically, but allows the manual override.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of being "custom serial", it's a IO model that allows serial or
packet modes, independently of each other (ie you can have a bluetooth
device that does serial over BT rfcomm and packet-based communication
over BLE GATT with the same serial operations that describe both cases).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Way back in time this code was copied from downloadfromdcthread, so
de-duplicate and call that code instead.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
The fake percentage needs to at least start at 0 for every cloud interaction.
Yes, the file global variable is ugly. So sue me.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The old system of cloud access updates with fake percentages just wasn't
helpful. Even worse, it hid a lot important information from the user.
This should be more useful (but it will require that we localize the
messages sent from the git progress notifications and make them more
'user ready').
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>