summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2021-01-19mobile/statistics: make icons available in mobile appGravatar Dirk Hohndel
They were bundled via the desktop qrc, but they need a shared qrc that can be used in both apps. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-10build-system: compile stats code on mobile OSsGravatar Dirk Hohndel
Android and iOS use qmake, so add the code to the .pro file. This also removes all remnants of QCharts includes and uses and all the references to QCharts in our various build systems. That was a brief but extremely useful detour. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-10statistics: convert chart to QQuickItemGravatar Berthold Stoeger
It turns out that the wrong base class was used for the chart. QQuickWidget can only be used on desktop, not in a mobile UI. Therefore, turn this into a QQuickItem and move the container QQuickWidget into desktop-only code. Currently, this code is insane: The chart is rendered onto a QGraphicsScene (as it was before), which is then rendered into a QImage, which is transformed into a QSGTexture, which is then projected onto the device. This is performed on every mouse move event, since these events in general change the position of the info-box. The plan is to slowly convert elements such as the info-box into QQuickItems. Browsing the QtQuick documentation, this will not be much fun. Also note that the rendering currently tears, flickers and has antialiasing artifacts, most likely owing to integer (QImage) to floating point (QGraphicsScene, QQuickItem) conversion problems. The data flow is QGraphicsScene (float) -> QImage (int) -> QQuickItem (float). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2021-01-02statistics: implement StatsViewGravatar Berthold Stoeger
The StatsView shows the chart described by the StatsState structure. It is based on a QML ChartView. This should make it possible to easily port to mobile. It does not include any of the UI around the chart, viz. the variable and chart selection, etc. The code checking for the statistical significance of the regression line was written by Willem. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: willemferguson <willemferguson@zoology.up.ac.za>
2021-01-01statistics: add statistic variablesGravatar Berthold Stoeger
The StatisticVariable class hierarchy encapsulates the concept of a dive-variable, which can be plotted in charts either as dependend or independend variable. There are three types of these variables: 1) discrete: For example dive buddies or suit type. 2) continuous: Has a notion of linear metric - can be used as histogram or scatter plot axis. 3) numeric: Like continuous, but allows for operations such as calculating the mean or the sum over numerous dives. All variables support binning. The bins are defined per variable. Continuous variables can be converted into an arbitrary double value, which is used to be plotted on a continuous axis. Moreover, numeric variables support a number of operations, which depend on the variable. Since binning is based on different types, the code is rather template-heavy. Of course, this could be solved with unions/variants and runtime-polymorphism, but using templates was just much quicker. Notably, this uses the CRTP (curiously recurring template pattern) where a subclass passes itself as argument to the baseclass. This is a weird kind of "reverse inheritance". The StatsTranslations class is a dummy class which will be used to collect all translations of the statistics module. This includes changes by Dirk to fix compilation of the downloader. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2021-01-01build-system: fix macOS QtCharts QML resourcesGravatar Dirk Hohndel
On macOS the cmake build system doesn't copy the QML resources into the app bundle and so we do that manually. I forgot to add that for QtCharts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29build-system: add QQuickWidgets to mobile buildGravatar Dirk Hohndel
Even though the mobile build doesn't have a UI for the statistics, yet, it already builds the base files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-29build-system: compile with QtCharts moduleGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-12-17mobile/kirigami: add the shaders as resourceGravatar Dirk Hohndel
These should already be part of the kirigami plugin, but without explicitly adding them here they appear to not get found at runtime. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile/kirigami: install our own copy of ECMGravatar Dirk Hohndel
Instead of relying on this being available as a system resource, treat it the same way as we treat Kirigami and the Breeze icons. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: re-add breeze iconsGravatar Dirk Hohndel
This time from the cloned repo. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile: silly whitespace cleanupGravatar Dirk Hohndel
Simply because it bugged me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-17mobile/kirigami: first steps to switching to Kirigami 5.76Gravatar Dirk Hohndel
Our half-assed manual build of Kirigami was becoming completely unmaintainable. So let's try to use the build method that the Kirigami team recommends. Which unfortunately requires us to have access to the KDE extra cmake modules (ECM). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-03build-system/downloader: cli-downloader isn't part of the coreGravatar Dirk Hohndel
It's part of the main excutable / helper and needs to be linked before all of our support libraries. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-03downloader: require only Qt 5.11Gravatar Robert C. Helling
Qt 5.11 is what current Raspian comes with. Unless we really need it, let's try not to have to manually download Qt on an already slow RaspberryPi. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03downloader: small improvementsGravatar Robert C. Helling
Provide supported dive computer list on the command line and actually call the cli download. Still not functional. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-12-03build-system: add models and shared backends to the downloaderGravatar Dirk Hohndel
We'll need this in order to be able to actually open dive files and download things from a dive computer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-12-03build-system: start adding a headless buildGravatar Dirk Hohndel
Right now this doesn't do a thing, but it gives us a nice target that has far fewer dependencies and should contain enough parts to download stuff from a divecomputer and then sync that with cloud storage. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30build-system: first steps towards a 64bit Windows buildGravatar Dirk Hohndel
This is barely scratching the surface (no put intended), and of course the container needs to be updated, first, to have a 64bit version of MXE installed, but this seems to help make libmtp build correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-30add initial support for the Garmin Descent Mk2iGravatar Dirk Hohndel
This brings in the needed libdivecomputer updates and builds Subsurface against libmtp in order to support downloading dive data via MTP (since the Mk2/Mk2i no longer provide a FAT filesystem via USB). In order for this to work you need to have libmtp installed on your system. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-24build-system: switch to using C++17 as default C++ dialectGravatar Berthold Stoeger
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-23cleanup: remove outdated explicit libssh2 linkGravatar Dirk Hohndel
We used to need this when building our own libgit2 on older distibutions. This shouldn't be needed anymore at all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-16build-system/macOS: remove Qt SQL plugins and suppress some errorsGravatar Dirk Hohndel
Technically with this the app might be ready for AppStore inclusion. I don't see myself spending the energy on that, TBH. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-10-11Set the NO_PRINTING variable properlyGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2020-10-08build-system: remove building Grantlee cmakeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-19core/bluetooth: switch to use libdivecomputer rfcomm supportGravatar Linus Torvalds
The Qt based implementation apparently got broken at some point and now fails to connect to rfcomm dive computers like the Shearwater Petrel. This uses the libdivecomputer rfcomm backend. Tested to work with bluez on Linux as well as with the native Windows implementation. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-09-13build-system/macOS: add one more library that macdeployqt missesGravatar Dirk Hohndel
This appears to be new with Qt 5.14. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-05-09add Berthold to the list of explicitly mentioned developersGravatar Dirk Hohndel
Number 3 overall committer with currently 9% of total commits and 27% of all commits in the last three years. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-25build-system/android: remove libusb at QTestGravatar Dirk Hohndel
We no longer use libusb to access USB devices on Android, therefore there's no point including libusb in our build. Also, we have never even attempted to run the tests on Android, so let's not even pretend to support building them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-04-25build-system/Android: don't bundle the user manualGravatar Dirk Hohndel
That wouldn't work, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10build-system: remove pointless distinction between desktop and mobileGravatar Dirk Hohndel
It's the same sources, the same library. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile/undo: compile undo commands and call undo command for deletion.Gravatar Berthold Stoeger
First steps towards full undo on mobile. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24build-system: move exportfuncs to backend-sharedGravatar jan Iversen
WARNING: multi directory commit, needed to secure it builds. move the core/exportfuncs.* to backend-shared. update backend-shared/CMakeLists.txt to generate backend-shared lib update CMakeLists.txt to include backend-shared lib in link process. update ios project to reflect new directory Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24build-system: add new root dir backend-sharedGravatar jan Iversen
WARNING: multi directory commit, needed to secure it builds. leaving the shared backend sources in core, imposes a severe limitation, that they cannot make use of e.g. qt-models, because that is created after core (first library to be created). The shared backend uses functionality from core and qt-models, so it must be created when those are available and before desktop-widgets or mobile-widgets are created. Make a new root directory "backend-shared" with empty CMakeLists.txt Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24build-system: Add CMakeLists.txt to mobile-widgetsGravatar jan Iversen
In order to make the central CMakeLists cleaner and more consistent add a CMakeLists.txt to mobile-widgets, like in other root directories. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24build-system: Add CMakeLists.txt to map-widgetGravatar jan Iversen
In order to make the central CMakeLists cleaner and more consistent add a CMakeLists.txt to map-widget, like in other root directories. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24build-system: move qmlprofile to profile-widgets/CMakeLists.txtGravatar jan Iversen
qmlprofile.* is part of profile-widget, and are now defined in the the corresponding CMakeLists.txt, and thereby making the central CMakeLists.txt cleaner. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-10build-system: avoid stripping executable on Mac.Gravatar jan Iversen
Add -no-strip to macdeployqt, to ensure the executable contains debug symbols Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-26build-system: add CMake SUBSURFACE_MOBILE_DESKTOP as new build typeGravatar jan Iversen
Add -DSUBSURFACE_MOBILE_DESKTOP to CMake, allowing the C++ part to be different when compiling for a device or for the desktop. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-14Refactoring: move undo commands to top levelGravatar Berthold Stoeger
In the future we might want to use undo-commands for mobile as well (even if not implementing undo). Therefore, move the undo-command source from desktop-widgets to their own commands top-level folder. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-14/: Corrected wrong Qt dependency from KirigamiGravatar jan Iversen
Kirigami 5.62 uses QtQuick.Controls 2.5, which were introduced in Qt 5.12 (see https://doc.qt.io/qt-5/qtquickcontrols-index.html) update CMakeList.txt to demand min. 5.12 when building SUBSURFACE-MOBILE update INSTALL text Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-10-16GitHub Actions: add Linux Qt 5.12 container buildGravatar Dirk Hohndel
The AppImage works - I just need to figure out how to post releases. For now it'a available on the Actions page as Artifact. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-14build-system: Subsurface-mobile now requires Qt 5.11Gravatar Dirk Hohndel
This is one of the side effects of switching to Kirigami 5.62 - but since we build our mobile versions with Qt 5.12 and Qt 5.13, this really isn't an issue. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-14build-system: require Qt 5.9.1 or newerGravatar Dirk Hohndel
With this all BT platforms now support BLE Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-13Mobile: update Kirigami to v5.62Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-02build-system: add option to enable profilingGravatar Dirk Hohndel
Simply nice to have - even though it didn't help me track down the issue this time around. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-09-21Android: bundle default font for use in OnePlus devicesGravatar Dirk Hohndel
This is working around a Qt Bug https://bugreports.qt.io/browse/QTBUG-69494 which prevents correct rendering of the OnePlus fonts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-04-12CMake: move enable_testing() to the top levelGravatar Rolf Eike Beer
This allows calling ctest from the main build directory instead of having to change one level down. As a bonus the unittests now show up in my KDevelop so I can directly run them from the IDE. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-27drop support for Qt 5.4 and beforeGravatar Rolf Eike Beer
The oldest version tested on TravisCI is Qt 5.5, which is also what is in Ubuntu 16.04. Drop all the older cruft, noone should use that anymore. Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-20Remove partial support for QWebEngineGravatar Dirk Hohndel
Printing never worked, none of this was ever included in test builds. Also, now that there are official releases of QtWebKit again, this just doesn't seem worth carrying along anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>