aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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>
2013-05-30Hook up the Download dialogGravatar Dirk Hohndel
The download already worked, but we didn't display the new dives. This introduces a new slot for MainWindow that updates what is displayed in Subsurface after files were imported. With this change we can successfully download ONCE - but when trying to download a second dive the dialog doesn't appear to get refreshed the right way - the OK button doesn't appear to work anymore (Cancel however does). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Do a better job finding Marble Google Sat filesGravatar Dirk Hohndel
First try if Google Sat is already installed as a provider (and just use it if it is). Then use the executable path to make an educated guess where these files might be found as part of Subsurface. We now install the necessary directory tree under $(DESTDIR)/usr/share/subsurface/marbledata Still far from perfect - but this should work at least on Linux. MacOS will need a different modifier for the path and Windows I haven't even thought about, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Fix compilation: error: ‘GeoDataDocument’ does not name a typeGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Add the *.ui files, the Makefiles and other headers to subsurface.filesGravatar Thiago Macieira
Makes it easier to open them using Ctrl+k in Qt Creator. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Add --help command line optionGravatar Henrik Brautaset Aronsen
Added a simple usage text on the command line. Also added a --verbose alias for completeness. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Don't display "show" in front of every columnGravatar Henrik Brautaset Aronsen
When (de)selecting columns, a the list of columns have a "show" in front of every entry. We don't need that. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Stop building prefs.cGravatar Dirk Hohndel
The only tiny function in there that was still needed seems to fit nicely into main.c Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Fix sorting by ratingGravatar Dirk Hohndel
In commit beb4ed38f264 ("Add a "sort role" for sorting the dive list") Linus forgot to add a case for the rating value. Now all columns sort correctly. With this I think we can close the bug... Fixes #111 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Ignore ui_* filesGravatar Dirk Hohndel
This makes using git from within QtCreator much easier.
2013-05-30Code layout changesGravatar Dirk Hohndel
Tomaz convinced me (with help from Linus) that it might be a good idea to go with the compacter "single line" case statements in some specific instances where this makes the code much more compact and easier to read. While doing that I changed Linus' code to do 'retVal = ...; break;' instead of just 'return ...;' - this is more consistent and makes debugging a little easier. And while doing all that, I also cleaned up divelistview.cpp a little bit. And removed an unused variable. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-29Code Cleanup.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-29Fixed the regression of selection not being stored from table to treeGravatar Tomaz Canabrava
This fixes the regression that I caused in the last commit, where the selection was being correctly reestored from tree-to-table, but it was incorrectly being restored from table-to-tree. I also added a bit of speedup on the view while changing columns. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-29More work on bug 111, Sorting works as it should.Gravatar Tomaz Canabrava
Sorting is now working as it should, changing from table to tree, keeping the selection from table to tree ( but there's a regression on tree to table conversion, I'll try to fix it in the following commit. ). this commit also cleans a lot of boilerplate code that I wrote to bypass a graphics bug, that I seem to have correctly fixed in this version. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-29Reimplement the Sort method to change from Tree / List, and remember selection.Gravatar Tomaz Canabrava
Things are working as they should, but I hit on -probably- a Qt bug that makes painting on the table view a bit weird ( it only updates the painting by moving the mouse around ). I'll try to fake the mouse movements in a couple of commits after this one. There's also a few columns that are not being correctly sorted, probably something to do with the SortRole. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-29Add a "sort role" for sorting the dive listGravatar Linus Torvalds
By default, sorting is done by the display role, but then we end up sorting by the string we display, which is almost always the wrong thing. So this adds a new "SORT_ROLE" that is used for sorting, and then the data lookup can return the raw data we want to sort by. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-29Merge branch 'bug111' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-29Fix message widget visibility.Gravatar Sergey Starosek
Hide message widget when closing dive with no GPS coordinates. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-29Fix default zooming.Gravatar Sergey Starosek
Set default zoom level only when at least one dive selected and user have not changed it. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-29Fix a mistake naming for the da_dk alias localisationGravatar Henrik Brautaset Aronsen
The country code is da, not dk. Suggested-by: Sylvestre Ledru <sylvestre@debian.org> Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-29Add --version to command line optionsGravatar Henrik Brautaset Aronsen
Displays Subsurface and libdivecomputer versions. Suggested-by: Jef Driesen <jefdriesen@telenet.be> Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-29Correct the ceiling preference handlingGravatar Dirk Hohndel
Added the red dc ceiling as preference option. Hooked them all up together so the sub-preferences are enabled when the master preference is set (for 3m and red ceiling). Use the options in the profile plotting functions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>