aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models/divelocationmodel.h
AgeCommit message (Collapse)Author
2015-11-07divelocationmodel: fix some signed/unsigned warningsGravatar Lubomir I. Ivanov
Use uint32_t for divesite UUIDs. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-08-31UI code to merge dive sitesGravatar Tomaz Canabrava
Get the Qt data structures and convert to something that we can use in our C - core. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Display dive sites with same gps as the currentGravatar Tomaz Canabrava
So we can merge them later - currently we are showing only the ID, ugly - fixing next. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-31Add function to filter same-gps dive sitesGravatar Tomaz Canabrava
This should be userfull to show dive sites that are mergeable. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Create a new dive site and edit it automaticallyGravatar Tomaz Canabrava
If the user clicks on the first or second option of the drop down list, subsurface will move him to the dive site edit panel automatically, since it's a new dive site and there's no information about it yet. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-25Make created dive site uuid deterministicGravatar Dirk Hohndel
Having random uuids seemed like a good idea, but there are several situations where they really cause problems. One is merging dive file imports from V2 logfiles. Another is testing such imports. Instead of making the uuid random we now hash the name and add the timestamp of the first dive associated with this dive site to the hash (first in this context is "first encountered" with no guarantee that it is the chronologically first). This way V2 imports create deterministic uuids but uuid conflicts are still extremely unlikely, even if the user has multiple dive sites with the same name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14Offer an option to just complete the textGravatar Tomaz Canabrava
Make the kids fight no more. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01More information on dive site modelGravatar Tomaz Canabrava
All of dive site information is now exposed to the model Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-22Add model to populate the Preferences for GeoRefGravatar Tomaz Canabrava
Simple model that list the options for GeoRef. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-01Simplify model handling and crashes fixesGravatar Tomaz Canabrava
So, there's only one crash left (that I put a big TODO: on the maintab.cpp about) and I'll fix it tomorrow as it's quite late here and I'm almost sleeping at the keyboard. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-01Correctly change the dive_site nameGravatar Tomaz Canabrava
Correctly change and update the dive_site, updating the name on the combobox or other attached views. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-01Fix cross build on WindowsGravatar Dirk Hohndel
int32_t is unknown otherwise. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-01Create a new DiveSite when user clicks on addGravatar Tomaz Canabrava
Also reorganized a bit of the code, and renamed a few misleading methods. [Dirk Hohndel: remove some C++11 code] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Correctly set the dive site id on the diveGravatar Tomaz Canabrava
When changing the index of the combobox we were discarting the dive_site_id. This fixes it. Now I need to understand what's happening to the globe. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29Update DiveLocationModel when thread finishesGravatar Tomaz Canabrava
This patch updates the DiveLocationModel when the GeoLoockupInformationThread finishes, and also selects the correct index for the displayed dive. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-29LocationInformationModel moved to qt-modelsGravatar Tomaz Canabrava
I forgot about this one, and we are going to use it in the mobile version too. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>