aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
AgeCommit message (Collapse)Author
2015-11-14QML UI: userid is stored in General settingsGravatar Dirk Hohndel
Not inside the CloudStorage group. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-14QML UI: actually store the userid settingGravatar Dirk Hohndel
Forgot to hook this up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13Location service: upload GPS fixes to webserviceGravatar Dirk Hohndel
With this Subsurface-mobile should be able to mostly replace the companion app. This needs some more testing and fine tuning (for example the minimum time / distance should be configurable, there should be a location name), but I think the hard part is done now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13Location service: add ability to delete all stored GPS fixesGravatar Dirk Hohndel
This may need an "are you sure" confirmation dialog... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13Location service: Correctly access the last stored GPS fixGravatar Dirk Hohndel
Now only storing fixes after a certain time / distance actually works. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13QML UI: add preference for webservice user idGravatar Dirk Hohndel
This handles the user id for the Subsurface webservice for GPS location tracking. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13Location service: only request a fix once every 5 minutesGravatar Dirk Hohndel
This should prevent the device from draining battery like crazy. This is not the same as the interval at which we record fixes - getting a fix every 5 minutes gives us a better chance to notice when we moved the minimum distance. Also add some more comments to the code that does the actual handling of storing the data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13Location service: make persistant storage work correctlyGravatar Dirk Hohndel
Ouch that's an embarrassing bug. Oh well. Shift happens. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13Location service: report number of recorded GPS fixesGravatar Dirk Hohndel
This is mostly for debugging, to make sure that the recording of GPS fixes works as expected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12Location service: apply the saved GPS fixes to dive listGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12Location service: add member to apply the gps locations to divesGravatar Dirk Hohndel
This is a direct conversion of the existing code in subsurfacewebservices to the different data structures in use here. I did not try to abstract this out to have both share a common helper because I assume that the Subsurface web service will pretty quickly become obsolete (together with the companion app). Right now this is not hooked up anywhere. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12Location service: move GPS data to separate QSettings instanceGravatar Dirk Hohndel
This way we don't clutter the main settings and we don't have to deal with making sure we are reading and writing from/to the right group. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Fix label overflow in divelistGravatar Sebastian Kügler
- anchor the label to the left of the date field - elide the text instead This fixes the bug in the dive list where the dive's location overflowed over the date, especially visible on phones in portrait mode. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Cache diveprofile widget in the diveprofile QtQuick itemGravatar Sebastian Kügler
- paint() can become a hot path, especially when we think about repainting the item on size changes. In general, it's a really good idea to keep this function as fast as possible, as we want to be able to repaint the item when needed. Also, ProfileWidget is pretty heavy to set up, so rather spend a bit of memory there. - Rename profile to m_profileWidget, it already was member var. - Sizing ... I have to admit I don't understand the rendering of the ProfileWidget. I'd like it to do the following things: - render at native resolution, we don't want to resize it - react to item changes - we want to reset the size and re-render the widget into the item in those cases - perhaps be able to use a couple more of the profilewidget's features Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Rework divedetails pageGravatar Sebastian Kügler
- Styled texts - don't put all the properties of the text items in one long line, makes the code more readable and is in line with coding style used throughout. - button and profile move into their own items, button moves to the right (it's more of a contextual item, so it's better placed top right, further more, a control is generally easier to reach on the right without covering information unnecessarily. Code-wise, it's also a more logical encapsulation. - dpi-aware sizing of dive profile, use units.gridUnit instead of hard-coded pixels. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Use styled text items in divedetailsGravatar Sebastian Kügler
Using Label instead of text gives us consistent coloring and styling of the text labels. Also remove the boldness to make it comply to the design language used. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Simplify anchoring in divedetailsGravatar Sebastian Kügler
anchors.fill does essentially the same, as the item is positioned at 0,0 of the parent by default. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11dpi improvements for small textGravatar Sebastian Kügler
- word-wrap and style the log message at the bottom, this should fix clipping of error messages down there - introduce units.smallPointSize, which defines a small font size to use for toned-down display elements (e.g. the date in the dive list) - No need to assign the default value to Text.text Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11kill warningGravatar Sebastian Kügler
This line seems to be a left-over from a refactoring. It doesn't do anything, just produces a warning, so just remove it. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Location service: only store gps fix after certain time or distanceGravatar Dirk Hohndel
This should be configurable in the preferences at some point. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Location service: store locations in settingsGravatar Dirk Hohndel
This is rather simplistic and will clutter the settings. I'm not convinced this is the BEST way to do this, but it's a rather straight forward way to get persistant storage of the location fixes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Location service: toggle the service from the main menuGravatar Dirk Hohndel
That way we don't track the user's location until explicitly asked to do so. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Location service: move location provider into QML managerGravatar Dirk Hohndel
Since we want to be able to toggle it from the QML UI that seems like a better place for it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Location service: consistent way to output informationGravatar Dirk Hohndel
qDebug is nice when testing on the desktop, but it has to go to the message area on an Android device to make things easy. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11Location service: move files around to fit new directory layoutGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08Android: remove duplicate top bar from log windowGravatar Joakim Bygdell
The log page have an extra top bar that is not needed. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07fix startpage appearing over dive listGravatar Sebastian Kügler
Use the view, rather than the model to check if the list is empty. This allows us to use the property notifiers rather than a function call, and hence fixes updating the visibility of the startpage when the listview gets filled (or emptied). Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Flip visibility when opacity is 0Gravatar Sebastian Kügler
This makes sure we don't accept any input from the startpage when interacting with the divelist -- they're really mutually exclusive. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Improve labels in login dialogGravatar Sebastian Kügler
We want short labels here in order to allow more horizontal space to be taken by the inputs. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Improve TopBar and login window layoutGravatar Sebastian Kügler
This provides a bit more spacing around the logo and aligns the text to the bottom of the logo, rather than to its horizontal center. Looks cleaner. Text in the login page is now aligned towards the inputs, giving a closer connection between label and widget. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07tighter margins on start pageGravatar Sebastian Kügler
We use units.largeSpacing margins for page-level spacing. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Rejig navigationGravatar Sebastian Kügler
This change streamlines the navigation across the pages to be in line with the stackview organization. The top bar becomes a static element with the title and a button that either opens the preferences or shows the back arrow. This makes it a bit more efficient, since we load the title bar only one, and there are no strange animations in the title. The stackview gets the role of content container, the "chrome" around it is laid out in main.qml. Most of the churn in this patch comes from moving large blocks of code between files with different indentation levels. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Remove hard-coded size from label componentGravatar Sebastian Kügler
This isn't necessary anymore with the default font size fixed, remove it. The label itself is still useful for coloring, and perhaps more styling in the future. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Clean up dead code in unitsGravatar Sebastian Kügler
Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Improve 1st start experienceGravatar Sebastian Kügler
This commit adds a start page that is shown when there are no dives in the list, for example when the user first starts the app. Instead of a large empty screen, we offer 3 ways for the user to get dives onto the device: download from cloud storage, dive computer and adding dives manually. This fills in the empty space in the dive list, and isn't a top-level item since it really just makes sure the user isn't greeted with a big empty space, which looks pretty unpolished, but rather guided through the first steps. Needs aligning of the naming in the actions. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Improve layout of login dialogGravatar Sebastian Kügler
- Add margins consistent with other pages - Top-align the dialog, we want to keep the inputs as high as possible on the screen to prevent the on-screen-keyboard from covering them - Add a checkbox to show the password, with input on mobile devices, this is a commonly found and useful feature - Remove Cancel button, this is just navigation chrome, the user can simply use the back button in the top bar (will be fixed in a subsequent patch) Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07organize qml files in subdirectoriesGravatar Sebastian Kügler
This makes the organization of the qml files a bit more fine-grained, it prevents mixing of .cpp and QML files, and also of what's compiled, and what's included in the app as qrc data. In particular: - subsurface specific QML items go into the qml/ subdirectory - theme and unit definitions to into qml/theme subdirectory (they already were located in a theme directory) - generic components, such as our Label goes into qml/components This facilitates sharing of functionality and identifying common stuff better. Ideally, we can pull qml/theme and qml/components from a standardized set at some point, so we don't have to maintain that code. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Fix indentation in qrc fileGravatar Sebastian Kügler
Tabs slippped in while the rest of the file uses spaces. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06More info in ThemeTestGravatar Sebastian Kügler
This makes problems with the default font more apparent Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Improve theme information panelGravatar Sebastian Kügler
- add sizing information for fonts and fontmetrics - compute devicePixelRatio from fontmetrics This shows that Android doesn't give us accurate information about the default font (hence the Text items being way too small) and a wrong Screen.devicePixelRatio, which we can actually compute ourselves. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Include label in the binaryGravatar Sebastian Kügler
Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06new Label itemGravatar Sebastian Kügler
Add a Label that we can use for styled text until we figured out how to set the default font size. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Theme tweaksGravatar Sebastian Kügler
- gridUnits is dynamic again, using FontMetrics now - Add a page to display some sizing-relevant details, so we can debug dpi problems a bit better on Android Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Replace units.spacing with units.smallSpacingGravatar Sebastian Kügler
In line with the new Units API. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Add some compatibility extensions to theme and unitGravatar Sebastian Kügler
- This allows us to use these new things without changing much in our own code, things now work again. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Add qmldir fileGravatar Sebastian Kügler
This will be needed at some point, so better put it in the right place already, so we don't forget enabling the singleton usage once we've fleshed out how that could work exactly. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06some changes from the upstream wip-branchGravatar Sebastian Kügler
- remove the singleton usage, this will need a bit more magic in the background. Not a huge problem since we're only using one instance anyway, and the object itself is rather light - hardcode gridUnit for now. I'd like to use TextMetrics or FontMetrics there directly, but I'm not sure we can depend on Qt 5.4 and QtQuick 2.5. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06more complete implementation of Plasma's UnitsGravatar Sebastian Kügler
This is a currently work-in-progress attempt at making a minimal set of Plasma components available. The code needs a bunch of adjustments yet, which I'm making in tune with upstream. The idea is to create a standardized sub-set of Plasma's QML API for applications, which brings only minimal new dependencies (for now: none). Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05QML-UI: find the include filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09QML-UI: Layout improvements in app list and details headerGravatar Sebastian Kügler
- fix spacing and sizing in TopBar - use an anchor layout for the delegate and split out labels and values: this allows more uniform alignment - add the subsurface mobile icon to the first page - various visual touch-ups to taste Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>