aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-11-29Port the page navigation to ApplicationWindow's oneGravatar Marco Martin
The ApplicationWindow component has an internal PageRow for the management of the application's pages, use that instead of an own StackView. Use shared components for common things in the app ListItem for the dive list Page for application pages, for correct background color and moving of the action button Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Sync to mobilecomponents 67cf594b4ddcGravatar Sebastian Kügler
Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Fix reference errors caused by moving properties aroundGravatar Sebastian Kügler
This makes things like accent(Text)Color and our two custom point sizes for fonts resolve correctly again. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29new container for extended theme propertiesGravatar Sebastian Kügler
Move the properties we previously added to units and theme into their own container. This encapsulates these things that belong together and allows us to move it out later without many problems. Also, litter the global namespace a bit less. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Sync with upstream mobilecomponentsGravatar Sebastian Kügler
This updates to the state of bf7914b67c45e Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Rework central navigationGravatar Sebastian Kügler
This patch is the part implementing the drawers and in-app page navigation. In more detail: - main.qml uses the mobilecomponents plugin and the APIs as already changed in the other components - The extended properties have moved into the root item (for now, they'll get properly encapsulated later) - A menu can be swiped in from the left - The application makes better use when used horizontally (if there's enough space, so depending on the display you can get divelist and -details next to each other, one phone/portrait formfactor, the layout stays in a single column. - The options for GPS have been grouped into a submenu This change follows the Plasma mobile human interface guidelines. These changes are actually relatively small considered what they're doing, most of the logic is encapsulated in mobilecomponents' PageRow and *Drawer classes. The previous navigation pattern is actually a subset of this one, so it still works. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Allow to use QML imports shipped in the qrc fileGravatar Sebastian Kügler
This adds qrc://imports to the paths that the Qml engine considers for findings import plugins. This change makes loading the mobilecomponents plugin work (it won't be found otherwise). Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Add banner image for the left drawer menuGravatar Sebastian Kügler
This picture is used for the header part of the drawer which can be swiped in from the left. I'm sure Dirk has a better one, but this works quite nicely until he gets to replace it. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29port these as well to mobilecomponentsGravatar Sebastian Kügler
Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29use mobilecomponents for our pagesGravatar Sebastian Kügler
This is a dumb port of a number of properties to use the new theme and units API. - import the plugin - change accessors from units and theme to MobileComponents.Unit and MobileComponents.Theme Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Add new files to the qrcGravatar Sebastian Kügler
This adds only the bits from MobileComponent that we already use to the qrc file, including two icons go-next and go-previous (2 simple SVG icons taken from the breeze theme). Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29import mobilecomponentsGravatar Sebastian Kügler
This commit adds the .qml and qmldir files for the MobileComponents import. It contains low-level things like units and theme, and mid-level things like Heading, and high-level navigation in the form of an ApplicationWindow and Drawers that hold menues and provide swipe interactions between the pages. These components are a more full version of the "light" plasma components we have been using to make the UI scale well and appear more consistent (coloring, spacing, alignment, etc.). An interesting change is that Units and Theme are now singleton types, which is more efficient. It does mean a few changes to our current API usage: - units becomes Units - theme becomes Theme - 2 properties move out of each (we can't subclass singleton types) This change also means that we're using the vanilla upstream components, so it's very easy to get improvements to these rather young components in, and we don't have to do this work on our own. The mobilecomponents consist of just a bunch of qml files which we can deploy through the qrc file. In the next commits, we will gradually make the current UI use these new elements. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-25Don't overwrite air temperatureGravatar Dirk Hohndel
If we already have an air temperature set, don't overwrite it with potentially less accurate infromation from the first sample. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-25Remove unused codeGravatar Dirk Hohndel
Reported-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Location completion matches on whole nameGravatar Dirk Hohndel
When typing in a partial location name, the match now considers the whole text, not just the start of the text. So typing in "Yell" will match both "Yellow House" and "Mellow Yellow". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Cmake: fix building of Subsurface-mobile on MacGravatar Dirk Hohndel
The error message was completely useless, but it turned out to be an issue of the order of arguments to add_executable(). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Drag and Drop ImagesGravatar Robert C. Helling
Now that we have the possibility to add images without meaningful time stamps to a dive, we should let the user provide that time offset manually. This patch allowed pictures to be dragged from the image list to the profile. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Only close html tags if they were opened beforeGravatar Robert C. Helling
The runtime html table is printed only if printing a verbatim diveplan is disabled. So the closing tags should be printed only in that case. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24CGI script wrapper for smtk2ssrf.plGravatar Robert C. Helling
This script should go to the cgi-bin directory of the webserver to proivide conversion of SmarTrack files as a web service. Paths need to be adopted and more html to make it more beautiful should be added. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Interpret - as STDOUT on writing xml filesGravatar Robert C. Helling
This prepares for the smartrack converter webservice. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Update INSTALL file to reflect new dependenciesGravatar Pedro Neves
The INSTALL file was updated to reflect the need to install qtlocation5-dev (and similar packages on various Linux distros) to prevent build errors with latest master. Signed-off-by: Pedro Neves <nevesdiver@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-23Last set of updates to the user manual in this roundGravatar Wendie Fisher
Once again focus on language and readability. Signed-off-by: Wendie Fisher <wendie@divedad.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-19main.qml: fix crash on native Win32 desktopGravatar Lubomir I. Ivanov
Testing the mobile application on Win32 desktop results in a crash. Using ApplicationWindow for some reason makes the executable enter an inifinity loop on startup until it runs out of RAM. The output is: setGeometryDp: Unable to set geometry 160x1200+720+426 on ApplicationWindow_ QMLTYPE_12_QML_111/''. Resulting geometry: 160x885+720+426 (frame: 4, 23, 4, 4, custom margin: 0, 0, 0, 0, minimum size: 0x47, maximum size: 16777215x 16777215). To fix the crash use "Window" instead of "ApplicationWindow". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> ACKed-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18subsurface-mobile-main.cpp: fix unused variable 'application'Gravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Another missing call to mark_divelist_changedGravatar Dirk Hohndel
Thanks again to Lubomir for finding this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18libdivecomputer.h: fix warning with DC_VERSION on Win32Gravatar Lubomir I. Ivanov
"warning: "DC_VERSION" redefined" is thrown if a chain of includes previously includes windows.h: In file included from c:/bin/mingw/i686-w64-mingw32/include/windows.h:71:0, from C:/bin/qt/5.5/mingw492_32/include/QtCore/qt_windows.h:63, from C:/bin/qt/5.5/mingw492_32/include/QtGui/qopengl.h:43, from C:/bin/qt/5.5/mingw492_32/include/QtQuick/qquickwindow.h:39, from C:/bin/qt/5.5/mingw492_32/include/QtQuick/QQuickWindow:1, from C:/dev/subsurface/subsurface-core/qt-gui.h:13, from C:\dev\subsurface\subsurface-mobile-main.cpp:9: and which on it's own includes wingdi.h which defines "DC_VERSION 10" (windows printer stack related). To solve the warning DC_VERSION is undefined in subsurface-core/libdivecomputer.h. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18applyLocations should be a void functionGravatar Dirk Hohndel
Another issue pointed out by Lubomir. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18gpslocation.cpp: fix signed vs unsinged int comparison warningGravatar Lubomir I. Ivanov
QDateTime::toTime_t() is misleading as it does not return a C time_t type, but a 'unsigned int' or rather the Qt 'uint' typedef. To prevent the warning we cast it to 'time_t' and to comply with the 'lastTime' variable. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Location service: when applying GPS locations mark divelist changedGravatar Dirk Hohndel
Lubomir pointed out that this variable was unused. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Add menu entry for creating GPS locationGravatar Dirk Hohndel
And disable it if there is no satellite based location service (but see the comment in the previous commit - this doesn't appear to work reliably). Nothing happens when you use the menu entry. This just allows us to hook this up later. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Location service: check presence of location sourceGravatar Dirk Hohndel
In theory this should only report a location service if this is a satellite based service, but sadly geoclue appears to claim that there is a satellite based service in my Linux VM - so I'm doubtful that this does what the documentation says it does. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Location service: instantiate location provider in the desktop UIGravatar Dirk Hohndel
We still aren't doing anything with it, but at least it's there now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Location service: move into subsurface-coreGravatar Dirk Hohndel
While this is primarily something targeted at a mobile device, with many of the 2 in 1 devices it is possible that the user might be running the desktop version of Subsurface on a mobile device. As a first step to make it possible to collect GPS fixes on such a device we need to make the infrastructure to do so available in the desktop application as well. This still needs to be hooked up in the desktop UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Location service: make message delivery configurableGravatar Dirk Hohndel
Instead of directly using the status output for the QML UI, set up the function used to display messages to the user as part of the constructor. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Cloud storage: modify protocol for checking cloud connectivityGravatar Dirk Hohndel
In order to allow the backend to match account in multi user mode, it needs to know if the requests are coming from the same instance of Subsurface. Since I had to change the backend to add the ability to retrieve a location service userid I added this capability at the same time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Location service: set user agent stringGravatar Dirk Hohndel
This allows the backend to know which version of Subsurface is contacting it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Cmake: add SUBSURFACE_MOBILE definition earlierGravatar Dirk Hohndel
This way it is set when subsurface-core is built. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18Location service: retrieve the userid using the cloud storage APIGravatar Dirk Hohndel
This should actually not be in the mobile section at all. This needs to be available on the desktop as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18QML UI: remove manual setting of web service useridGravatar Dirk Hohndel
It's just not user friendly to have two different user IDs for two different web services that we provide. Instead in the following commits we'll add a way to retrieve the location service web service userid with your cloud storage user id. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16Make Subsurface-mobile compile againGravatar Dirk Hohndel
This is a quick fix but it changes semantice. Previously weight() gave you the total weight carried, now it just gives you the first weight item on the list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16qthelper.cpp: improve getFormattedCylinder()Gravatar Lubomir I. Ivanov
When the user requests "dive.cylinders" from Grantlee HTML we need to always put at least the default cylinder and mark the description as "unknown" (same as other locations) if it's not set (i.e. when the description pointer is NULL). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16qthelper: also support "maxcns" and "otu" in Grantlee HTMLGravatar Lubomir I. Ivanov
Fixes #962 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16templatelayout.h: expose cylinders and weights in Grantlee HTMLGravatar Lubomir I. Ivanov
This patch adds the following HTML variables: "dive.cylinders" -> Dive::cylinders() "dive.cylinderX" -> Dive::cylinder(X) "dive.weights" -> Dive::weights() "dive.weightX" -> Dive::weight(X) The patch also creates some macros to ease the Dive variable lookup visually. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16templatelayout.h: expose "dive.suit" as a Grantlee HTML variableGravatar Lubomir I. Ivanov
Having {{ dive.suit }} in the HTML will now return the suit as QString (from struct dive->suit). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16qthelper: add means to retreive weight and cylinder info in DiveGravatar Lubomir I. Ivanov
The Dive helper class only picks the first cylinder and the total weight. This patch adds the option to dump the cylinders and weights as formatted lists (via cylinders() and weights()) or to retrieve a specific cylinder or weight via (cylinder(index) and weight(index)). Each cylinder and weight string contains detailed information: cylinder: - desc. - pressure (+start/end) - gasmix - etc... weight: - desc. - weight (in units e.g. kg) If no description is found for a cylinder or weight the contents for this particular unit is filled with EMPTY_DIVE_STRING ("--"). Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16qthelper.cpp: define EMPTY_DIVE_STRINGGravatar Lubomir I. Ivanov
The macro is used as a common replacer for the "--" string when the Dive class members return no particular information for a "struct dive" property. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16CMakeLists: use correct 'desktop-widgets' pathGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-16dive.c: fix a couple of comment typosGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-15Parse html links in the Notes section.Gravatar K. \"pestophagous\" Heller
In the spirit of "Do the simplest thing that could possibly work": capture Ctrl+leftclick mouse events in the Notes area. If the string under the clicked position is a valid url, then launch it. Many common URI schemes will work. Typing a url that starts with https:// will work. So will mailto: and file:// See #733 Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-15Make "Save Preferences" button mutate "prefs" struct.Gravatar K. \"pestophagous\" Heller
Clicking Save in the preferences dialog will now cause the GUI to immediately reflect the latest settings (just as it behaved in 4.5). Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>