Commit graph

9973 commits

Author SHA1 Message Date
Tomaz Canabrava
24f3743fc1 Start to clean the Main CMakeLists.txt filel
CMake is a strange and complex language for buildsystems,
and as such we need to let the main CMakeLists.txt be as
clear as possible.

Moving a bunch of code that deals with finding git via
default CMake way or pkg_cofig to a file named 'HandleFindGit'
on our cmake/Modules folder.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
2015-12-16 07:58:56 -08:00
Dirk Hohndel
86765774dc Update the bundled htlm user manual
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-16 06:37:43 -08:00
Pedro Neves
e87e0bbba7 Corrected a typo in the User Manual
Signed-off-by: Pedro Neves <nevesdiver@gmail.com>

A small typo was corrected.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-16 06:35:54 -08:00
Dirk Hohndel
728ee8405e Small INSTALL file fix
Mention another dependency to install on OpenSUSE

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-16 06:34:03 -08:00
Dirk Hohndel
b5905f3ab7 Cmake: remove debug code that accidentially slipped in
And try to fix the upper case / mixed case confusion that we apparently
have with libssh2 - oh how I hate this stuff.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-15 17:47:15 -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
7aab635585 Remove support for older libgit2 - we now require 0.23 or later
Also fixes a capitalization error that prevented finding libssh2 in some
circumstances. And adds a missing include when building with libzip on Mac.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-15 13:33:00 -08:00
Dirk Hohndel
c8be04edad Mac build: move the QtXml hack into Cmake
This way build.sh can build a Subsurface.app that the user can use via

	open subsurface/build/Subsurface.app

after running build.sh.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-09 15:24:25 -08:00
Dirk Hohndel
e714263e8a build.sh: don't build libssh2 anymore on Mac
I don't recall why this was needed, but things seem to work fine with the one
avaialable via Homebrew

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-09 15:19:47 -08:00
Dirk Hohndel
82985afbd5 Update the INSTALL file to list all required Homebrew packages on Mac
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-09 15:18:54 -08:00
Dirk Hohndel
729ac7619e Dive model: use the correct time to set the time zone offset
We need to calculate the offset based on the time of the dive - the mobile
version doesn't use displayed_dive. This way time stamps are now correct
all year round.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-08 06:20:51 -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
9e6991a0e1 QML-UI: we need a way to update the dive model
Otherwise our UI will get out of sync with our dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07 22:23:09 -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
b928dff3ce Only install QML Framework files for Subsurface-mobile
The workaround to building Subsurface-mobile on Mac messes with the ability to
sign the bundle, so only do this when building Subsurface-mobile which we don't
bundle, anyway.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06 13:44:32 -08:00
Dirk Hohndel
eb0ccace77 Uemis downloader: handle yet another corner case
If we looking for dive details and are trying to guess the offset between
object_id and logfilenr, we need to treat logfilenr 0 as special - it
means we read past the end of the list of stored dives and need to walk
backwards.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06 13:38:38 -08:00
Lubomir I. Ivanov
491ef7edc8 diveprofileitem.cpp: fix unused variable warning on mobile
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06 12:28:01 -08:00
Lubomir I. Ivanov
2aed907525 profilewidget2.cpp: hide the heartbeat graph on an empty state
Opening Subsurface for the first time with heartbeat graph visible
and then immediately doing File->New shows the logo/background in the
profile space while hiding everything except the heartbeat graph.

This patch makes sure that the graph is hidden with everything
else on an empty profile state.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06 12:19:44 -08:00
Dirk Hohndel
956d189734 Only warn about different number of tanks and gases if there are tanks
Some backends support giving tank data for some, but not all models that
they support (and simply report no tanks for those models that don't
support this). The Suunto Vyper is one of the dive computers where this
happens and without this change we report angry red warnings after a
perfectly correct download.

So this changes the logic to only show that error if there actually were
tanks reported.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06 09:40:21 -08: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