aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
AgeCommit message (Collapse)Author
2015-11-30Style the checkboxGravatar Sebastian Kügler
Using a normal checkbox, we get black text, not our styled Label. Since, short of doing a style, this is the only way to get the label the right color, and thus not screw up the visual appearance of the drawer, we hand-roll it. This is a bit clunky, but I prefer visual continuity here over code complexity concerns. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Easy access to enable/disable location serviceGravatar Sebastian Kügler
Add a checkbox in the global drawer which allows quick access enabling and disabling the location service. This is something the user wants to keep an eye on, quickly enable it before a trip, so it makes sense to give it some prominence. It also helps reminding that the user switched the device into battery-monster-mode. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30The system integrated component is TextAreaGravatar Marco Martin
this will give graphical styling and behavior Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30Align the labels ar rightGravatar Marco Martin
uniform look for forms: labels aligned at the right, fileds at the left Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30use a ScrollView for the main flickableGravatar Marco Martin
It managed the styled scroll indicator and the behavior. Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30sync with mobilecomponents e7d789465b9a935ecGravatar Sebastian Kügler
This fixes lack of spacing in the drawer's menu items. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Align subsurface logo correctlyGravatar Sebastian Kügler
The right hand side of the logo was slightly off of the left orientation line for the rest of the layout. This changes it to Units.smallSpacing, which is used for this kind of spacing. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Smaller topbar, no button in it anymoreGravatar Sebastian Kügler
This change makes the top bar a information/decorational item, not interactive anymore. - The menu at the top-right is redundant, it is provided by the left-hand-side drawer and visually present through the botom-centered control button. - The back button is already provided on Android by default, swiping back in the UI also works, so this button provides a third method to go back -- that's overkill. Less is more. Less top bar means more screen estate for the meat. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Fix left margin in dive listGravatar Sebastian Kügler
Specifying a negative margin means that we negate the margin that the ListItem so carefully figures out for us, don't do that. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Divelist has its own colorGravatar Marco Martin
don't reassign DiveList color upon declaration it's just redundant and error prone Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30sync with mobilecomponents 67e73fa85eGravatar Sebastian Kügler
Colors have slightly changed in breeze. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Simplify dive list itemsGravatar Sebastian Kügler
- Replace the custom text items with the Components' label - Remove now unneeded properties The goal is to use less different font sizes, as to give the listview a calmer and more uniform look. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Add a bit of spacing below the dive detailsGravatar Sebastian Kügler
This achieves two things: - make the contents not seem crammed against the bottom - allow the user to scroll the content above the drawer icon Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29fix contents sizeGravatar Marco Martin
correct childrenRect mistakedly called contentRect Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-29Simple DiveList as initial PageGravatar Marco Martin
Simplify the default page in main.qml: DiveList has everything needed, remove the outside layout and the message bar Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-29sync with mobilecomponents' d3fa79b50b54Gravatar Sebastian Kügler
This fixes the flickering when the drag button hits the right edge. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Add missing iconGravatar Sebastian Kügler
This is the SVG file used on the drag button. Like the other two, it's taken from the Breeze icon set. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Sync with mobilecomponents 54e4f2622aGravatar Sebastian Kügler
This fixes loading the icon. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Remove obsolote Label itemGravatar Sebastian Kügler
We've already ported everything to MobileComponents.Label, so this file can be taken behind the barn, never to be seen again. Signed-off-by: Sebastian Kügler <sebas@kde.org>
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-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-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-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-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-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-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-14Location service: send dive site nameGravatar Dirk Hohndel
Right now this always sends the default name for GPS fixes created by the location service. There isn't much point in making this configurable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-14Location service: make distance and time threshold configurableGravatar Dirk Hohndel
Right now the distance is always in meters, the mobile app doesn't deal with units at all, anyway. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>