aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
AgeCommit message (Collapse)Author
2017-09-13Facebook support: fix export dialog layoutGravatar Tomaz Canabrava
Dialog layout was broken, now we can actually resize. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2017-09-13Facebook support: use the new Graph ApiGravatar Tomaz Canabrava
This is basically a one liner. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2017-09-11Fix crash on manually added ZXU/DL7 fileGravatar Miika Turkia
The CSV import crashed if the input file had no samples in it. Fixes #566 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-11Import dive number from DL7 logGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-04remove Marble from packaging and build scriptsGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> --- please note, that i have no way to test most of the scripts ATM.
2017-09-04remove Marble from the source treeGravatar Lubomir I. Ivanov
In desktop-widgets, remove globe.cpp, globe.h and also remove the NO_MARBLE macro usage. At this point the MapWidget will always be created and there will always be a map in the application. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-09-04googlemaps: clear the cache folder on language changeGravatar Lubomir I. Ivanov
Open the cache folder via QDir and call removeRecursively(). At that point the user needs to restart Subsurface to be able to use the map in another language properly. This change is triggered by the fact that the user might want to see the street map in his preferred language after he/she picks another language from Settings. But one problem here is that the cached files do not carry a language flag - e.g. they are in the lines of: googlemaps_100-1-9-445-245.png Which means that the only way to not mix tiles in different languages is to clear the cache and start downloading the new tiles in the newly picked language after Subsurface has restarted. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-08-26Another unused variableGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-08-26Tex export: remove incorrect codeGravatar Dirk Hohndel
These two variables are calculated later in the function and the same two lines of code are there again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-08-10More details for TeX exportGravatar Robert C. Helling
Include the gasname, get rid of more spaces in front of units, update the template to use new gas fields. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-08-10Move the decision how to typeset unit to TeX-style fileGravatar Robert C. Helling
This way, the user can adopt those once and for all for all her dives. This includes the space between number and unit symbol. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-08-10Use letters instead of digit in TeX macro namesGravatar Robert C. Helling
TeX doesn't like digits there, so let's use letters Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-08-10Cleaning up TeX exportGravatar Robert C. Helling
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>
2017-08-10Add additional data to TeX-exportGravatar Ben McCandless
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>
2017-08-01Configure ostc4: Correct button sensitivity rangeGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-08-01Configure ostc4: Wire up reset buttonGravatar Anton Lundin
I previously forgot to enable the reset button. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-07-28Map: try to wait for Map to loadGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-28Switch new files to unix line endingsGravatar Dirk Hohndel
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>
2017-07-28Fix possible memory corruptionGravatar Jan Mulder
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>
2017-07-28map: whitespace cleanup in QML and C++ filesGravatar Lubomir I. Ivanov
- remove ";"s - remove {} where not needed or move them to the same line Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mapwidget: add a method to set update editMode in MapWidgetHelperGravatar Lubomir I. Ivanov
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>
2017-07-28mapwidget: add the "skipReload" guardGravatar Lubomir I. Ivanov
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>
2017-07-28mapwidget: connect the helper selectedDivesChanged() signalGravatar Lubomir I. Ivanov
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>
2017-07-28qrc: use "MapWidget.qml" as a QRC aliasGravatar Lubomir I. Ivanov
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>
2017-07-28mapwidget: call MapWidgetHelper::reloadMapLocations()Gravatar Lubomir I. Ivanov
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>
2017-07-28mapwidget.cpp: register the MapLocation and MapLocationModel typesGravatar Lubomir I. Ivanov
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>
2017-07-28add the SPDX-License-Identifier to new source filesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28qmlmapwidgethelper: add the centerOnDiveSite() methodGravatar Lubomir I. Ivanov
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>
2017-07-28mapwidget.cpp: obtain a reference of the MapWidgetHelper from QMLGravatar Lubomir I. Ivanov
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>
2017-07-28desktop-widgets/mapwidget: register the MapWidgetHelper QML typeGravatar Lubomir I. Ivanov
This commit registers the class MapWidgetHelper for QML in the desktop version. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28desktop-widgets/cmake: include "qmlmapwidgethelper.cpp"Gravatar Lubomir I. Ivanov
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>
2017-07-28globe.cpp/h: remove the dummy QLabel based widgetGravatar Lubomir I. Ivanov
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>
2017-07-28mapwidget.h: force-undefine the IGNORE macro from winbase.hGravatar Lubomir I. Ivanov
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>
2017-07-28mapwidget.h: remove redundant "core/divesite.h" includeGravatar Lubomir I. Ivanov
The header should be included only in the .cpp file Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28locationinformationwidget: abstract between GlobeGPS and MapWidgetGravatar Lubomir I. Ivanov
Connect the same signals for the two classes based on the NO_MARBLE macro. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mapwidget: add the placeholder prepareForGetDiveCoordinates() slotGravatar Lubomir I. Ivanov
Port from GlobeGPS. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mapwidget: add the coordinatesChanged() signalGravatar Lubomir I. Ivanov
Port from GlobeGPS. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28subsurfacewebservices: abstract between GlobeGPS and MapWidgetGravatar Lubomir I. Ivanov
Call same methods from the two classes based on NO_MARBLE. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mapwidget: add the placeholder repopulateLabels() methodGravatar Lubomir I. Ivanov
Another placeholder for the Marble port. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28maintab: use GlobeGPS / MapWidget abstractionGravatar Lubomir I. Ivanov
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>
2017-07-28mapwidget: add the method centerOnIndex()Gravatar Lubomir I. Ivanov
Again for the port from Marble, later can be removed / renamed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mapwidget: add public slot endGetDiveCoordinates()Gravatar Lubomir I. Ivanov
Later this has to be replaced / renamed if needed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mapwidget: add an empty reload() methodGravatar Lubomir I. Ivanov
Call same method in MainWindow if the NO_MARBLE macro is defined. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mainwindow: rename GLOBE_MAXIMIZED to MAP_MAXIMIZEDGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mainwindow: rename "actionViewGlobe" to "actionViewMap"Gravatar Lubomir I. Ivanov
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>
2017-07-28mainwindow: don't remove the "view globe" action from the menuGravatar Lubomir I. Ivanov
We now have a map no matter NO_MARBLE. TODO: rename the action itself. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mainwindow: enable centerOnDiveSite() no matter the NO_MARBLE macroGravatar Lubomir I. Ivanov
The same public slot now exists for both widgets, so the ifndef macro check is redundant. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28mapwidget: add placeholder centerOnDiveSite() public slotGravatar Lubomir I. Ivanov
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>
2017-07-28mainwindow: create an instance of MapWidget for NO_MARBLEGravatar Lubomir I. Ivanov
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>
2017-07-28mainwindow: rename the variable 'globeGps' to 'mapWidget'Gravatar Lubomir I. Ivanov
This is needed by the transition to the new map widget. Also generalizes the variable name. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>