aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-02-02Update copyright for 2016Gravatar Jan Mulder
Trival string update. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-02Simplify building of Android build from one source treeGravatar Jan Mulder
Currently, when running the packaging/android/build.sh from a source tree that has been used for desktop builds, libdivecomputer wants a make distclean. This is inconvinient, and is caused by building libdivecomputer in source. Now, configure and build libdivecomputer in a new subdirectory, allowing to run the android build script from the same source tree as the desktop (both desktop and mobile) builds. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-02Build Android mobile app against latest OpenSSLGravatar Jan Mulder
No reasons not to upgrade to the latest OpenSSL lib. The currently used 1.0.1 branch is ending end of 2016, so a switch to 1.0.2 is useful anyway. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-01Silence compiler warningsGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-01QML UI: Another attempt to shift dive number to top rowGravatar Rick Walsh
Commit 1030cb265a46436a1903cdf66d88a7dd3351d3aa 'QML UI DiveDetailsView: shift dive number to right of top row' was reverted because it caused mysterious crashes for some testers, inferred to be related to sizing items in a gridLayout. This patch brings the dive number back up to the right of the top row, so the page width doesn't exceed the screen width. Using text wrapping should prevent the date text and dive number items from increasing in width, and hopefully avoids the mysterious crashes. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-31Mark CCR dive's divetype properlyGravatar Miika Turkia
We used to mark CCR dives by having "SP change" event at time 0:00. As we nowadays mark CCR dives by setting dc->divemode appropriately, better to convert the old dives to this format as well. This way we do not have to take the special old format into account on multiple places in the source. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-31Revert "QML UI DiveDetailsView: shift dive number to right of top row"Gravatar Dirk Hohndel
This reverts commit 1030cb265a46436a1903cdf66d88a7dd3351d3aa. Simply trying to find out if this is the cause for the odd crashes one tester is seeing.
2016-01-31Attempt to detect time format on CSV importGravatar Miika Turkia
This attempts to detect the time format when initially importing a CSV file. Well, only the minutes:seconds notation is detected currently. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-31Attempt to detect date format on CSV importGravatar Miika Turkia
This tries to detect the date format when initially reading a CSV file for importing. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29QML UI: pick new highest dive number when manually adding diveGravatar Dirk Hohndel
It's possible that this will create an out of order dive list, but it seems the most consistent way to do things and to avoid more than one dive with the same dive number (which could have happened if you add several dives manually that are not the newest dives in the dive list). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29Minor cleanupsGravatar Dirk Hohndel
Improve readability of the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29QML UI: introduce "add" state and correctly clean up when canceledGravatar Dirk Hohndel
Adding a dive is just like editing it, except that canceling the operation has different consequences. Instead of trying to figure this out by some inference on other state, let's just make it explicit and then clean up after ourselves if the user canceled a manual dive add. This also switches to use the properties that we defined in order for the main menu to be able to setup these values. Makes the code easier to read and is more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29Add helper to remove dive from modelGravatar Dirk Hohndel
I tried various things to do this from QML but it just doesn't seem to work at all. So I gave up and instead added a trivial helper function. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29QML UI: remove apparently obsolete codeGravatar Dirk Hohndel
I couldn't make sense of either the code nor the comment, so I tried what broke when I removed it. Nothing that I could find. So maybe we don't need this after all? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: better way to determine dive details edit widthGravatar Dirk Hohndel
Instead of passing magic values around, calculate the columnWidth as part of the SubsurfaceTheme object. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: make manually added dives more like those added on desktopGravatar Dirk Hohndel
By giving them a fake profile we can actually edit the dive profile in the desktop app. Fixes #998 Fixes #1000 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: once again hide "--" as section headerGravatar Dirk Hohndel
The fix for correctly showing multiple trips with the same location text inadvertantly broke the detection of empty location text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: use the new helper to ensure the right dive is selected after editGravatar Dirk Hohndel
There are two cases where this is important - when running Manually add dive which may add a dive in the middle of the dive list - when editing the date and time of a dive which may move it around in the dive list Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28Use our own sort proxy model classGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28Add our own sort proxy class which provides two helper functionsGravatar Dirk Hohndel
These can then be used from QML to map the index into the model (the sort model corresponds directly to the indices in QML) to the dive id and back. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: add the properties needed to be able to manually add diveGravatar Dirk Hohndel
This way the trigger from the main drawer works again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: add field to edit the total weightGravatar Dirk Hohndel
This isn't hooked up to anything, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28Better id for yet another QML itemGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: use unique names for the different ListViewsGravatar Dirk Hohndel
Having both the dive list (the vertical list) and the sequence of dive details (the horizontally swipe-able list) named the same caused me endless confusion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: clear out empty strings from the UIGravatar Dirk Hohndel
Right now the UI shows "--" as place filler for empty data. That may or may not change - but while it's there, we should not store that string in the corresponding string fields of the dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28Avoid uninitialized memory accessGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: end edit mode when switching to different pageGravatar Dirk Hohndel
Fixes #997 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: avoid clearing and rebuilding the dive list modelGravatar Dirk Hohndel
This causes all profiles to be rendered which is a massive performance concern. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: fix Qt's broken handling of two digit years in datesGravatar Dirk Hohndel
Because dives in 1912 are unlikely to be added to my dive log... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27Change the api to update a single diveGravatar Dirk Hohndel
Instead of searching for the dive in the list, just make sure we are given the index. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: correctly notify of model changeGravatar Dirk Hohndel
This may seem weird, but it seems to work to make sure that the model actually is correctly updated when updating a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27Move helper function to DiveObjectsHelperGravatar Joakim Bygdell
As per Tomaz recomendation the helper functions from 19588ce and e072596 are moved from qmlmanager to DiveObjectsHelper. [Dirk Hohndel: merged with the latest code] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: on edit only request location if user checks the boxGravatar Dirk Hohndel
The code inexplicably always checked for a gps location. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: fix precision of total weight displayedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: revert dive detail view layout changesGravatar Dirk Hohndel
Now the layout flows again and shouldn't cause clipping on the right (unless the user has excessively long, unbreakable words it seems. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26QML UI: don't combine multiple trips to the same location into oneGravatar Dirk Hohndel
The way sectioning of the dive list works is by watching for different strings in the section.property. In order to be able to tell different trips apart we combine the address of the dive trip variable with the location (which will create a new section for a new trip, even if the location text is the same) and then strip that information out before showing the trip header. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26Fix build breakageGravatar Dirk Hohndel
Introduced in commit 31462f150dff ("We already have a QNetworkAcessManager global, use it"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26Round placement sizes of TopBar.qmlGravatar Tomaz Canabrava
I was having really ugly fonts here and I actually blamed QML for that (while I still think it is it's fault), but we where using pixel fractions. So every time we may hit a pixel fraction, round that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26Correct usage of QString on qmlmanagerGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26We already have a QNetworkAcessManager global, use itGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26Fix usage of QStringGravatar Tomaz Canabrava
1 - Pass QStrings by const-ref 2 - Don't initialize empty strings with "", they are empty by default 3 - Don't compare empty strings with "", use .isEmpty() 4 - don't append or prepend " ", use QChar(' ') 5 - don't compare QStrings with "constant string", use QLatin1String(" constant string" ) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26Move CloudStorage out of the widgetsGravatar Tomaz Canabrava
Cloud Storage is a non-gui based class, we currently use two different approaches for cloud storage, one on the desktop target and other on the mobile target, we should use only one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Fix bug on the visibility of the Ruler GraphGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Fix Ceiling GraphGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Fix Display / Hide Calculated CeilingGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25More Profile Itens on the new SettingsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Changed quite a few shorts to bool on the c++ implementtionGravatar Tomaz Canabrava
The shorts where being used on the preferences since a long while and we cannot just simply change them to bool since this could break the preferences files, so work around that by changing them to booleans, since it's the correct type for a true / false answer. Also, move some plot curves to the new settings style Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Start to use the QSettings ObjectWrapperGravatar Tomaz Canabrava
start of the QSettinsg Object Wrapper usage on the code this first patch removes two macros that generated around 200 lines in runtime for something like a quarter of it Basically, whenever we changed anything we called the PreferencesDialog::settingsChanged and connected everythign to that signal, now each setting has it's own changed signal and we can call it directly. The best thing about this approach is that we don't trigger repaints for things that are not directly profile related. ( actually we still do, but the plan is to remove them in due time) this commit breaks correct atualization of the profile (because everything was connected to PreferencesDialog::settingsChanged) and now I need to hunt a bit for the correct connections Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML UI: If a dive has multiple cylinders show "Multiple" in the details pageGravatar Joakim Bygdell
Since we are short on space on the mobile version, lets just show "Multiple" if a dive has multiple cylinders. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML UI: Add helper function to get weightsGravatar Joakim Bygdell
Helper function that retrieved the total weight for a dive to be displayed on the DiveDetials page. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>