summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2015-07-20Only enable Bluetooth support if building against Qt5.4 or newerGravatar Dirk Hohndel
Also remove the quick hack from commit 947fda14c5d1 ("Bluetooth support: quick build fix for Qt5.2"). I should have thought this through before pushing that commit, but oh well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18Remove now unneeded defineGravatar Anton Lundin
This removes the extra Q_OS_ANDROID define to prevent a redefined warning. Somehow, the qt headers didn't define Q_OS_ANDROID previously, but how does. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17QML UI: Implement showing of the dive profile on QMLGravatar Grace Karanja
Link the QMLProfile class to the DiveList.qml file. The profile is displayed above the dive details. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-16Fix libssh libssl linker order for AndroidGravatar Anton Lundin
We need to link things in the correct order, even on android. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16Cmake: use correct variable to find make commandGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14Cmake: don't hardcode the make commandGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-13Android build: statically link against libssl and libcryptoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-10Cmake: use the mobile icon for Android apkGravatar Dirk Hohndel
The first attempt missed the second spot where this was set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-09Add different icon for mobile appGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-09Teach android build about subsurface-mobileGravatar Anton Lundin
This teaches android build.sh and cmake about how to build the qml ui of subsurface-mobile as a apk. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08Use qt-android-cmake to produce a android apkGravatar Anton Lundin
This introduces code to use qt-android-cmake to produce a working apk. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08Make the libssh linking optionalGravatar Anton Lundin
Due to bugs in libgit2, we force linking with libssh2 to add git-over-ssh support. On android we currency don't want libssh2 due to its dependency chain, so this makes the libssh2 force linking opt-out. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06Cmake: make Facebook support an actual optionGravatar Dirk Hohndel
This way we can selectively turn off Facebook support. And turning off both Facebook support and support for the user manual allows us to not rely on QWebKit which once again allows debugging Subsurface with valgrind on Arch Linux. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06Implement the custom Bluetooth serial communication and use itGravatar Claudiu Olteanu
Create a custom Bluetooth serial communication using the QTBluetooth API and use it when the Bluetooth download mode is enabled. First try to connect on RFCOMM channel 1 because this is the default RFCOMM channel of SPP service for most devices. If this doesn't work try again on RFCOMM channel number 5 because it could be a Petrel2 device. Add a fake open function for the custom implementation. This is used when the selected device is HW OSTC 2N and the Bluetooth mode is activated, then fake the open call of the serial device. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-06Add a dialog for remote Bluetooth devices selectionGravatar Claudiu Olteanu
Implement a dialog which can be used for remote Bluetooth devices selection and to control the local Bluetooth device. Functionalities of the widget: - expose information about the local BT device - scan for remote BT devices - pair/unpair with a remote BT device - turn on/off the local BT device - logging - save the selected BT device The selection dialog is created when the bluetoothMode checkbox is enabled. Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05Cmake: only build print related files if NO_PRINTING isn't setGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05Correctly include QtQuick when building for mobileGravatar Grace Karanja
The changed introduced in d880040d breaks mobile builds by not correctly linking with QtQuick. This change fixes that by fixing the incorrect line in CMakeLists.txt so that the correct QtQuick headers will be found. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-05Merge branch 'custom-print' of github.com:neolit123/subsurfaceGravatar Dirk Hohndel
2015-07-05Printing: add TemplateEdit form to source treeGravatar Gehad elrobey
The TemplateEdit class works to customize the tempalate before printing, User can select the font-size, font-type, color-palette, linespacing and editing the template HTML code. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-07-05Add simple test for the dive plannerGravatar Dirk Hohndel
This sets up a standard dive scenario (30 minutes at 260ft/79m, EAN36 and Oxygen as deco gases, last stop at 20ft/6m) and calls the planner to set up a dive plan given certain standard gases. Instead of trying to verify the complete plans it checks that we switch to the deco gases at the right depth and the complete duration of the dive matches our expectation. The test intentionally fails right now for imperial as we have the wrong switch depth for Oxygen. See how useful tests are? On the downside, the test does NOT produce the same plan as Subsurface when I try to create a consistent setup for both - and I have not been able to figure out why. There must be some other parameters that I'm not setting, but I haven't identified them, yet. It's very small differences, for example in the metric case the stops at 21m, 9m, and 6m are each one minute shorter in the test than it what Subsurface calculates. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-02Merge branch 'taxonomy'Gravatar Dirk Hohndel
2015-07-01Geo taxonomy: create some data structures and helper functionsGravatar Dirk Hohndel
This is designed to store taxonomy information for dive sites, including information where the data came from. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01Cmake support: remove a clearly broken lineGravatar Dirk Hohndel
This was intended to help us fine libssh2, but since it works as is now, and the typo makes the entry pointless, I'm pretty sure that this isn't needed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01Introduce CMake support for building for AndroidGravatar Anton Lundin
This is the first step to be able to build Subsurface with CMake for Android. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01Fix NO_PRINTING when printing is disabled in QtGravatar Anton Lundin
Qt for android doesn't have any printing support, so this fixes NO_PRINTING so we can build against a Qt without any printing support at all. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01Group QT-quick options into one blockGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01Re-introduce NO_USERMANUAL for Android buildingGravatar Anton Lundin
This re-introduces the NO_USERMANUAL flag, which is needed due to the fact that Qt-Android doesn't have a WebView to view the manual in. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-29Cmake: missing quotesGravatar Dirk Hohndel
I hate it when I do this Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-29Cmake: another attempt to make things work with libssh2Gravatar Dirk Hohndel
This seems to work on all the systems I was able to test it on. Famous last words. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-29Fix build with libssh from gitGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-27Make sure the output directory is created before we run asciidocGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-21Cmake support: the printer files are part of the UIGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-21CMake support: turn building for mobile into an optionGravatar Dirk Hohndel
This way it can be easily turned on and off from ccmake. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-21Cmake support: fix typoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Add DiveListModelGravatar Grace Karanja
This model will be used to show the dives in QML. This commit adds the model, and the means to link it to QML. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Add QMLManager to the cmakeGravatar Grace Karanja
Build the QMLManager class when compiling for mobile. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Add subsurface-mobile app to cmakeGravatar Grace Karanja
Add a subsurface-mobile entry to the CMakeLists.txt file. When cmake is run with -DSUBSURFACE_MOBILE=True, the compiled app will be named subsurface-mobile, and the initial page (main.qml) will automatically be loaded. This will ensure that the mobile app will be linked to QtQuick. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Cmake support: remove Documentation/images in build dirGravatar Dirk Hohndel
In earlier versions we didn't simply create a link but actually copied the directory and its contents. So for this to work smoothly for people who have built earlier versions of Subsurface with cmake we need to no just remove the link but be willing to recursively remove that directory. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Cmake support: fix in tree buildsGravatar Dirk Hohndel
And add a message that we suggest that out of tree builds are a better idea. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-19Windows installer: include grantlee plugins and printing templatesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-19Allow printing and HTML export to work when running from build directoryGravatar Dirk Hohndel
Yet more things that wouldn't work for a native build under Windows. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-19Printing: fix "if" condition clause in cmake fileGravatar Gehad elrobey
Check for NO_PRINTING instead of checking for NOT NO_PRINTING. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-16Implement a standalone HTML exporterGravatar Dirk Hohndel
This is mostly a proof of concept right now; it shows that it is possible to create a headless server application that exports a git repository based data file as html. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Separate initializing Qt from initializing the UIGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16HTML export: separate UI and logic codeGravatar Dirk Hohndel
In order to be able to initiate an HTML export from the core library we need to separate the actual logic from the UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Move checking the cloud connection into its own filesGravatar Dirk Hohndel
This isn't UI related and shouldn't have been in a file full of UI functionality. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-16Code cleanup: implement window title update via signalGravatar Dirk Hohndel
This seems quite convoluted to me but I can't seem to make a more straight forward implementation work. The idea is that core code should never directly call into the UI. So instead the core code (this is C code) calls a helper function. That helper function calls a member function of a class which in return emits a signal. The UI code connects to that signal and acts accordingly when it is received. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Simplify distance calculationsGravatar Anton Lundin
This simplifies the distance calculations and removes a dependency. This version uses propper math instead of my to simple previous version. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Cloud storage: Require libcurl in order to support http proxiesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-10Add helper function to determine the distance between two pointsGravatar Dirk Hohndel
And use this to find a dive site within a certain radius of a GPS fix. This will be used to figure out if dive sites might be the same. This uses a new Qt5 component (Positioning) which was added in Qt5.2. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>