Commit graph

270 commits

Author SHA1 Message Date
Dirk Hohndel
9db615a004 QML UI: show app name in the top bar as Subsurface mobile
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:47:23 -08:00
Dirk Hohndel
6b10c45b2f QML UI: mark locations with GPS data
In the dive detail view, if a location has an associated GPS location, show the
name of the location underlined so the user knows that tapping on it will open
a browser window with a map picture.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:11 -08:00
Dirk Hohndel
bf239e7c42 QML-UI: add hacky, useless way to show the GPS location of a dive
This is of course stupid and NOT what we want to do, but one could argue it's
better than nothing (well, not sure, whatever). If we have a GPS location
associated with a dive and you tap on the location name when showing the dive
details, it opens a static image of a satellite map with a marker for the dive
site.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:11 -08:00
Dirk Hohndel
07a0ef2139 QML-UI: attempt to improve profile scaling
This still doesn't address all the issues, but appears to be a step
forward. It also contains some debug output to better understand what's
going on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 09:03:33 -08:00
Dirk Hohndel
8e299727df QML-UI: fix black squares on some Android devices
It appears that one some Android devices there is an interaction between
Qt and the GL implementation that results in black squares instead of
icons being shown on the screen.

Disabling the GammaAdjust avoids running the shader and fixes this
problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 17:57:40 -08:00
Dirk Hohndel
a639332edf QML-UI: log the full version at start
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 08:02:05 -08:00
Dirk Hohndel
c3ebeadb34 QML-UI: allow toggling verbose mode from the UI
Hidden in the Developer menu.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 18:41:50 -08:00
Dirk Hohndel
41c59c1c8d QML-UI: more log message when retrieving web user id
At least one tester cannot retrieve their web user id. This should help us
collect more data and figure out why this fails.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 16:20:20 -08:00
Dirk Hohndel
b9cd6bf38e QML-UI: actually show the right text for missing cloud credentials
If we have no credentials or invalid credentials, update the text on the start
page accordingly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 16:08:10 -08:00
Dirk Hohndel
a26eda9700 QML UI: show better message about dive list at start
Now the message should make more sense. First it tells you that it's looking
for dives. Then you get some progress during the git download, and error
messages if things failed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-15 13:33:53 -08:00
Dirk Hohndel
8baae6a3b6 QML-UI: make dive edit almost sort of work
So this has a lot of caveats:
- right now it only works for buddy, divemaster and suit
- you have to actually exit the field with your cursor or the change
  doesn't take - that's ridiculous, there must be a far more clever way to
  do this
- because I use the onEditingFinished handler I can't do this for the
  Notes (so here's another reason why I KNOW that this is the wrong way to
  do this)
But it shows in principle how this could be done and once someone who
actually knows what they are doing gets their hands on the code I'm
optimistic that this can be morphed into something much more useful.

It does tie together the changes made in the previous commits so that both
clicking around on the dive list gives the expected results and synching
the data back to the cloud actually works.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07 22:24:56 -08:00
Dirk Hohndel
803f5f9fbf QML-UI: that's not how you compare char pointers...
Well, at least it doesn't what you think it does. Let's use our little
helper to actually compare the strings.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07 22:22:07 -08:00
Sebastian Kügler
3987eb57fb Page margins for app log
Adds consistent page margins also to Log page.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:56:45 +01:00
Sebastian Kügler
44fd9bff67 sync with mobilecomponents f4d5d19fc
- Kills a warning in ContextDrawer.
- Improves sizing of menu icons.
- Fixes icon rendering in menues.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
946cc5fec2 fix vertical alignment in divelist
left and right of the items and the headings are now synced and
consistent with other pages.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
6b3df6597b delete CloudStorage.qml
File is unused, apparently a left-over from a rename. It's not included
in the qrc and referenced nowhere, so it's safe to delete.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
339ff4f259 Fix page margins in preferences and cloudcredentials
- page margins are gridUnit / 2, consistent with other pages
- Simplify layout: we don't need to nest that much here, saves two
  objects and simplifies code a bit

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
531eace0c3 divelist polish
- fix page margins (gridUnit / 2)
- trip heading marker now stretches over the full length

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
36e3c5485e implement new menu structure
This patch creates the following menu structure in the application menu
as discussed on irc:

Cloud credentials
Preferences
Manage dives
	Download from computer
	Add dive manually
	Refresh dives
	Upload to cloud
GPS
	Add GPS tags to dives
	Upload GPS data
	Clear GPS cache
Advanced (hidden by default)
	App log
	Theme Information

"Save" moves out of the context menu, since it's a global thing (syncs
to server).

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
bfcc4aaf05 Fix page margins of start page
Consistent with other pages: half a gridUnit around the content.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 02:08:37 +01:00
Sebastian Kügler
8bd59ebf4b theme test improvements
- fix page magins
- add headings
- add screen dimensions in gridUnits

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 02:07:31 +01:00
Sebastian Kügler
fdd15d5d7a increase horizontal spacing at the edges
Spacing around pages is half a grid unit, as consistent with (some of
the) other pages. For the dive list, it's slightly more complicated:

We want the list items to reach the edges on both side as to increase
the interactive area. We have to apply the spacing left and right inside
the listitems. This patch does that.

Another consistency fix with other pages is that we're now adding a
header at the top of the dive list, which scrolles with the list view.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 01:10:56 +01:00
Dirk Hohndel
1f41d933c0 Merge branch 'divedetailssplit' of github.com:sebasje/subsurface 2015-12-07 15:14:48 -08:00
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