summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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-20Only include Qt Quick when on mobileGravatar Grace Karanja
In qt-gui.cpp, move the Qt Quick includes so that they will only be used when on cmake SUBSURFACE_MOBILE is True. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Link QMLManager to the main.qml fileGravatar Grace Karanja
Add a link between the C++ and QML parts of the app using the qmlRegisterType function. [Dirk Hohndel: changed the name to org.subsurfacedivelog.mobile] 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 QMLManager classGravatar Grace Karanja
Add a QMLManager class. This class will be used as a link between the C++ and QML aspects of the mobile application. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Add FileOpen dialog to QMLGravatar Grace Karanja
Add a dialog to select dive files in the QML interface, and also add a menu entry to open the dialog. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Hide MainWindow when running under mobileGravatar Grace Karanja
When compiling the mobile version, hide the Qt MainWindow. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Load main.qml on startup for mobile buildsGravatar Grace Karanja
When cmake is run with -DSUBSURFACE_MOBILE=True, the initial window will be main.qml, instead of the MainWindow used when cmake is run with -DSUBSURFACE_MOBILE=False 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-20Add a menu to main.qmlGravatar Grace Karanja
Add a menu with an Exit submenu in the main.qml file. This closes the application when clicked. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Add resource file to hold QML filesGravatar Grace Karanja
Add a resource file to hold any QML files that will be used in the mobile port. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Create empty qt-mobile directoryGravatar Grace Karanja
Create a qt-mobile directory, with a blank main.qml file. This file will be built up-on to come up with a usable mobile interface. 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-20Track minimum datafile versionGravatar Dirk Hohndel
Add infrastructure and helper functions to track minimum datafile version. To make this information useful we need to keep the XML and git data format versions in track moving forward. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Remove defunct qmake supportGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-20Add more Marble bitmapsGravatar Dirk Hohndel
This should deal with most of the QFSFileEngine::open: No file name specified messages. 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-19Merge branch 'custom-print' of https://github.com/neolit123/subsurfaceGravatar Dirk Hohndel
2015-06-19Git storage: change time encoding in directory namesGravatar Dirk Hohndel
We used to use [[yyyy-]mm-]nn-ddd-hh:mm:ss[~hex] in our git storage format for directory that contained dives. Problem with the is that on Windows the colon ':' is an illegal character in a filename. So libgit2 refuses to clone such a repository on Windows. So instead we now always write dive directories in git repositories as [[yyyy-]mm-]nn-ddd-hh=mm=ss[~hex] which replaces the ':' with an '='. Of course we load / parse both formats so that older formats still work. The next time they are written all the names change which causes rather huge commits, but that's the only way I see for cloud storage to work on Windows. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-19Printing: amend some texts capitalization wiseGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19Printing: add support for printing on any page sizeGravatar Gehad elrobey
Make page size and orientation customizable. The user can select any page size and orientation and then the rendering resolution will be calculated based on the selected preferences and the printer DPI. The HTML templates must be responsive, also the font-size must be based on the viewport width so that we don't lose quality. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19Printing: rename the "base" template for consistencyGravatar Gehad elrobey
Change the name of the template "base" to "two_dives" as this name describes it better. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19Printing: use selected print preferences while printingGravatar Gehad elrobey
Having a pointer to the printing_options struct, it should be used to privide the selected options while printing. Print options used ATM: - number of dives per page - template file name - print in colors Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19Printing: pass the print_options struct to TemplateLayout and PrinterGravatar Gehad elrobey
As the print_options struct is needed by both TemplateLayout and Printer class, it can be passed to their constructor. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19Printing: add a "one dive per page" templateGravatar Gehad elrobey
This is a Grantlee template to show 1 dive per page. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19Printing: add a "one dive per page" optionGravatar Gehad elrobey
Add another printing option to the print dialog. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19Printing: render the dive profile on top of QWebViewGravatar Gehad elrobey
We render the dive profile over the QWebView to the QPainter. This helps us not to save the SVG images to disk and then render them again to the webview. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19Printing: fix rendering bug for odd number of divesGravatar Gehad elrobey
Odd number of dives needs extra space from the buttom, so that when we scroll to the last page extra whitespace is shown under the last dive frame, this is fixed by adding a default footer to the base template. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
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-19Enforce planner minimum gas switch durationGravatar Rick Walsh
Enforce a minimum duration for gas switching in the planner. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-19Add planner minimum gas switch duration optionGravatar Rick Walsh
Add the option for a minimum gas switch duration to the planner UI. This is not actually used yet. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-19Use remote transport parameter instead of comparing stringsGravatar Dirk Hohndel
We pass it in, we might as well use it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18Windows support: correct helper function nameGravatar Dirk Hohndel
Apparently no one ever tried to build with an old libgit2 on Windows... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML export: before showing the dive list, sort descending by dive numberGravatar Dirk Hohndel
This way the newest dive gets shown first (which I think makes much more sense) and the dives are in order as we show them in Subsurface. I actually think we should toggle trips on by default - but I'm not sure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML export: cosmetic change to show 20 dives by defaultGravatar Dirk Hohndel
10 just seemed a little... low. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML: Fix spelling mistakeGravatar Gehad elrobey
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18Git storage: don't abort if there is no default user/email setGravatar Dirk Hohndel
I never ran into this because all of my computers have a global default set for my name and email address. But if the user never uses git and has no global settings there will be no such info. Instead of failing we need to just set up a default ID and then try to get a best guess from the OS (just as we used to do before libgit2 supported getting the git settings for authorship). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML exporter: don't try to write to NULL file descriptorGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML standalone exporter: use Subsurface dive numbersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18HTML standalone exporter: give up if parsing the input failsGravatar Dirk Hohndel
There's no point in trying to export after not being able to read the data in the first place. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-18Fix potential crash if the existing filename is NULLGravatar Dirk Hohndel
Should have used same_string() anyway... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Make sure cylinder related data is filled when dives are readGravatar Dirk Hohndel
This is re-run every time we update the dive list model for the UI, but we should run it a first time right after loading the dives so that this data is correct even without the UI running - this way the data in headless standalone applications like the HTML exporter is correct as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17HTML export: corretly show weird imperial tank sizesGravatar Dirk Hohndel
It's not enough to convert the wet volume - you need to multiply in the working pressure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17HTML exports: minor cosmetic improvementsGravatar Dirk Hohndel
This brings up the satellite view when clicking on GPS coordinates and sets a slightly better page title. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Hide the dive-related controls when showing tripsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Make the expand/collapse buttons usefull on tripsGravatar Anton Lundin
There where some issues with trying to access non-existing dom elements when clicking them when showing trips. Instead of fixing that issue, this actually makes them do something useful, expanding and collapsing the trips. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17Remove old timing of functionGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-17HTML standalone exporter: don't setup preferencesGravatar Dirk Hohndel
We don't need them and they can cause the application to crash when called in a git hook. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>