Commit graph

8440 commits

Author SHA1 Message Date
Claudiu Olteanu
619e97ee4f Stop the SDP agent if the Clear/Save button was pressed
If the Cancel button was pressed then we should stop the
SDP agent. The same thing happens when the Save button
was pressed. We don't need to add new BT remote devices
to the list if the widget was closed or if the list with
the discovered BT devices was cleared.

Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-19 05:50:08 -07:00
Dirk Hohndel
05109b2d6c Don't hide location completion when user types space
Odd that I never noticed this until several people pointed it out to me.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18 13:39:19 -07:00
Dirk Hohndel
bd4629b293 Add nr of dives at the site to completion string
I'm not convinced that this is useful enough to keep, but let's give it a
try and see what people think.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18 13:34:05 -07:00
Dirk Hohndel
021a151f03 Location completion: remove space between '~' and distance
Just a minor visual improvement.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18 13:06:33 -07:00
Anton Lundin
db0da1656d Remove now unneeded define
This removes the extra Q_OS_ANDROID define to prevent a redefined
warning.

Somehow, the qt headers didn't define Q_OS_ANDROID previously, but how
does.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18 06:40:04 -07:00
Dirk Hohndel
8590c6dc33 Remove cmake hack that wasn't supposed to go upstream
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18 06:03:12 -07:00
Dirk Hohndel
d595f5c167 Merge branch 'devel' of https://github.com/gracie89/subsurface
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 12:00:38 -07:00
Grace Karanja
0c9756c5d7 QML UI: Implement showing of the dive profile on QML
Link the QMLProfile class to the DiveList.qml file. The profile is
displayed above the dive details.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-17 12:00:38 -07:00
Grace Karanja
59232ca172 QML UI: Add QMLProfile class
Add a C++ class to render the dive profile. The rendered image is then
passed on to QML.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 12:00:29 -07:00
Tomaz Canabrava
76e61bd8d9 Make sure we don't pass the wrong info
We were returning false here which meant that we were
overriding the information with the wrong value later.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 10:27:52 -07:00
Tomaz Canabrava
392973dbe4 Remove buggy code
This code is already implemented as a signal-connection
on the maintab.cpp / globe.cpp

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 10:25:12 -07:00
Grace Karanja
df1a1f7034 QML UI: Implement saving of dives
This implements saving of some dive details to the cloud service. When the
user closes an open dives, any changed details will be cached, and when they
click on the 'Save Changes' button is pressed, the changes will be saved to
the cloud.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-17 19:12:39 +03:00
Grace Karanja
aae27629c4 QL UI: Add DiveId role to DiveListModel
This will be used when rendering the dive profile and also when
saving the dive changes.

Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
2015-07-17 19:12:39 +03:00
Miika Turkia
5d12723656 Divinglog import: update O2sensors and dive mode
This is my best guess, and I have no sample logs that would prove my
assumption.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 08:51:04 -07:00
Miika Turkia
6e109a2129 Divinglog import: added setpoint
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 08:51:01 -07:00
Miika Turkia
5e439cef63 Divinglog import: add cns value
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 08:50:57 -07:00
Miika Turkia
70198ef11b Divinglog import: ppo2 sensor readings
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 08:50:49 -07:00
Dirk Hohndel
2a4cacda21 Better invalid dive site name
This should ensure that no one ever might end up with our "invalid" name
for real. And it allows us to more easily test elsewhere for that invalid
value.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-17 08:39:49 -07:00
Anton Lundin
c78e4fb92d Use a different package for the mobile app
Now we produce two different android apps, and to be able to have both
installed at once, we need to put them in different packages.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 18:41:06 -07:00
Tomaz Canabrava
0a473b3a2a Fix mouse interaction with the Location List
paint methods should be used only to paint, not to trigger other
widget behaviours ( we could got ourselves into a bad recursion
bug from that ). Also, enabled mouse tracking to correctly track
the mouse movement inside the widget.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 18:34:22 -07:00
Tomaz Canabrava
56240cff5b Show only 1 possibility if string is unique
We should only show one possibility if the dive_site name
string is unique - we don't have that dive_site yet - so
we pass to the Completer filter a Dummy string that will
surelly not be a dive site - konami code.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 18:33:57 -07:00
Anton Lundin
86bd9c7a90 Build libssh for android
Now when we build openssl for https support, its easy to add libssh2 to
get ssh support to, so this does that.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 14:09:37 -07:00
Anton Lundin
9a754972ed Fix libssh libssl linker order for Android
We need to link things in the correct order, even on android.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 14:09:31 -07:00
Anton Lundin
17bab9554d Build openssl without legacy protocols.
SSL2 and SSL3 are deprecated, and we can gladly leave them out of our
build.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 14:09:25 -07:00
Anton Lundin
b8b597ec72 Sanitize openssl building for android
The openssl build step polluted the variable space, and overrode the CC
env, thus breaking the build if you did build openssl in the same
session.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 14:09:19 -07:00
Dirk Hohndel
f8ce5788b8 Cmake: use correct variable to find make command
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 13:31:32 -07:00
Dirk Hohndel
829e816e2b Location edit: correctly position globe if create dive options are active
This way when the user looks through the list of completion options the
globe behaves in a consistent way, i.e., if the current dive site has a
GPS fix and the user activates one of the two options to create a dive
site with that GPS information, the globe show the right area (and the
globe zooms out if the current dive site doesn't have a GPS fix).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 12:50:56 -07:00
Dirk Hohndel
076f86202a Change API signature to act on dive_site, not uuid
This way in the future we can pass in a pointer to a dive site that isn't
linked in our dive site list yet (i.e., while we are editing).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 12:41:04 -07:00
Dirk Hohndel
f98ace681a Dive site edit: add second "create" line without completion
We now have TWO special entries. One with just what the user has typed and
one with the first completion of that text. This way both Henrik and Linus
can get what they want. I'm not sure I love this, but it's easy to revert
if the consensus is that this is too confusing. But it's much easier to
discuss this if people can actually play with it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 12:22:56 -07:00
Dirk Hohndel
4ec27b1751 KMessageWidget: hide messages regardless whether it's visible
Even if the message isn't visible hide it, don't just return.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 10:55:55 -07:00
Dirk Hohndel
45392615cd Dive edit: handle dive sites more sanely while editing
While we edit things, displayed_dive_site is the authoratative source of
data that should be displayed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 10:43:37 -07:00
Dirk Hohndel
0f906dad6f Don't reset editMode when refreshing the display
Just because we want to update the latest information on the Notes tab
doesn't mean we are done editing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 10:42:56 -07:00
Dirk Hohndel
9a5ac0d3ac Just call the member function
This code was embarrassingly indirect. Oops.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 09:52:24 -07:00
Dirk Hohndel
22c83af6ad Dive site handling: make sure the data in displayed_dive is updated
After an edit when the dive is redisplayed we are not copying the data
from current dive back over displayed dive (as the reasonable assumption
is that we just edited the displayed dive and copied the information into
the current dive)- so make sure that after the dive site handling the
displayed dive does in fact have the correct dive site information.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 06:40:16 -07:00
Dirk Hohndel
88015f402b Geo taxonomy: special case for looking up data of the displayed dive site
While we are editing a dive the displayed dive site may revert back to the
special uuid of 0. This means the user modified the existing site so the
displayed dive site is now different from the dive site referenced in the
current dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15 21:28:17 -07:00
Dirk Hohndel
874d3c4799 Dive site handling: special case for auto generated dives
When we download GPS data from the webservice we can end up with dive
sites that are simply a place holder for the the GPS fix. If we replace
the name of one of those sites we should just delete the site (assuming it
isn't used in another dive, which is unlikely but theoretically possible).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15 21:27:49 -07:00
Dirk Hohndel
1dbb6071bd Add helper function that checks if a dive site is in use
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15 21:25:26 -07:00
Dirk Hohndel
542e04266d Dive site handling: correctly handle the different scenarios
- do not create dive sites unless the user has accepted the changes
- all modification are tracked in the displayed_dive_site
- when the user accepts the changes, the real dive site list (and the
  selected dives) are updated according to what is in the
  displayed_dive_site

This adds quite verbose debugging messages and disables a section of code
that has a special case for data created by the Subsurface web service.
This code needs some re-thinking and should eventually go away.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15 15:44:15 -07:00
Dirk Hohndel
eb9f07c789 Android build script: minor adjustments
When retrying a clean build several libraries failed to build and I
finally tracked this down to the cross build tools not finding their
sysroot.

Also, on my main build server I have an older cmake version and one of the
tools claims to require cmake 3 but I see no actual incompatibility, so
I'm patching out that check.

Hackish? Yes. But it seems to work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15 10:37:57 -07:00
Dirk Hohndel
a5b378bdf4 Better text for dive site completions
Also make the explanation text slightly smaller.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15 10:37:25 -07:00
Dirk Hohndel
14016f83ff Better text for fake completion entry
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15 10:37:09 -07:00
Dirk Hohndel
9d622996ba Merge branch 'tomaz'
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 15:33:28 -07:00
Tomaz Canabrava
536469107d Fix selecting the first index
The way a QCompleter works is that it grabs whatever
data it has in the completerRole and sets it back on
the line edit.

I Bypassed the QCompleter delegate to show something
other than the completerRole (so, for instance, if you
write 'B', you could get 'Blue Hole' as the returned text,
but in fact the QCompleter has the 'B' as internal string
(because of the weird - and wrong way in which we are
dealing with completion - trying to complete for something
that's not inside the model yet).

So I hooked up a signal that will listen to the complete's
index, and if it's the first row() it's surely the special
case - then we bypass QCompleter return string and use
our own.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 15:22:00 -07:00
Tomaz Canabrava
cd3f10d5ad Offer an option to just complete the text
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-14 14:54:01 -07:00
Dirk Hohndel
4dfb39cc49 Cmake: don't hardcode the make command
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 14:53:15 -07:00
Tomaz Canabrava
9510f40db4 Remove quick edit dive site widget
Voted down by common consent.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 14:44:39 -07:00
Dirk Hohndel
70656cddea Location completer: show candidate sites on the globe
As the user scrolls through the possible completions, show them on the
globe as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 11:53:24 -07:00
Dirk Hohndel
44510f990b Location completer: show taxonomy according to preferences
The user has picked their preferences of which taxonomy data they want to
see. Show them what they asked for.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 11:53:05 -07:00
Dirk Hohndel
8c0d0de2e6 Location completer: give distance if known
If both the displayed dive and the dive site which is shown as a potential
completion have a GPS fix, indicate the distance.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-14 11:52:17 -07:00
Tomaz Canabrava
49ab30ae8b Change Location Management to make Linus Happy
Do not overwrite a dive site if the name is the same
as any other dive site,  create a new one and duplicate
the information.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-13 16:06:05 -07:00