aboutsummaryrefslogtreecommitdiffstats
path: root/subsurface-core
AgeCommit message (Collapse)Author
2016-01-11Remove excessive debugging outputGravatar Dirk Hohndel
Now that GPS tracking seems fairly stable, let's quiet down the chatter. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Split PartialPressureGasSettings with TechnicalDetailsSettingsGravatar Tomaz Canabrava
It was becomming too big, a smaller class is nicer to work wirh Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Finish PartialPressureGasSettingsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Implement missing signals for PartialPressureGasSettingsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Implement more reader accessors for PartialPressureGasSettingsGravatar Tomaz Canabrava
Also, the QtHelper.cpp file told me that some propertiies where also TecDetails, graph related, so I moved them to the correct preferences. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Implement the methods for PartialPressureGasSettingsGravatar Tomaz Canabrava
I didn't allowed the build on CMake for those files yet because there will be tons of breackage, so when I finish, I'll allow. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Start the SettingsObjectWrapper - a QSettings helper for QMLGravatar Tomaz Canabrava
This class needs to have all settings in Q_PROPERTIES so it can be used in QML. I know we will not use all of the settings in a visible way for the user on the QML app, but we might increase things in the future and on different form factors so it's good to be prepared. Currently I implemented all of the possible properties, but I still need to hoock up everything. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove weigths and cylinders.Gravatar Tomaz Canabrava
This finishes the first round of Simplication patches for the QML basecode. The second one will be about the preferences. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: return date and time directlyGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove the gas variableGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove variable tagsGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove SAC variableGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove gps variableGravatar Tomaz Canabrava
And also use existing helper function to get the GPS string Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove m_notes variableGravatar Tomaz Canabrava
I didn't understood the logic of the define & replace, so maybe we want a few comments there. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove Maxcns and OTU variablesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove suit and tripGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove waterTemp variableGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: removed buddy and airTemp variableGravatar Tomaz Canabrava
also fixed a bug on the depth Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: removed divemasterGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: removed duration and depth variablesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: removed location variableGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: removed timestamp variableGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove uneeded variable, rating.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: remove uneeded variable: idGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Simplify: QML code handling seriesGravatar Tomaz Canabrava
The connection between the C++ core and the QML code leaves a lot of room for improvement; the following series will do small but important updates on the code regarding QML and QtWidget coexistence and behavior. First: simplify wrapper class, removing uneeded variable. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11GPS data: create divesite when missing for applied GPS dataGravatar Dirk Hohndel
Otherwise things will of course crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Random whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11Fix potential compile errorGravatar Dirk Hohndel
This compiled just fine for me but apparently the QStringList needs to be explicitly included on Ubuntu 15.10. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10Compile fix for older compilersGravatar Dirk Hohndel
Not every compiler supports non-trivial initializers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10Fix bug setting up DiveObjectHelperGravatar Dirk Hohndel
Why would we bail there if the notes are empty? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10QML UI: refresh divelist after GPS data was successfully appliedGravatar Dirk Hohndel
And create a helper to do so to make the code simpler. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10GPS data: if deleting on server fails, remember to try againGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10GPS data: don't try to track what's uploadedGravatar Dirk Hohndel
This has been the cause of issues in several cases. We should simply always try to push all data to the server - it deals with redundant uploads quite nicely. (previous commits already stopped responding to this flag, this simply removes all mention of it) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10GPS data: delete fixes on the serverGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10GPS data: more fixesGravatar Dirk Hohndel
- load the data from settings as we start - improve upload to server - keep settings and in memory model in sync Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10Reimplement the internal repesentation of GPS fixesGravatar Dirk Hohndel
Instead of using the Settings as our data structure and constantly accessing them, we now have a QMap for the GPS fixes and only access the Settings to keep them in sync with the QMap. This should significantly speed things up. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10Support for imperial depth on worldmap exportGravatar Miika Turkia
This will use the depth units from user preferences when exporting the worldmap. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10If all else fails try loading images from cloud serverGravatar Robert C. Helling
Of course, as of this writing, there are no images on the server. In addition, this patch adds comments to explain the by now convoluted image retrieval logic (local file, filename as URL, by hash, cloud server). Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10Simplify image hashing logicGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10Renumber dive list after manual dive mergingGravatar Salvador Cuñat
As Linus pointed out in mail list, user is forced to manually renumber his dives after doing a merge, unless the merged dives were those at the list tail. This patch try to manage the more usual cases, letting the user to deal with those more complex, based on some assumptions: 1.- We are working on an time ordered list of type: dive_table.nr ... 100 -- 101 -- 102 -- 103 -- 104 ... dive_table.dives.number ... 234 -- 235 -- 236 -- 245 -- 246 ... 2.- It's unlikely to merge no consecutive dives, as merging is time based. 3.- It's unlikely (although possible) to find consecutive dives with no consecutive numbers. 4.- It would be rather bizarre to find that newer dive,of those to merge, has lower number than older. 5.- It can be found that one (or both) dives to merge are zero numbered. 6.- There is only need to renumber from merged dives in advance. A variable, "factor", is fixed before reworking the dive table. This number will be substracted from the original dive number. If we are in point 5.- case, "factor" will be set to zero, meaning that dive numbers will not change (if older dive is zero, merged one will be numbered zero too and will let the user to manage this; if newer dive is zero there won't be need of renumbering as following dives will be correctly numbered, e.g. after splitting a dive which is not at the tail of the table). In most cases, "factor" *should* be set to 1. While renumbering it can be found a dive with it's number set to zero, this won't be changed and will remain zeroed to avoid negative numbers. It, mostly, means that the user has pending work on his dives. I don't know why I've written such a big explanation for such a tiny patch :-) Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08QML UI: partial, slow and incomplete implementation of delete GPS fixGravatar Dirk Hohndel
This only deletes the fix on the mobile device, not on the server. And it is really really slow. Re-reading the data from the settings just isn't a smart way to do this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08Move Dive class from qthelper.h/cpp to it's own fileGravatar Tomaz Canabrava
and rename it to DiveObjectHelper, since it should be an QObject based class to make it easier on the QML, grantlee and widgets side to display the dive's internal data. each Q_PROPERTY defined in the DiveObjectHelper.h file can be acessed directly via it's name. So, if you are on a model that returns a dive, acess it's name by dive.name Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08Untangle Library LinkageGravatar Tomaz Canabrava
with the adittion of gpslistmodel/location, the libraries qt-models had a direct dependency on subsurface-core, and subsurface-core had a direct dependency on qt-models, this is bad. Moving a bit of code around I'v managed to clean this out, and also to clear a bit of uneeded code (GpsTracker and gpsTracker where basically the same thing.) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07Compile fixGravatar Dirk Hohndel
This makes the desktop version compile again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07Compile fixGravatar Dirk Hohndel
While the conversion of uint64_t to QVariant works fine with some Qt / compiler combinations, it fails on others. Use Qt's type instead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07Correctly adjust time stamp of GPS fixesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07Merge branch 'gpsList'Gravatar Dirk Hohndel
2016-01-07Populate the model with the GPS fixesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07Download gps locations in the mobile appGravatar Dirk Hohndel
This is not the same as the existing download to apply the gps fixes to the dive list. This allows us to download and store the GPS fixes in the settings. I may end up changing things around to have a shared implementation for downloading the GPS fixes, but for now this seemed easier. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07Create GpsListModel in order to be able to display GPS fixesGravatar Dirk Hohndel
This will allow us to visualize the GPS fixes that are currently stored in the QML UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>