aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
AgeCommit message (Collapse)Author
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>
2017-07-28desktop-widgets/cmake: include mapwidget.cpp as a UI classGravatar Lubomir I. Ivanov
The next step would be to create an instance of the class in MainWindow. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-07-28map: add placeholder .cpp and .h files for the new map widgetGravatar Lubomir I. Ivanov
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>
2017-07-12Fix slot handling in Photos tabGravatar Dirk Hohndel
This clearly has never been tested, never worked. Oh well. Fixes #478 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-30BLE handling: create helper function to add the LE: prefixGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-29Better colors for BT pairing dialogGravatar Dirk Hohndel
Linus had complained about these colors for a while. I think this is a massive improvement. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-30BT address 0 is bogusGravatar Robert C. Helling
Grey out those devices in the scanning list and prevent the user from selecting those. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-06-26Bluetooth: make LE-only devices add "LE:" as an address prefixGravatar Linus Torvalds
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>
2017-06-22Convert to new libdivecomputer custom IO modelGravatar Linus Torvalds
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>
2017-06-21Remove old duplicated codeGravatar Anton Lundin
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>
2017-06-18Desktop UI: reset cloud storage progress 'percentage'Gravatar Dirk Hohndel
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>
2017-06-17QML UI: redesign the user notificationGravatar Dirk Hohndel
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>
2017-06-16code cleanup: remove unimplemented classes and structsGravatar Jan Mulder
Remove forward declared but not implemented classes and structs. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-16code cleanup: remove 2 unused structsGravatar Jan Mulder
Luckily these 2 structs in this ugly code are not used. Remove them. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-15Correctly hook up libdivecomputer log and dumpGravatar Dirk Hohndel
This was checking the status of the wrong UI elements. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>