aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-10-01Fix selecting invalid dive siteGravatar Tomaz Canabrava
This patch fixes an invalid dive site selection when you where typing the name of a dive site for your current dive. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01printoptions.cpp: add missing tr() callsGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-01Don't zoom out the globe if the dive site has no GPSGravatar Dirk Hohndel
This may or may not look intuitive, but it can cause problems with the zoom seemingly stuck all out (because of the timeouts). So instead stay where you are. If the current dive site has GPS then its flag will be bigger and brighter - so there still is visual feedback. But there's less crazy zooming around. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30Fix multi-dive edit regarding Dive SitesGravatar Tomaz Canabrava
Now it correctly sets the same dive site instead of creating a new one for each dive. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30Better way to handle the tooltip for dive sitesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30Make 'Choose dive site' work as 'Rename'Gravatar Tomaz Canabrava
But it will actually create a new dive site, not just rename the existing one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30Remove unused codeGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-30Don't emit the filter end signal too soonGravatar Dirk Hohndel
First make sure all the data in displayed dive is correctly recorded, otherwise things could get overwritten when the filter is removed and we redisplay the current dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29Delete unused dive sites after editGravatar Dirk Hohndel
This way they don't continue to clutter the globe. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29Correctly handle updating the name of dive sites from GPSGravatar Dirk Hohndel
If the user downloaded the GPS data from the Subsurface webservice before naming a dive site, we run into a special case where entering a new name for a dive location should just update the name of the automatically named site which already has the correct GPS information. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-29Whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28Make importing of GPS locations less verboseGravatar Dirk Hohndel
These messages are extremely useful to understand what Subsurface is doing, but they are a bit too wordy for normal use. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28Cloud storage: show progress bar when using Save with cloud storage openGravatar Dirk Hohndel
When you have openend cloud storage, the Save and Save to cloud storage are basically the same thing... so we need to show the progress bar in that case, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-28Make progress dialog show up more reliablyGravatar Dirk Hohndel
Counterintuitively, setting the minimum duration to 200ms actually makes the dialog show up while waiting for the first progress signal. I had thought that setting it to 0 would make it show up right away, but with a value of 0 it waits for the first progress notification and with slow internet connections that can take quite a while (and with some git operations no progress notification will be sent out the whole time). So this should make the situation with the progress bar a little better. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27Do not set text on the Location LineEditGravatar Tomaz Canabrava
Since the location is only true with a valid uuid, set the uuid on it, it will search for a valid name and set there. this fixes a few inconsistencies handling the locations. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27Do not try to center if already on centerGravatar Tomaz Canabrava
This makes the globe smoother while moving around same gps dive sites. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27Center on the dive site also via keyboardGravatar Tomaz Canabrava
Now mouse and keyboard navigation over the list of current dive sites will update the marble globe position. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27Change globe position when mouse over dive siteGravatar Tomaz Canabrava
When the mouse moves over the dive site list, the globe should show the current one under the mouse. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-27Only get the icon for add/geocode onceGravatar Tomaz Canabrava
Each time we searched for an icon on the qt resource we had to open, inflate, create, store, delete the icon. now we search for it only once, use as cache and make the world a better place. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25Reset progressbar on disconnectGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25Disable update firmware button on any other actionGravatar Anton Lundin
Firmware updates can only be done on a newly opened device. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25Probe and expose OSTC3 model informationGravatar Anton Lundin
This looks at the OSTC3 hw descriptor and exposes that model info as a read-only line edit, so you can see in clear text the name of the model of computer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-25Rename Suunto config field to be consistentGravatar Anton Lundin
All the conflicting fields for suunto vyper configs are named _1, so rename this one to be in the same style. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-24Initialize currUuidGravatar Gaetan Bisson
Signed-off-by: Gaetan Bisson <bisson@archlinux.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Add icon for georeference in preferencesGravatar Miika Turkia
It looks odd if one item is missing an icon. Thus suggesting (yet another) placeholder icon for the preferences dialog. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Dive edit: if the user didn't pick a dive site, don't mess with itGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Merge branch 'NewLocationEditDropdown'Gravatar Dirk Hohndel
2015-09-23Disable edit dive site if already in edit modeGravatar Tomaz Canabrava
If user selected a new dive site (a dive site that doesn't exists yet, to be created) and clicked in edit it would edit the *old* dive site. this is not optimal, but since it removes a severe regression it will be like this (I won't change it till 5.0) for a while, until I have time to actually code something not messy for that. The current dive location management is *much* nicer than the old one, code-wise. No more magic numbers, magic codepaths, magic constants, qt black magic. It's straigth-forward code simple to follow, simple to edit. This was something I was actually postponing for 5.0 but I managed to get a boost of subsurface time at work. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Handles Dive Selection gracefullyGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Code cleanupGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Much simpler code to set the dive siteGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Don't crash on new dive siteGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Do not display popup with modifiersGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Select an index if no index is selectedGravatar Tomaz Canabrava
Defaults to first row. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Set the correct dive site uuidGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Correctly fix the popup positionGravatar Tomaz Canabrava
When the message to 'This dive site is being edited' was being show while the popup to choose the dive site, the line edit was being covered. now it correctly moves to the correct place. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Removed a ton of dead codeGravatar Tomaz Canabrava
Unused dead code / hack for the old QCompleter Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Handle palette change for dive site selectionGravatar Tomaz Canabrava
If you select a dive site with a different uuid than your current dive.dive_site_uuid, you should get a different pallete to state clearly that something changed. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Fix keyboard inconsistenciesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Fix new/existing dive site choicesGravatar Tomaz Canabrava
Only set the currType and currUuid if text changed. This is needed because if you hit key_down it would set NEW_DIVE_SITE because a keypress on the lineedit was due. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Set the current dive site uid / textGravatar Tomaz Canabrava
Start to make this thing usefull: Upon selecting the current index or writting something on the line edit, we need to set the dive site. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Correctly handle space and tabGravatar Tomaz Canabrava
Space and tab should select the item in the itemview and hide it; enter and return also do that automatically. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Block focus out eventGravatar Tomaz Canabrava
The line edit wasn't being properly updated regarding its paint event. Turns out it was because it received a focus out event and then stopped refreshing the paint. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Random fixes and improvementsGravatar Tomaz Canabrava
Whitespace fixes, constructor fixes, new slot (still unused) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Whitespace fixGravatar Tomaz Canabrava
Sorry. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Fix correct size of the popupGravatar Tomaz Canabrava
Correct the popup visibility. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Handle dive site activationGravatar Tomaz Canabrava
Connect the view activated signal to send us the index. Removing debug output that I forgot inside it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Made it possible to keypress againGravatar Tomaz Canabrava
Click outside of the popup closes it, also handles theme enter / return keys. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Start to handle keypressesGravatar Tomaz Canabrava
Keypress management is one of the main functions of the completer, so we must create an event filter and hook things up properly. key esq / enter should close the popup (and not leave us with a popup open and no way to close it - it breaks X) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Display the popup in the correct placeGravatar Tomaz Canabrava
The popup should be shown beneath the QLineEdit. this code here is shamelessy stolen from the QCompleter source code because I really didn't want to rethink the correct way of doing this. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>