aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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>
2015-12-03QML-UI: open cloud storage once credentials were enteredGravatar Dirk Hohndel
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-03QML UI: different functions for saving Preferences and Cloud CredentialsGravatar Dirk Hohndel
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-03QML-UI: Split cloud credentials and other preferencesGravatar Dirk Hohndel
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-03Fix crasherGravatar Sebastian Kügler
m_dives can be empty, so make sure we don't push an invalid QModelIndex into the mode. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Small change to the Mac make package scriptGravatar Dirk Hohndel
It still is rather specific to my system layout, but at least removes a reference to my home directory path... It also removes @rpath references from the executable. This should in theory work, but it failed for me on one machine that I tested on and doing things this way doesn't appear to cause problems. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Fix compile error on MacGravatar Dirk Hohndel
We need a space between the two string literals. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Uemis downloader: ignore leading junk in the dataGravatar Dirk Hohndel
One user's debug log shows valid data, only not in the format we've seen before (with the response starting with '{'). Instead he gets a repeat of the second word in the response to processSync prepended to the expected output. So let's skip the data until the first '{'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03Uemis downloader: don't leak memoryGravatar Dirk Hohndel
Don't just clear out the buffer pointer, free the memory, first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02QML-UI: refuse to save to cloud unless you loaded from cloud, firstGravatar Dirk Hohndel
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-02QML UI: if load fails, don't continue processing dataGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02Fetch the Subsurface webservice userid if cloud credentials were givenGravatar Dirk Hohndel
This allows users to not have to worry about this userid anymore. Both the mobile app and the desktop app can now derive the userid from the cloud storage credentials. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02Add instance method for GpsLocationGravatar Dirk Hohndel
This way we can call members from different parts of the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02QML UI: fix profile scalingGravatar Dirk Hohndel
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-02QML-UI: Remove button from dive detailsGravatar Joakim Bygdell
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-02user-manual.txt: modifications related to Grantlee variablesGravatar Lubomir I. Ivanov
This patch adds the new variables to the Grantlee section of the user manual, which were recently added, code wise. The patch also cleans the descriptions of some of the already present varaibles and fixes a couple of typos in the process. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02Correct Qt version in README for android buildingGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02Fix disabling of facebook integrationGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02Remove defaults for Android from cmakeGravatar Anton Lundin
Some of the flags needed to build for android was set in cmake. There are many more that needs to be set correctly for things to work, so having some in cmake and some in the Android build.sh is just confusing. This removes the bits from cmake and moves everything into build.sh. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01QML-UI: turn of some profile featuresGravatar Dirk Hohndel
We don't have a tooltip on the QML UI as it's rendered into a pixmal. We also don't need the timer as we don't need the TTS calculations. And we don't need the acrobatics to figure out if we're in the planner as we don't support the visual planner (or any planner, at this point) with the mobile UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01Switch to compile time connect syntaxGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01QML UI: call plot dive when we set the diveGravatar Dirk Hohndel
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-01Profile: avoid potential crashGravatar Dirk Hohndel
If things go as planned, then the length of the polygon is the same as the number of rows in the model. Turns out when running Subsurface-mobile on Android that simple truth doesn't seem to be correct. Most of the time the polygon seems to have twice as many elements as the model. But a few times I ended up in here with a polygon that had fewer elements than the model. And then things crash. This simply avoids the crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01QML-UI: make sure errors make it to the logGravatar Dirk Hohndel
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-01QML UI: add number of loaded dives to logGravatar Dirk Hohndel
This way we can see if loading dives succeeded at all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30CMake hack to build Subsurface-mobile on MacGravatar Dirk Hohndel
With this running make && make install should give you a Subsurface-mobile.app that you can execute (either with double click or using "open Subsurface-mobile.app" from the command line). This contains a couple of hacks but I didn't try too hard to make this clean since Tomaz is redoing the CMake build system, anyway and I'll need to make sure this still works once he's done. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30Fix QML component import path when running Mac bundle of Subsurface-mobileGravatar Dirk Hohndel
When running the QML UI on a Mac the deployment of the QML Components seems to fail and the search path for the components is rather odd - simply the same directory the executable was started from: <bundle>/Contents/MacOS/ To work around this we need to manually copy the components at install time to Contents/Frameworks/qml (not covered in this commit) and make sure that we add the correct import path. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30Subsurface-mobile: don't create the GPS source until it is neededGravatar Dirk Hohndel
This should accelerate the startup of the UI a little more. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30QML UI: don't load dives before the UI has been instantiatedGravatar Dirk Hohndel
This should deal with a big part of the delay when starting the app. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30Clear the Dive model before repopulating itGravatar Dirk Hohndel
Otherwise we could get duplicate dives in the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-29Merge branch 'mobilecomponents' of github.com:sebasje/subsurfaceGravatar Dirk Hohndel
2015-11-30sync with mobilecomponents 68c6dc9Gravatar Sebastian Kügler
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-30improve preferences layoutGravatar Sebastian Kügler
- 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-30Style the checkboxGravatar Sebastian Kügler
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-30Easy access to enable/disable location serviceGravatar Sebastian Kügler
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-30The system integrated component is TextAreaGravatar Marco Martin
this will give graphical styling and behavior Signed-off-by: Marco Martin <notmart@gmail.com>