aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-12-07QML-UI: make dive edit almost sort of workGravatar Dirk Hohndel
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-07QML-UI: we need a way to update the dive modelGravatar Dirk Hohndel
Otherwise our UI will get out of sync with our dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07QML-UI: that's not how you compare char pointers...Gravatar Dirk Hohndel
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-08Page margins for app logGravatar Sebastian Kügler
Adds consistent page margins also to Log page. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08sync with mobilecomponents f4d5d19fcGravatar Sebastian Kügler
- 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-08fix vertical alignment in divelistGravatar Sebastian Kügler
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-08delete CloudStorage.qmlGravatar Sebastian Kügler
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-08Fix page margins in preferences and cloudcredentialsGravatar Sebastian Kügler
- 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-08divelist polishGravatar Sebastian Kügler
- 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-08implement new menu structureGravatar Sebastian Kügler
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-08Fix page margins of start pageGravatar Sebastian Kügler
Consistent with other pages: half a gridUnit around the content. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08theme test improvementsGravatar Sebastian Kügler
- fix page magins - add headings - add screen dimensions in gridUnits Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08increase horizontal spacing at the edgesGravatar Sebastian Kügler
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-07Merge branch 'divedetailssplit' of github.com:sebasje/subsurfaceGravatar Dirk Hohndel
2015-12-08Fix text wrapping in log viewerGravatar Sebastian Kügler
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-07QML-UI: add dive date to the detail viewGravatar Dirk Hohndel
That one really bugged me... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07simplify and style log pageGravatar Sebastian Kügler
- less instantiated objects inside each other - add page heading - allow wrapping of text Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07Fix styling in Preferences pageGravatar Sebastian Kügler
- styled labels from MobileComponents - secondary header becomes smaller Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07Fix text clippingGravatar Sebastian Kügler
2015-12-07redesign dive details viewGravatar Sebastian Kügler
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-07Add more iconsGravatar Sebastian Kügler
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-07dive edit gets contextual actionsGravatar Sebastian Kügler
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-07noise--Gravatar Sebastian Kügler
Kill print in DiveList's startpage. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07add context drawer component to the qrc fileGravatar Sebastian Kügler
It's now needed in main.qml. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07add a contextdrawerGravatar Sebastian Kügler
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-07split divedetails into view and edit partsGravatar Sebastian Kügler
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-07state machine controls edit/view dive detailsGravatar Sebastian Kügler
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-07Styled heading in startpageGravatar Sebastian Kügler
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-07sync with mobilecomponents 9d8bf6d77dGravatar Sebastian Kügler
- 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-07Fix indentationGravatar Sebastian Kügler
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-07Better theme information pageGravatar Sebastian Kügler
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-06Only install QML Framework files for Subsurface-mobileGravatar Dirk Hohndel
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-06Uemis downloader: handle yet another corner caseGravatar Dirk Hohndel
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-06diveprofileitem.cpp: fix unused variable warning on mobileGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-06profilewidget2.cpp: hide the heartbeat graph on an empty stateGravatar Lubomir I. Ivanov
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-06Only warn about different number of tanks and gases if there are tanksGravatar Dirk Hohndel
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-05QML-UI: a small bit of reindentationGravatar Dirk Hohndel
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-05QML-UI: remove duplicate "Run location service" menu entryGravatar Dirk Hohndel
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-05QML-UI: delete unused codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-05QML-UI: mark email entry field as suchGravatar Dirk Hohndel
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-04QML-UI correct cut and paste errorGravatar Dirk Hohndel
Stupidly the wrong functions were connected to the signals. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-04QML-UI: re-architect the way we access network resourcesGravatar Dirk Hohndel
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-04QML-UI: use consistent capitalizationGravatar Dirk Hohndel
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-04QML UI: log the text shown on the log pageGravatar Dirk Hohndel
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-03Cloud storage: do not store the actual pictures in gitGravatar Dirk Hohndel
Adding pictures to the repository was a big mistake on my part. It's very easy for the git repositories to reach a gigabyte and more making sync times (and especially "first download" times) completely unreasonable. This doesn't solve the problem for existing repositories (as the pictures are already there, in the git history), but at least it prevents us from storing more pictures out there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Crash fix in add_single_dive. No writing to dive_table.dives[-1]Gravatar K. \"pestophagous\" Heller
Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Prevent gaschange tank icons from using garbage coords.Gravatar K. \"pestophagous\" Heller
Tank icons were shown at incorrect spots on the profile when the DiveEventItem object held a pointer to a struct event even after the struct event at that address had been freed. When internalEvent is a pointer to freed memory, internalEvent->time.seconds could have all kinds of crazy values, which get used in member function DiveEventItem::recalculatePos to place the tank at bad x coordinates. The DiveEventItem(s) no longer store a pointer to memory that they do not own. This way, no matter how the path of execution arrives into slot recalculatePos, we never need fear that the DiveEventItem will dereference a garbage pointer to a struct event. Fixes #968 Signed-off-by: K. Heller <pestophagous@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03QML-UI: use our styled elementsGravatar Dirk Hohndel
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-03QML-UI: replace the two ways to log progress with oneGravatar Dirk Hohndel
The logging to the UI didn't work anymore since the message area had been removed in commit 8646934ba351 ("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-03QML-UI: make Log page scrollableGravatar Dirk Hohndel
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>