aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-06-08Keep last open dives directoryGravatar Helio Chissini de Castro
Last open dives directory is stored in settings, so no need to walk through all subdirectories all the time. Signed-off-by: Helio Chissini de Castro <helio@kde.org>
2013-06-07Remove the dive computer clicking on the trash icon.Gravatar Tomaz Canabrava
This code removes the dive computer clicking on the trash icon, the result is not saved on the XML, this will need a bit of hacking from some of the older guys. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-07Added the code to remove a dive computer.Gravatar Tomaz Canabrava
Added the code to remove a dive computer, plus a few fixes Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-07Removed the buttons on the Edit Dive computers.Gravatar Tomaz Canabrava
This edit dive computers thing doesn't really need buttons anyway. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-07Edit the name of the Dive Computer via dialog.Gravatar Tomaz Canabrava
The GTK version seems to be bugged on this, since the dialog doesn't save the dive computer nickname that I setted, but the Qt version shows less dive-computers than the GTK one on the same dive. I want somebody to do a quick review of my code too. :) I also plan to remove the 'OK' and 'Cancel' buttom, they seem to be overrated on this dialog - fairly uneeded. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-07Created a new dialog - Edit DiveComputerGravatar Tomaz Canabrava
Created a new dialog, Edit Divecomputer, it will currently only lists the divecomputers that are used on the xml file. I used the same method that the gtk version used, but only 2 divecomputers got visualized in the dirk dive data. I'll assume that it's correct and will fix it in the next couple of commits. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-07Allow ctrl-click to select dives incrementally from the globe viewGravatar Linus Torvalds
I guess we should support de-selecting dives this way too, but right now the interfaces only do selection. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-07Fix unused variable warning and spellingGravatar Linus Torvalds
Commit 4b405caa2c47 ("Clean up divelist dive selection") made the sort model variable in headerClicked unused, so get rid of it. Fix a speling eror closeby while at it. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-07Merge branch '129_moveOverlay' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-06-07Merge branch '112_webservices' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-06-06Fix movement of the tooltip overlayGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-06Hoocked up the Apply button.Gravatar Tomaz Canabrava
Hoocked up the apply button - Didn't tested ( as I frankly don't know what the expected result should be. ). but the app is not crashing, yey. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-06Hoocked up the buttons and the parsing of the XML.Gravatar Tomaz Canabrava
The XML is now being correctly parsed, Clicking on Help will open the browser pointing to the api site, and clicking on cancel will cancel the download. Clicking on Apply still doesn't apply, but that's next. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-06Added initial support for download dive info from the subsurface web service.Gravatar Tomaz Canabrava
Added initial support for download dive info from subsurface web service, the current code only downloads and output the xml downloaded in the debug area. Now I need to parse things up and plug the unplugged stuff. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-06Try to get rid of unnecessary reloads of the dive listGravatar Dirk Hohndel
Don't call refreshDisplay() after preferences change. This strangely somehow leads to a situation where I need to move the mouse over the dive list before changes to the units are reflected. When calling reload() do not force layout change / resort unless that is the intention. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-06Add delete dive context menu entryGravatar Dirk Hohndel
Getting closer to the way this should work. Adjusted the call to reload to not switch back to tree view and resort (oops). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-06Implement the context menu a different wayGravatar Dirk Hohndel
It seems that this is the way this is supposed to be done - instead of manually looking at what kind of click we get, Qt decides when to create a context menu for us - this way things like the Windows Menu button will work automagically. As an example I also implemented the "remove dive from trip" functionality, which exposes some other bugs (like the fact that the dive that isn't part of a trip ends up being sorted at the very end of the dive list). This commit contains a "testSlot" implementation to remind me how to figure out which dive / trip we are on. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-06Only show expand/collapse context menu when in tree modeGravatar Dirk Hohndel
The options make no sense when in list view mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-06Distinguish between "collapse" and "collapse all"Gravatar Dirk Hohndel
Some users might want to really see nothing but trips, others might want to be able to keep the trip with the selected dive open. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-06Add context menu to dive listGravatar Dirk Hohndel
So far we support "expand all" and "collapse" all. This still needs to be restricted to only be shown when in trip / tree mode. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Clean up divelist dive selectionGravatar Linus Torvalds
Since we have a "selectDive()" method, let's just use it rather than opencoding it. Similarly for "unselectDives()". Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Fixing some issues with the dive selection after OK on preferencesGravatar Dirk Hohndel
These changes should be correct - but they still don't fix the problem that after we click 'OK' on the preferences (regardless of whether any changes were made), the first dive is set as current dive and shown in the map window. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Keep selected dive in viewGravatar Dirk Hohndel
Somehow we managed to break this. Again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05First cut at selecting dives from the mapGravatar Linus Torvalds
We'll want to enhance this: better logic for which dives are near the selection, and it's probably best to have a "control-click" that adds the dives to the selection rather than deselecting all the old ones. But it's already useful. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Get single click on the map widget in a callback for further processingGravatar Dirk Hohndel
Now Linus can write the code that selects the right dives... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Show locations with same name on the map if they are more than 50m apartGravatar Dirk Hohndel
Not showing them at all was a little too blunt of an instrument. There likely are dive spots with the same name at different resorts. And even at the same resort you could have multiple morings for the same dive site. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Reload globe after dive location was modifiedGravatar Dirk Hohndel
This way a change to the location name is immediately reflected in the map display. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Merge dive tags when merging divesGravatar Linus Torvalds
.. otherwise the dive tags generally end up cleared when you download a duplicate dive from another dive computer. This uses MERGE_NONZERO, which means that if one of the dives has tags set, we'll prefer those tags. If both dives have tags set, we take the tags from the first ("preferred") dive. We could do a "just or all the bits together" too. But this way we at least take a set of tags that are consistent (ie we don't get both "boat" and "shore" set unless one of the original dives already had that inconsistency) Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Merge branch 'minMaxAvgWidget' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-06-05Update the current dive when no dive was selectedGravatar Dirk Hohndel
The check to only update the dive if there were already dives selected before seems bogus. I'm sure I put it there for a reason but it seems flat out wrong. This gets triggered when you select a trip by clicking on the trip header. In that case all dives get unselected (amount_selected = 0) and then we try to select the first dive in the trip - which fails because of this check. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-04Added a new widget 'MinMaxAvgWidget'Gravatar Tomaz Canabrava
Added a new widget, MinMaxAvgWidget, a simple widget that displays values in 'min, max, avg' fashion. it has a setMaximum, setAverage and setMinimum methods, that is userful for setting the minimum, maximum and average of stuff. Ah, it also shows the minimum, maximum and average of things. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-04Stop showing the first dive after a preferences changeGravatar Dirk Hohndel
What is missing is the code to actually show the RIGHT dive... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-04Rewrite readSettings to do what it should have done from the startGravatar Dirk Hohndel
This function was supposed to take the default_prefs into account but clearly wasn't. Now it should be much more readable and maintainable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-04Explicitly store UI values to prefsGravatar Dirk Hohndel
This helper wasn't called as intended - but because of the syncSettings call which emits settingsChanged this only became visible for the default_filename. Next I need to clean up what is called for the settingsChanged signal. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-03Tie all the pieces together and make Preferences work as intendedGravatar Dirk Hohndel
Not Apply / Close without Saving / OK work as designed. And things get correctly stored and reset. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-03Implement Apply / Close without Saving for preferencesGravatar Tomaz Canabrava
This hooks up the buttons correctly Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-02Merge branch 'selection'Gravatar Dirk Hohndel
2013-06-02Once again try to fix the selectionGravatar Dirk Hohndel
Things got broken. Again. We no longer kept track of the selected dives in our structures which broke statistics. This attempts to fix that, but appears to still have a bug when selecting trips. Sometimes this results in 0 dives being selected according to our data structures, while Qt happily shows all dives of the trip as seected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-02Correctly implement Metric / Imperial / Personalize preferenceGravatar Dirk Hohndel
The code so far had completely ignored Metric / Imperial. Turning this into a three way radio box seemed to make much more sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Use a slightly shorter date string for Info tabGravatar Dirk Hohndel
This way the spacing of the elements looks nicer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Much better solution to avoid the gtk+ style on LinuxGravatar Dirk Hohndel
Thiago showed me how to find out which style is in use and if we see a user is running gtk+ we simply switch Subsurface to Oxygen (using the old plastique in the previous patch was a result of reading an old Qt book, I guess). Solved-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Merge branch 'showGas'Gravatar Dirk Hohndel
2013-05-31Show the gas with the pressure diagramGravatar Dirk Hohndel
This is a feature that had been requested a few times in the past and when debugging my "show only used gases" commit I realized that this would have been extremely useful to have... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Scroll to (and re-expand) the selection when sorting and movingGravatar Linus Torvalds
The keyboard movement wouldn't scroll to the newly changed selection. Similarly, when sorting the dive list, we'd end up losing the currently selected dive (and generally collapsing the currently exposed trips). This adds the scrolling/exposing logic for those cases. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Show GF for calculated ceiling above the graphGravatar Dirk Hohndel
The hardcoded position we previously had would make the text invisible if a ceiling was drawn during the middle of the dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31List only the gases used in the Info tabGravatar Dirk Hohndel
The equipment tab will still show all defined gases, but the info for the dive should only list the ones used. Also change the name of the two gas related boxes to better reflect the data that is shown. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Hack to force plastique style on LinuxGravatar Dirk Hohndel
I'd much rather be able to check if it is using the Gnome style and only then force plastique but I haven't been able to figure out how to do that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Fix compiler warnings for maintab.uiGravatar Dirk Hohndel
Simply renaming all the elements with name conflict. None of these names appear to be referenced anywhere so this seems like a rather odd thing to happen - why doesn't the tool just rename them for me when I open and close the file in designer? Or at least warn about it? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Create and install the documentation tooGravatar Thiago Macieira
The default build will now create the HTML documentation (only the HTML one) and the install rule will install it. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Merge branch 'bug123_designStatistics' of ↵Gravatar Dirk Hohndel
https://github.com/tcanabrava/subsurface Signed-off-by: Dirk Hohndel <dirk@hohndel.org>