aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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>
2013-05-31Merge branch 'bug_123_designInfo' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-31Display the Subsurface manual in the help widgetGravatar Dirk Hohndel
This adds a helper function to determine the Subsurface data directory (are we running from build directory? installed on Linux? installed on Mac? - still need to add support for Windows). This same function is then used by both the setup for Marble and for the help browser. This assumes that the user-manual.html file has actually been built and installed (which we don't do by default with the current Makefile). Right now there are rendering issues with our manual in the help browser widget - I'm sure this can be fixed... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Added the 'F1' key as standard shortcut for the HelpGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-31Added preliminary support for a Manual Display Widget.Gravatar Tomaz Canabrava
Added a preliminary support for a manual display widget, it's a very basic HTML text-browser, so it can have hyperlinks, images and everything that a 1995 browser has. The long term plan is to subsittute this manual by a more modern 'help' using QGraphicsView, that will interact on the application level. See #121 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-31Cleanup minor issues with ceilings for individualy tissuesGravatar Dirk Hohndel
In commit b8d31d8534b ("Show ceilings for individual tissues") Robert inadvertently broke the connection from dc_ceilings to red_ceilings and also didn't correctly enable the checkbox for all_tissues when calc_ceilings was already set in the preferences before the dialog was created (and therefore the connection in the .ui file isn't run). There's also a simplification / cleanup to the code deciding whether to show all the tissues. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-31Show ceilings for individual tissuesGravatar Robert Helling
I think that displaying tissue loadings either as pressure or as percentages is not very intuitive but that it makes much more sense when translated to ceiling depths. This change enables just that for the 16 tissues in our calculated ceiling and visualizes this in the profile graph. There is a checkbox in the preferences to turn this on. If enabled, all tissues having non-trivial ceilings are also shown in the info box. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Removed the code to center-allign labels on the StatisticsGravatar Tomaz Canabrava
Since I already put the center-allign label on the interface designer, this was just dead code. getting rid of it. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-30Redesign of the Statistics tab try1Gravatar Tomaz Canabrava
This moves the contents of the statistics tab to groupboxes, so it's similar to what we had in GTK, but a bit prettier. it's not what I plan to do in the final form, since I think that a few 'min max avg' can be in it's own widget ( and maybe a cute graph showing the values would also be nice. ) but its an improvement from what we had. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-30Align Labels on center.Gravatar Tomaz Canabrava
There was already a code for that on the maintab.cpp, but since I moved all labels to groupboxes, the code stopped working, and I tougth it'd better to kill the code since it's faster and safer to use the interface builder for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-30This is a redesign-tryout of the Info panel.Gravatar Tomaz Canabrava
This is a redesign-tryout of the info panel, it's not the way that I want to do, actually - I think that textual representations are quite boring, and we can do much better if we use better widgets, for instance, a Calendar to show the date, a Termometer to show the temperatures and so on. This version has a fixed layout, but I'll most probably try to make it more dynamic in the future. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-30Add a proof of concept for filtering the Dive List,Gravatar Tomaz Canabrava
Press CTRL+F and a line edit will appear, whenever you write on that will be used as a filter against all columns. The results are maybe somewhat surprising in trip mode, but when sorting by another column this shows some potential. Hit ESC to remove the filtering. I need to find a better position to put the Widget, but it's a proof of concept. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Puts maintab as 'DocumentMode'Gravatar Tomaz Canabrava
This small patch enable maintab to be in 'Document Mode', this means basically that it size is smaller and there's not a line separating the widget anymore, giving the user a more smooth experience. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-30Fixed running the Download dialog multiple timesGravatar Dirk Hohndel
We never reset the 'downloading' variable. Solved-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Enable Marble Google Sat lookup when run as a MacOSX appGravatar Henrik Brautaset Aronsen
Following Dirk's commit ae2c132, add support for custom google sat data in a MacOSX app bundle Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>