Commit graph

297 commits

Author SHA1 Message Date
Sebastian Kügler
5efb145cb6 Fix text wrapping in log viewer
Apparently, the width setting got lost in the previous change. This sets
the width of the log text explicitely to the grandparent's width. It
fixes text clipping in the log window.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 00:11:32 +01:00
Dirk Hohndel
3d7475b964 QML-UI: add dive date to the detail view
That one really bugged me...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07 14:59:52 -08:00
Sebastian Kügler
0a22b340e9 simplify and style log page
- less instantiated objects inside each other
- add page heading
- allow wrapping of text

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 23:28:57 +01:00
Sebastian Kügler
96470d7dbf Fix styling in Preferences page
- styled labels from MobileComponents
- secondary header becomes smaller

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
25e83a11e7 Fix text clipping 2015-12-07 18:46:57 +01:00
Sebastian Kügler
04b6446e72 redesign dive details view
This change cleans up the layout optimized for viewing dive details. The
top part contains brief and essential dive info (location, depth,
duration, dive no.), then the profile, then a table with more details,
and finally the notes.

The goal here is to present the dive's data more efficiently and
attractively now that the edit part is factored out.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
936c9cee1f Add more icons
Icons for document-edit, document-save and view-readermode are added
from the light breeze variant. They're usd in the dive's contextual
actions.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
de5bb98dba dive edit gets contextual actions
Option to switch between view and edit and to save the changes are now
in the context drawer. Let's see how this works out.

If it turns out to be badly discoverable (which is what I'm worried
about), this needs to be fixed at component level.
2015-12-07 18:46:57 +01:00
Sebastian Kügler
610ce4325f noise--
Kill print in DiveList's startpage.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
cb77548f9b add context drawer component to the qrc file
It's now needed in main.qml.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
49eb7d841d add a contextdrawer
This item can be dragged in from the right hand side and provides
contextual actions for a page. It will be used in the dive details edit.
If there are actions, the floating button on the bottom shows an arrow
indicating that one can drag it in from the right hand side to the left.

Also clean up a bit of a noisy print that's not needed anymore.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
8cf4725742 split divedetails into view and edit parts
This splits the dive detail page into two modes: view and edit

