summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
AgeCommit message (Collapse)Author
2015-06-04Printing: Remove more obsolete code from printlayoutGravatar Gehad elrobey
This code can be removed as we don't need QT printing code anymore. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: Change "NEW_PRINTING" to "NO_PRINTING"Gravatar Gehad elrobey
If NO_PRINTING is not set, subsurface will require grantlee during building. As Grantlee will be a hard dependency for Subsurface, so no Grantlee means no printing. [Dirk Hohndel: switched default for NO_PRINTING to ON] Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: Add Printer class that holds the rendering logic.Gravatar Gehad elrobey
Render Html pages into a QWebView then print it using QPainter. the Printer::print() is called that prepare the HTML file to be rendered by the QWebView. Printer::render() will do the rendering task. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Printing: Add TemplateLayout classGravatar Gehad elrobey
This is the main class to hold Grantlee engine logic. TemplateLayout::generate() loads QT5Grantlee and initialize the templates then returns a QString that contains the rendered HTML by Grantlee library. Also this class contains the Dive class which holds the logic that formats the data before passing it to the templates. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04Cmake: add optional pkg-config for GrantleeGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-04CMAKE: Require Grantlee libraryGravatar Gehad elrobey
-find Grantlee package -install the printing_templates directory Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Cmake: handle the case of local libgit2 but pkg_config for libssh2Gravatar Dirk Hohndel
Yes, it's kinda weird but that's what I happen to have on one of my systems and this seems easy enough to implement. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-03Use CMake to find libssh2Gravatar Tomaz Canabrava
This works on my system, I hope I don't break others. Another possibility is to pass -libssh2 directly if it's NOTFOUND. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-01Cloud storage: only make this available with new enough libgit2Gravatar Dirk Hohndel
The credential callback doesn't appear to work (at least not the way I implemented it) with v0.22 and earlier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29LocationInformationModel moved to qt-modelsGravatar Tomaz Canabrava
I forgot about this one, and we are going to use it in the mobile version too. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DivePlotDataModel to qt-modelsGravatar Tomaz Canabrava
I think with this one I'm finished. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DivePictureModel to qt-modelsGravatar Tomaz Canabrava
This class will surely be used on the mobile version, and it was very tangled inside divepicturewidget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move ProfilePrintModel to qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move TablePrintModel to Qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DiveTripModel to qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move the YearlyStatisticsModel to qt-modelsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move TreeModel to qt-modelsGravatar Tomaz Canabrava
TreeModel is the base of some important models in Subsurface, the statistics model and the dive list models, this second is the most important one in the whole Subsurface universe. This commit is another one in the series to make easy to create a mobile version of Subsurface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DiveComputerModel to qt-modelsGravatar Tomaz Canabrava
Another attempt to make it easyer to create the mobile version of Subsurface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move ExtraDataModel to qt-modelsGravatar Tomaz Canabrava
Another attempt to make it easyer to create the mobile version. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move WeightModel to qt-modelsGravatar Tomaz Canabrava
One more step to make it easyer to port the app to Mobile. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move WeigthSystem Info model to qt-modelsGravatar Tomaz Canabrava
This is another effort to make it easyer for the mobile interface of Subsurface. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move Tankinfomodel to its own fileGravatar Tomaz Canabrava
Another change to make it easier to program the mobile ui. This was a fairly easy patch: just moved the contents of the file and fixed the includes. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move DivePlannerModel and CylinderModel to qt-modelsGravatar Tomaz Canabrava
Still trying to make it easier for the Mobile Port: This patch is a bit bigger than I hopped, but it was the smallest that I could get. A lot of TODO items where added where I broke the code because the current implementation would break the QML implementtion on the designer. I'll most probably fix those myself when I finish the transition to the models to the new folder. I only moved both models at once because there's an interdependency between them (seems inevitable, tough, but I'll take a better look at it later). Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move CleanerTableModel to its own fileGravatar Tomaz Canabrava
models.h / .cpp was getting too big (around 2.5k lines), and each change triggered a rebuild in tons of parts of Subsurface, this is the first commit trying to make the models code sane by removing them all of the models.h/cpp file and also clearning code in the process. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Move the models to its own folderGravatar Tomaz Canabrava
This is an attempt to help share code between the desktop version of Subsurface and the mobile version. More code will be moved around and the models will be split in a way that will help recompile times and also creation of different interfaces for different form-factors. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-28Add USE_LIBGIT23_API as cmake optionGravatar Dirk Hohndel
Just as we would expect, the libgit2 developers of course once again broke their API. In order to compile against current master we need to remap those APIs once again. Simply call cmake with -DUSE_LIBGIT23_API Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-25Use group of files to show the project hierarchyGravatar Tomaz Canabrava
This doesn't work on QtCreator yet - but it's the documented way in CMake to display the project hierarchy in some IDEs (the one that I know that it works with is Visual Studio). Even knowing that this doesn't work with QtCreator, it's a valid change because someone can fix creator in the future. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17Add a new class, QtWaitingSpinner, MIT Licensed.Gravatar Tomaz Canabrava
from https://github.com/snowwlex/QtWaitingSpinner Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17Move Locationinformation to its own file.Gravatar Tomaz Canabrava
The SimpleWidgets file was getting too big, and location information will also need a new model - a good way to do not mix everything is to put things in a new file. [Dirk Hohndel: added missing include of stdint.h] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-01cmake: enable Facebook supportGravatar Dirk Hohndel
Not sure if we have this on Android, so right now I just enable it for Linux, OS X, and Windows. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-28cmake: missing spaceGravatar Dirk Hohndel
This caused cut to fail and the whole dll dependency calculation went wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-26CMake needs hints that this will be a win32 or a mac bundle.Gravatar Tomaz Canabrava
MACOSX_BUNDLE and WIN32 give hints to cmake for different install behaviors. for instance, trying to copy frameworks and other stuff to the correct places. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24cmake: don't always build testsGravatar Dirk Hohndel
Only build the tests when running them. The downside of the way this is implemented is that build errors for the tests actually show up as test errors and are only seen in the test log - but this seemed worth not having every build include the tests. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24cmake: copy images / icons into the build Documentation folderGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24cmake: include the git SHA in the Windows installer nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-21cmake: fix finding MarbleGravatar Dirk Hohndel
Silly bug. A lot of things in cmake are case insensitive. Some care about case. Stupid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: more consitent multi-line callsGravatar Lubomir I. Ivanov
- don't put anything on the first line after the opening "(" - fix indentation of the closing "(" Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: use uppercase for defined macrosGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: fix message for NO_MARBLEGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: lowercase all built-in callsGravatar Lubomir I. Ivanov
e.g. SET() -> set() ELSEIF() -> elseif() Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: generate clean ssrf-version.hGravatar Lubomir I. Ivanov
remoevs the extra white sapce in the generated ssrf-version.h. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-18cmake: whitespace cleanupGravatar Lubomir I. Ivanov
- indentation - spaces near comments Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add LIBGIT2_FROM_PKGCONFIG and LIBDC_FROM_PKGCONFIGGravatar Lubomir I. Ivanov
These two new options allow usage of pkg-config to retrieve libdivecomputer and libgit2. For some reason the variables *_LIBRARIES have to be set to blank strings in the process, otherwise "-l" is passed to the linker. LIBGIT2_FROM_PKGCONFIG is a rename from PREFER_GIT_FROMSOURCE for consistency. The IF() check is also fixed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add the NO_MARBLE optionGravatar Lubomir I. Ivanov
If NO_MARBLE is set to ON, the MARBLE package is not seeked. If set to OFF the package is seeked, but if the find fails the gcc definition -DNO_MARBLE is set and marble is disabled. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-17cmake: add the NO_TESTS NO_DOCS optionsGravatar Lubomir I. Ivanov
NO_TESTS: disable the tests NO_DOCS: disable the docs Both are set to OFF by default. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-16cmake: fix bug when using system libgit2Gravatar Dirk Hohndel
Simple omission in commit 7596db28b5ad ("cmake: allow looking for optional libraries"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-16cmake: add extra -lpthread to fix Ubuntu buildsGravatar Dirk Hohndel
We shouldn't need this. Ubuntu is once again broken. What else is new. But since this shouldn't hurt any of the sane Linux version, I'll just add it for any Linux flavor. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-14cmake: remove references to LRELEASEGravatar Tomaz Canabrava
This is being taken care by Qt5::LinguistTool Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: try to find the macdeployqt programGravatar Dirk Hohndel
There is no variable for it, but we can abuse the variable that shows us where moc is located. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-10cmake: improve test for variableGravatar Dirk Hohndel
CMake still confuses me. When testing if a variable was set it sometimes needs to want "DEFINED", but sometimes I need to compare it to an empty string. Let's do both (this seems to fix the problem I ran into) - but this is still weird. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>