summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2018-06-21mobile: remove MapWidget from mobile-resources.qrcGravatar jan Iversen
remove MapWidget entries from mobile-resources.qrc, and reference map-widget.qrc in Subsurface-mobile.pro for iOS Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-21mobile: iOS/Android: always delete libdivecomputer.log at startGravatar Dirk Hohndel
This way the user doesn't inadvertantly end up with information from a previous run of Subsurface-mobile when they copy the logs to the clipboard. Not sure we should do the same when building for desktop, so right now it's only when building for a device. Reported-by: Thomas Fänge <thomas.fange@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20QML UI: remove unused propertyGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20QML UI: ensure we track vendor/product for downloadGravatar Dirk Hohndel
This is based on something that Anton Ludin sent to the mailing list. Reading through the code it seemed that there were scenarios in which DC_vendor and DC_product were not updated correctly. That's one of the problems of the declarative approach in QML - it can be very hard to figure out which code is run when in certain situations. This may help address the issue with FTDI downloads no longer working on Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20QML UI: improve banner in global drawerGravatar Dirk Hohndel
The asynchronous load seemed to be (at least one of) the culprit(s) of the banner occasionally not showing up. Making the font for the cloud ID smaller looks better (and works much better for long email addresses). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20QML UI: store nocloud data when adding cloud credentialsGravatar Dirk Hohndel
We want to allow people to keep dives they collected without a cloud account. The code was mostly there, we just got confused about the existing status because we ran through this twice (no cloud -> unknown -> verified). This way we explicitly remember this kind of transition. Fixes #1404 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20QML UIL: fix more problems with members moving from manager to prefsGravatar Dirk Hohndel
That change clearly would have benefited from better code review. This is a superset of a change proposed by Jan Iversen. Closes #1406 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20core: add free_samples helperGravatar Dirk Hohndel
And use it in the UI and planner code. See #1411 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20mobile: set alloc_samples to 0 when resetting.Gravatar jan Iversen
set alloc_samples = 0 when settings dc->sample = 0 and dc->samples = 0 Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-18mobile: use full icon path.Gravatar Murillo Bernardes
For some reason Kirigami.Icon mess up icon display when filename extension is omitted. Because of this a perfectly good, scalable svg show up as a low resolution scaled up icon. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-06-18mobile: move call to savePreferences back to manager.Gravatar jan Iversen
calls to savePreferences was moved to prefs. in b8eb348f546291c49e2d606649b3c85d23e43782, but the corresponding C++ code was not merged. Revert call to savePreferences to manager. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-18mobile: revert e993d4f005e62c12765e2e45342ecf840476e3bfGravatar jan Iversen
The commit secured that plotDive was not called before actually being used. However our (rather fragile) C++ qml interface did not work correctly (ony sometimes). Revert the previous commit. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-18QML UI: show the cloud credentials in the global drawer bannerGravatar Dirk Hohndel
This is an additional side-benefit of rolling our own banner. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-18QML UI: build our own icon and header for global drawerGravatar Dirk Hohndel
Kirigami appears to have a bug that makes it fail to show our icon. With this we can be much more flexible in what we show in the top area of the global drawer. Fixes #1331 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-18Whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-17mobile: add Dark_gps.svgGravatar jan Iversen
The blue gps was reused for the dark theme. Copy Blue_gps.svg and change color to dark. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-16mobile: fix reference to credentialStatus propertyGravatar Murillo Bernardes
Commit b8eb348f moved credentialStatus but missed one spot. When starting from a fresh install, clicking "No cloud mode” fails because of this. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-06-16QML UI: fix variable referenceGravatar Dirk Hohndel
Looks like commit 807571a588 ("core: update deviceData default from qml") never actually was tested with dive computer download. This looks rather like an automatic renaming gone wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-15mobile: move settings from qmlmanager to qmlprefsGravatar jan Iversen
add settings variables/functions to qmlprefs remove settings variables/functions from qmlmanager change manager. to prefs. in qml files for setting variables/functions Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15mobile: move NOCLOUD_LOCALSTORAGE from qmlmanager.cpp to .hGravatar jan Iversen
Make NOCLOUD_LOCALSTORAGE public for other qml functions Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15mobile: add qmlprefs classGravatar jan Iversen
add class to cmake and pro register class Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-11Mobile: correct wrong C++ ref in qmlGravatar jan Iversen
change data() to manager. correct comboDevice -> comboConnection Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09core: remove qml properties from downloadfromcthreadGravatar jan Iversen
Remove Q_OBJECT and qml properties from DCDeviceData class Remove DCDeviceData register from mobile-helper.cpp Change DCDeviceData constructor to be without parameters Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09core: update deviceData default from qmlGravatar jan Iversen
remove setting default in qml to C++ Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: add DCDeviceData properties to qmlmanagerGravatar jan Iversen
add DCDeviceData qml properties etc. to qmlmanager Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: remove context iconsGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: remove png/svg icons not usedGravatar jan Iversen
Delete icons that are taken from kirigami Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09profile: make profile self containedGravatar jan Iversen
move qmlprofile.* to profile dir, to keep all parts of the widget in one place. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: clean use of DiveId in qmlprofileGravatar jan Iversen
Remove unused signal and simplify qml access to m_diveId Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: do not call plotDive during startupGravatar jan Iversen
Check in profile if visible before calling plotDive Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: white space clean in DiveDetailsView.qmlGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: decoupled ssrf.qrc and mobile.qrcGravatar jan Iversen
remove /subsurface.qrc from .pro copy missing mapwidget icon references to mobile-resources.pro Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: main.qml, change load of dive.jpgGravatar jan Iversen
change load of dive.jpg to reflect new location. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: mobile unreferenced ic iconsGravatar jan Iversen
Remove 24px icons not referenced. update README.license Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: remove unneeded alias from mobile-resourcesGravatar jan Iversen
remove alias where alias == file rename *24px* icons and remove alias Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: clean qml dir (move dive.jpg to icons)Gravatar jan Iversen
Cleanup qml dir by moving dive.jpg to the icon dir Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: sort mobile-resources.qrcGravatar jan Iversen
Sort to make it easier to read. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-07mobile: correct comboProduct if model changesGravatar jan Iversen
update onModelChanged in comboProduct to read the current index Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-04mobile: delay combobox selection for download.Gravatar jan Iversen
Set index of comboboxes in Download screen when the page becomes visible instead of when it is created. The pages is created before QBluetoothDeviceDiscoveryAgent on iOS and desktop, therefore combobox indexes cannot be set during page creation. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-04Cleanup: fold core/helpers.h into core/qthelper.hGravatar Berthold Stoeger
helpers.h included qthelper.h and all functions declared in helpers.h were defined in qthelper.h. Therefore fold the former into the latter, since the split seems completely arbitrary. While doing so, change the return-type of get_dc_nichname from "const QString" to "QString". Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-30mobile: add timer to measure startup.Gravatar jan Iversen
Subsurface-mobile has a long startup time; in order to isolate the problem(s) a timer is added to see where time is "lost". The collected startup times are added to the clipboard together with the other logs, allowing test users to report back. All this is only enabled when compiling with -DENABLE_STARTUP_TIMING Closes #1340 [Dirk Hohndel: collapsed multiple commits and minor white space cleanups, added missing QMutex variable] Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-27mobile: make list action buttons appear againGravatar Murillo Bernardes
Dive list: on holding an item, the delete button was not showing the icon. Show GPS fixes: when swiping an item icons were not being shown. Partial for bug #1267 Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-27mobile: Adjust About.qml to fit small screens.Gravatar jan Iversen
Adjust size of image and text to ensure that the clipboard buttom is (nearly) always visible The buttom is not directly visible in landscape mode on a small device. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-26Cleanup: remove deleteLater() in QMLProfileGravatar Berthold Stoeger
The actual profile object was destroyed with deleteLater() in the destructor of QMLProfile. This is ominous, because the subobject shouldn't survive the parent object. Therefore, automatically destroy the profile by using a QScopedPointer. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-26Cleanup: remove reply and request member variables in QMLManagerGravatar Berthold Stoeger
The reply member variable was used to access the reply in the handleSslErrors, handleError and retrieveUserid slots. This is a very scary proposition in the light of multi-threading. Instead, the reply can be accessed by using the QObject::sender() function. Thus, we can remove the member variable. The request member was just downright weird. This was only used locally to describe a network request. Since QNetworkAccessManager::get() copies the request, it can be destructed right away. Nevertheless, the data was kept as a subobject. Remove member and make it function-local. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-05-24profile-widget: set printmode but allow events for ssrf-mobileGravatar jan Iversen
Reactivate printMode true for ssrf-mobile to avoid font problems, do not discard events if ssrf-mobile (even though printMode is true) Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21mobile: removing print mode from mobile.Gravatar jan Iversen
print mode was used to limit the functionality of the profile, when used in ssrf-mobile. The effect is that DC events are displayed, but not selectable Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21mobile-widgets: Change Q_UNUSED to no parameter nameGravatar jan Iversen
C++ permits use of parameters without name, which signals unused Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21iOS: copy libdivecomputer.log to clipboardGravatar jan Iversen
Read libdivecomputer.log file and append to clipboard Remark, subsurface_open is not available in iOS so using QFile instead. Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21iOS: updated text in About to reflect logs not logGravatar jan Iversen
Both subsurface.log and libdivecomputer.log are on the clipboard. Signed-off-by: Jan Iversen <jani@apache.org>