aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml
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-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-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: 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: 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-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-12Location service: apply the saved GPS fixes to dive listGravatar Dirk Hohndel
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-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: 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-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>