- The edit part loses the profile (it's not editable anyway)

- The view part gets a new layout, friendlier for viewing

- Properties for diveNumber, duration, depth and weight are added

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
bd7af5a511 state machine controls edit/view dive details
This is the first part of splitting the dive details into edit/view
modes.

- introduce a state machine to switch between view and edit mode

- factor out the editor into its own component

Both components are almost the same, but we can change them individually
now.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
54da517e9d Styled heading in startpage
We have a specific component for headings now, use it for consistency's
sake.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
b6f5f235f0 sync with mobilecomponents 9d8bf6d77d
- Fixes interactivity in context drawer.

- These are mostly cleanups that have been done pre-merge of these
components. This now is the state of master in plasma-mobile.

- makes navigation a bit more intuitive

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
72411eee63 Fix indentation
It's a bit all over the place. This makes it consistent and aligned.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
d9cfdc3b69 Better theme information page
Bit nicer layout so my eyes don't insta-bleed when checking this page.
Also add information about the size of the rootItem, that's really
useful to know what kind of constraints we're dealing with.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:43:25 +01:00
Dirk Hohndel
b5fcfc8867 QML-UI: a small bit of reindentation
For consistency. Still not sure what the best scheme is. QtCreator wants to be
pretty aggressive with how far things are indented. Not sure I'm in love with
that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-05 06:42:10 -08:00
Dirk Hohndel
5588268cb2 QML-UI: remove duplicate "Run location service" menu entry
We only need this once and having it at the bottom of the menu with the
indicator whether it's on or not is much nicer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-05 06:36:16 -08:00
Dirk Hohndel
c9dbb424f2 QML-UI: delete unused code
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-05 06:29:06 -08:00
Dirk Hohndel
703c3de880 QML-UI: mark email entry field as such
I hoped that this would show the "email keyboard" on Android that includes the
'@' sign without having to switch layers but that didn't seem to work. I'll
leave this here, anyway, as it seems like the right thing to do since this
input field is indeed for an email address.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-05 06:27:06 -08:00
Dirk Hohndel
091d099368 QML-UI correct cut and paste error
Stupidly the wrong functions were connected to the signals.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-04 20:39:12 -08:00
Dirk Hohndel
fd78f8dc1a QML-UI: re-architect the way we access network resources
We really need to verify that the credentials are valid before trying to access
our backend resources. Trying to do so in a clean manner caused quite a bit of
changes to how we retrieve the webservice userid and how we load the dive list
from cloud storage.

So instead of accessing the network resources directly, this adds a handler
function that first checks the validity of the credentials (by using the
rederict handler on the cloud server), and only calls the function that does
the actual work (looks up the web service userid, loads the dives) if that
succeeds.

Right now there is no good user feedback mechanism - this just gets logged on
the log page. But this is a massive improvement if there are issues with
network connectivity or if the user mistyped their credentials.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-04 19:51:35 -08:00
Dirk Hohndel
4266600254 QML-UI: use consistent capitalization
Throughout Subsurface we try to only capitalize the first word of every menu or
window text (unless there are other reasons to capitalize the word, of course).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-04 19:51:20 -08:00
Dirk Hohndel
a600253e62 QML UI: log the text shown on the log page
Sadly this doesn't work, even though it appears to be the thing to do based on
the documentation.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-04 19:50:54 -08:00
Dirk Hohndel
b0063e5d1a QML-UI: use our styled elements
This gets us consistent look and feel as otherwise the labels aren't styled the
same as for the rest of the application.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03 17:57:25 -08:00
Dirk Hohndel
2fc99092fb QML-UI: replace the two ways to log progress with one
The logging to the UI didn't work anymore since the message area had been
removed in commit 8646934ba3 ("Simple DiveList as initial Page").

This way all the updates simply land on the Log page.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03 16:01:17 -08:00
Dirk Hohndel
d20e25419f QML-UI: make Log page scrollable
I noticed when sending a bunch of debug output to the log that it didn't scroll
and that seemed wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03 15:55:08 -08:00
Dirk Hohndel
2413f23cd5 QML-UI: open cloud storage once credentials were entered
This makes for a much more friendly first use experience:
Open Subsurface-mobile, enter your cloud credentials, tap on Save and you see
your dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03 14:54:30 -08:00
Dirk Hohndel
a0b83dc2f1 QML UI: different functions for saving Preferences and Cloud Credentials
Tapping Save on those two pages should only update the data that are actually
available on those pages.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03 14:30:30 -08:00
Dirk Hohndel
7a94360a6d QML-UI: Split cloud credentials and other preferences
This makes the cloud credential entry page much simpler, separate page. It also
removes the two colums and uses the label of the check box instead of having a
separate label item.

The preferences page of course also gets simpler by doing this. Here I kept the
two columns, though.

Finally the code for the old context menu was removed - not sure why this was
still here.

Next I need to fix the savePreferences() call to do the right thing in each
case.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03 14:11:30 -08:00
Dirk Hohndel
f17041e1cb QML-UI: refuse to save to cloud unless you loaded from cloud, first
This prevents people from overwriting a perfectly fine repository with an empty
one. Typically happens when you first enter your cloud credentials and then
don't Load Dives right away.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02 18:49:02 -08:00
Dirk Hohndel
789c32bf4c QML UI: if load fails, don't continue processing data
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02 17:50:47 -08:00
Dirk Hohndel
1bfcf5c0f8 QML UI: fix profile scaling
The scaling needs to happen before we draw the profile on the viewport, not
before we render that viewport into the pixmap. This is why prior to this patch
the first time the profile was rendered it was way off, but then if it got
re-rendered things worked better. I'm still not 100% happy with the size and
position of the profile, but this is a huge improvement.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02 11:28:35 -08:00
Joakim Bygdell
84a47c0cb4 QML-UI: Remove button from dive details
The button to hide the dive profile serves no purpose anymore.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02 10:36:17 -08:00
Dirk Hohndel
c0ac953242 QML UI: call plot dive when we set the dive
The asynchronous nature of the profile bites us here. plotDive() signals
that it changes model data and expects the rest of the data structures to
respond to that. Very neat and it seems to work perfectly well on the
desktop, but on Android calling render() right after plotDive() resulted
in paint() functions being called before all the elements had been
calculated as a result of the signals being emitted in the model change.
That's why so often the profile was missing parts.

Now admittedly this makes me nervous. Do we now know that all calculations
have finished by the time render() gets called? Not really. It just seems
that in my testing we tend to get lucky and things work out. But that does
not feel like a sane architecture to me.

Messing around with the animation speed is silly as we render the profile
into a pixmap, so let's turn this off globally.

Also, the scaling of the pixmap is still completely bogus.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01 15:32:16 -08:00
Dirk Hohndel
dcce7358ff QML-UI: make sure errors make it to the log
get_error_message() clears the error message in the process, so calling it
twice in a row does not do what you might think it does.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01 09:37:47 -08:00
Dirk Hohndel
da2da116b5 QML UI: add number of loaded dives to log
This way we can see if loading dives succeeded at all.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01 09:15:40 -08:00
Dirk Hohndel
f6ae8bf3ea QML UI: don't load dives before the UI has been instantiated
This should deal with a big part of the delay when starting the app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30 10:15:04 -08:00
Dirk Hohndel
2f2e9da2cd Clear the Dive model before repopulating it
Otherwise we could get duplicate dives in the dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30 10:09:46 -08:00
Sebastian Kügler
f8fb9181b2 sync with mobilecomponents 68c6dc9
This fixes spacing around the icon in the left drawer, the stretched-out
icons in the navigation menu, the unnecessary scrolling in the same
menu, and a few other things.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30 02:53:21 +01:00
Sebastian Kügler
6381c2eb2a improve preferences layout
- Use the component's heading for more consistency

- spacing between items: largeSpacing above, half of that below, this
  makes the title visually connect to the widgets it refers to.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30 02:43:40 +01:00
Sebastian Kügler
5f40ac6da3 Style the checkbox
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-30 02:43:40 +01:00
Sebastian Kügler
c5722773d2 Easy access to enable/disable location service
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-30 02:43:40 +01:00
Marco Martin
fd3bb4a84d The system integrated component is TextArea
this will give graphical styling and behavior

Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30 02:43:40 +01:00
Marco Martin
0926776877 Align the labels ar right
uniform look for forms: labels aligned at
the right, fileds at the left

Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30 02:43:40 +01:00
Marco Martin
cf9476c74e use a ScrollView for the main flickable
It managed the styled scroll indicator and the
behavior.

Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30 02:43:40 +01:00
Sebastian Kügler
09bf7fabcf sync with mobilecomponents e7d789465b9a935ec
This fixes lack of spacing in the drawer's menu items.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30 02:43:40 +01:00
Sebastian Kügler
52b3c68b24 Align subsurface logo correctly
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-30 02:43:40 +01:00
Sebastian Kügler
e12c784db4 Smaller topbar, no button in it anymore
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-30 02:43:39 +01:00
Sebastian Kügler
f4906abf59 Fix left margin in dive list
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-30 01:07:42 +01:00
Marco Martin
13f78743c6 Divelist has its own color
don't reassign DiveList color upon declaration
it's just redundant and error prone

Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30 00:04:10 +01:00
Sebastian Kügler
b96f202f14 sync with mobilecomponents 67e73fa85e
Colors have slightly changed in breeze.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30 00:03:02 +01:00
Sebastian Kügler
78d5325dda Simplify dive list items
- 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-29 23:59:49 +01:00
Sebastian Kügler
95c5b35583 Add a bit of spacing below the dive details
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-29 23:58:49 +01:00
Marco Martin
8e523329b6 fix contents size
correct childrenRect mistakedly called contentRect

Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-29 23:58:49 +01:00
Marco Martin
8646934ba3 Simple DiveList as initial Page
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-29 23:58:49 +01:00
Sebastian Kügler
609d138a49 sync with mobilecomponents' d3fa79b50b54
This fixes the flickering when the drag button hits the right edge.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29 22:24:34 +01:00
Sebastian Kügler
33d589ff5c Add missing icon
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-29 22:21:31 +01:00
Sebastian Kügler
e0fc5268fe Sync with mobilecomponents 54e4f2622a
This fixes loading the icon.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29 22:13:52 +01:00
Sebastian Kügler
ffb2c6014e Remove obsolote Label item
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-29 22:13:52 +01:00
Marco Martin
32219f1276 Port the page navigation to ApplicationWindow's one
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-29 21:59:48 +01:00
Sebastian Kügler
3d3fce7152 Sync to mobilecomponents 67cf594b4ddc
Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29 21:24:55 +01:00
Sebastian Kügler
6580f078d0 Fix reference errors caused by moving properties around
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-29 19:22:10 +01:00
Sebastian Kügler
8fad349c82 new container for extended theme properties
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-29 19:09:59 +01:00
Sebastian Kügler
5e5c9830a4 Sync with upstream mobilecomponents
This updates to the state of bf7914b67c45e

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29 18:57:50 +01:00
Sebastian Kügler
6ffef818a8 Rework central navigation
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-29 17:51:14 +01:00
Sebastian Kügler
c302f222ce Add banner image for the left drawer menu
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-29 17:41:16 +01:00
Sebastian Kügler
3c1d7c0074 port these as well to mobilecomponents
Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29 17:30:41 +01:00
Sebastian Kügler
2668da3f60 use mobilecomponents for our pages
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-29 17:27:20 +01:00
Sebastian Kügler
4d94441b6d Add new files to the qrc
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-29 17:23:47 +01:00
Sebastian Kügler
b59cdcd4d3 import mobilecomponents
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-29 17:13:13 +01:00
Lubomir I. Ivanov
daf8f36dd4 main.qml: fix crash on native Win32 desktop
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-19 07:55:00 -08:00
Dirk Hohndel
b619b39fdd Another missing call to mark_divelist_changed
Thanks again to Lubomir for finding this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18 19:26:07 -08:00
Dirk Hohndel
456cc3955a Location service: move into subsurface-core
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-18 18:34:49 -08:00
Dirk Hohndel
0b804e5b21 Location service: make message delivery configurable
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-18 18:10:58 -08:00
Dirk Hohndel
d9ded26b86 Location service: set user agent string
This allows the backend to know which version of Subsurface is
contacting it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18 14:44:07 -08:00
Dirk Hohndel
74b15922f3 Location service: retrieve the userid using the cloud storage API
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-18 13:14:19 -08:00
Dirk Hohndel
18e52c1da4 QML UI: remove manual setting of web service userid
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-18 13:12:34 -08:00
Dirk Hohndel
b688f417de Location service: send dive site name
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-14 09:39:20 -08:00
Dirk Hohndel
76d0763527 Location service: make distance and time threshold configurable
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-14 09:10:06 -08:00
Dirk Hohndel
24404a401d QML UI: userid is stored in General settings
Not inside the CloudStorage group.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-14 09:08:51 -08:00
Dirk Hohndel
df6c73d503 QML UI: actually store the userid setting
Forgot to hook this up.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-14 09:07:14 -08:00
Dirk Hohndel
7afed04520 Location service: upload GPS fixes to webservice
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-13 17:21:43 -08:00
Dirk Hohndel
577da54454 Location service: add ability to delete all stored GPS fixes
This may need an "are you sure" confirmation dialog...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13 17:20:45 -08:00
Dirk Hohndel
fcbc013cb4 Location service: Correctly access the last stored GPS fix
Now only storing fixes after a certain time / distance actually works.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13 17:17:47 -08:00
Dirk Hohndel
d65b756c4f QML UI: add preference for webservice user id
This handles the user id for the Subsurface webservice for GPS location
tracking.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13 17:15:28 -08:00
Dirk Hohndel
6124842b0c Location service: only request a fix once every 5 minutes
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-13 12:09:10 -08:00
Dirk Hohndel
fb06d27593 Location service: make persistant storage work correctly
Ouch that's an embarrassing bug. Oh well. Shift happens.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13 11:57:02 -08:00
Dirk Hohndel
6a70793ba8 Location service: report number of recorded GPS fixes
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-13 09:17:13 -08:00
Dirk Hohndel
4b39971978 Location service: apply the saved GPS fixes to dive list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 20:23:00 -08:00
Dirk Hohndel
5873a08197 Location service: add member to apply the gps locations to dives
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-12 14:57:27 -08:00
Dirk Hohndel
a8b0e9aa19 Location service: move GPS data to separate QSettings instance
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-12 13:04:23 -08:00
Sebastian Kügler
973b68c304 Fix label overflow in divelist
- 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-11 19:06:07 -08:00
Sebastian Kügler
3da912cda8 Cache diveprofile widget in the diveprofile QtQuick item
- 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-11 19:06:00 -08:00
Sebastian Kügler
6e43642610 Rework divedetails page
- 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-11 19:05:27 -08:00
Sebastian Kügler
b50202bfc5 Use styled text items in divedetails
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-11 19:05:20 -08:00
Sebastian Kügler
91b951c362 Simplify anchoring in divedetails
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-11 19:05:10 -08:00
Sebastian Kügler
63cde0e120 dpi improvements for small text
- 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-11 19:04:26 -08:00
Sebastian Kügler
ac1607dce2 kill warning
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-11 19:04:13 -08:00
Dirk Hohndel
24ea1e9c67 Location service: only store gps fix after certain time or distance
This should be configurable in the preferences at some point.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 15:44:58 -08:00
Dirk Hohndel
62f7ec11d7 Location service: store locations in settings
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-11 15:28:10 -08:00
Dirk Hohndel
cd7d6ae6e5 Location service: toggle the service from the main menu
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-11 15:28:10 -08:00
Dirk Hohndel
a29e74e2e9 Location service: move location provider into QML manager
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-11 12:38:23 -08:00
Dirk Hohndel
e7b2f04bec Location service: consistent way to output information
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-11 12:38:11 -08:00
Dirk Hohndel
9195f247c4 Location service: move files around to fit new directory layout
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 12:37:57 -08:00
Joakim Bygdell
9c5c97b449 Android: remove duplicate top bar from log window
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-08 09:46:28 -08:00
Sebastian Kügler
bfe24526d3 fix startpage appearing over dive list
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-07 15:51:09 -08:00
Sebastian Kügler
9ff701069d Flip visibility when opacity is 0
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-07 15:32:03 -08:00
Sebastian Kügler
a0a3bf8870 Improve labels in login dialog
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-07 09:04:35 -08:00
Sebastian Kügler
ff82d1cc15 Improve TopBar and login window layout
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-07 09:04:22 -08:00
Sebastian Kügler
09b7ebf28b tighter margins on start page
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-07 09:04:10 -08:00
Sebastian Kügler
2b70b76133 Rejig navigation
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-07 09:03:47 -08:00
Sebastian Kügler
0e26afbf0a Remove hard-coded size from label component
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-07 09:03:20 -08:00
Sebastian Kügler
cc032c9830 Clean up dead code in units
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07 09:03:01 -08:00
Sebastian Kügler
6b886f0da2 Improve 1st start experience
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-07 09:02:48 -08:00
Sebastian Kügler
6dfac6a081 Improve layout of login dialog
- 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-07 09:02:20 -08:00
Sebastian Kügler
aae4a326f4 organize qml files in subdirectories
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-07 09:00:59 -08:00
Sebastian Kügler
95ac4c4454 Fix indentation in qrc file
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-07 09:00:30 -08:00
Sebastian Kügler
b7e33eb8bb More info in ThemeTest
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-06 14:07:32 -08:00
Sebastian Kügler
7b320a7d34 Improve theme information panel
- 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-06 14:06:03 -08:00
Sebastian Kügler
cdcb5c1603 Include label in the binary
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06 14:05:56 -08:00
Sebastian Kügler
ffe44f9aaf new Label item
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-06 14:05:52 -08:00
Sebastian Kügler
6d3a5e6bd4 Theme tweaks
- 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-06 14:05:45 -08:00
Sebastian Kügler
9dc8f13a0a Replace units.spacing with units.smallSpacing
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-06 14:04:47 -08:00
Sebastian Kügler
74586d7922 Add some compatibility extensions to theme and unit
- 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-06 14:04:36 -08:00
Sebastian Kügler
cbb8866b08 Add qmldir file
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-06 14:04:32 -08:00
Sebastian Kügler
5fb054a17c some changes from the upstream wip-branch
- 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-06 14:04:21 -08:00
Sebastian Kügler
c8227e200d more complete implementation of Plasma's Units
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-06 13:50:01 -08:00
Dirk Hohndel
3ebbf6bc5d QML-UI: find the include files
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-05 07:59:09 -08:00
Sebastian Kügler
38e1dc1589 QML-UI: Layout improvements in app list and details header
- 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>
2015-10-09 12:51:59 -07:00
Sebastian Kügler
ac6b267d40 QML-UI: gridUnit is now dpi-corrected
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09 12:51:54 -07:00
Sebastian Kügler
5195fcf919 QML-UI: improve list painting
- section headers get underline with a thick line
- items are separated by spacing and a thin grey line at the bottom
- spacing on both sides, aligning with header

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09 12:51:51 -07:00
Sebastian Kügler
0ed2584231 QML-UI: be less chatty
Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09 12:51:48 -07:00
Sebastian Kügler
77fa4e37c8 QML-UI: add more properties to Units and Theme
- colors for accentuation (background and text)
- text color to paint on highlights
- units.spacing (derived from gridUnit, so it's dpi-corrected)
- port main.qml, especially the application header to this theming and
  sizing

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09 12:51:42 -07:00
Sebastian Kügler
431b5e07fe QML-UI: basics for theming and hi-dpi support
- Theme: For theming, we're just defining some colors centrally for now
- Units: This object provides dpi-corrected sizing in the form of
  gridUnit. The idea is to base gridUnit on the rendered font size, so
  the ui scales with text size. As this interpolates font size and dpi,
  the sizing is rather responsive.

These are the basics, now we can kill lots of hardcoded pixel values.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-09 12:51:36 -07:00
Grace Karanja
56771159a8 QML UI: Show log correctly
Correctly show the log messages. The log window will display all
messages emitted by the QML Manager class.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
cd28082c39 QML UI: Fix error when closing the log window
When closing the log window, do not try to save the changes. This
should only be done when closing the DiveDetails.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
89c7e4cd67 QML UI: Show message when loading dives
Show a message at the start of fetching dives, so that the user knows
whats going on.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
9e53b3082c QML UI: Add ViewLog menu
Add a menu entry to show the application log.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
ee13c5c282 QML UI: Add QML Log viewer
Add the ability to preview the application log in QML.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
ab7db605e5 QML UI: Move top bar to its own file
Move the QML top panel to its own file, so that it can be used in
other files.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:49:09 -07:00
Grace Karanja
5a7dbf0225 QML UI: Use AddDive instead of clear dive
No need to clear the dives when adding a new one.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
a734a2ee19 QML UI: Dynamically change button text
Dynamically change the text of the show/hide profile button.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
3d5ad19888 QML UI: Add button to hide dive profile
Allow toggling of dive profile visibility

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:15 -07:00
Grace Karanja
1925b3d012 QML UI: Remove clearDetails() function in DiveList.qml
This function is not needed, as we will move all of the logic to
C++.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Grace Karanja
a3bdf49b84 QML UI: Clear divelist model before starting new dive
When user clicks on AddDive, we should clear the model.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Grace Karanja
8d03d26480 QML UI: Start Add Dive feature
Start working on the add dive feature, to enable the user add a
new dive using the mobile UI.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-08-31 15:24:14 -07:00
Joakim Bygdell
fc746c2129 QML UI: move back button back to the left and center text
The top bars on the main page and dive details should be the same height
and keep the same layout.

[Dirk Hohndel: refactored Joakim's patch to work on top of what was
               already in master]

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30 10:13:25 -07:00
Joakim Bygdell
59a18ab000 QML UI: make the top bars look the same
The top bars on the main page and dive details should be the dame height
and keep the same layout.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-30 06:14:53 -07:00