summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2014-12-17Fix compilation with upstream MarbleGravatar Guillaume GARDET
<marble/MarbleDebug.h> is not availaible in all Marble versions. As Marble::MarbleDebug::setEnabled(verbose) is only used when MARBLE_SUBSURFACE_BRANCH is defined, also include header file only when MARBLE_SUBSURFACE_BRANCH is set. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-16Removed leftover qDebug()'sGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-16Put manual set-point changes at negative time at start of diveGravatar Robert C. Helling
Manually inserting set-point changes at negative times (left of the profile) caused the setpoint to end up at stupid values (probably some signed/unsigned confusion). This patch aligns them with the start of the dive. Fixes #774 Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-16Only setup marble debug output when comiling against our branchGravatar Dirk Hohndel
Otherwise this might break the compile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-13Enable Marble debug messages from Subsurface command lineGravatar Dirk Hohndel
Calling Subsurface with -v now gets you debug output. Of course, with a regular "release" build of Marble you still won't see much. But with the changes in the special Subsurface-testing branch you actually get some very useful information when debugging a lack of maps in Marble. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12Prevent the tank bar from overlaping the temperature graph.Gravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-12More lists organized alphabetically.Gravatar Tomaz Canabrava
I forgot this one, tsc. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Trivial white space fixGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10More temperature plot position tuningGravatar Dirk Hohndel
Depending on the options shown, the latest change appears to have moved the temperature graph a bit too low. This seems to work better in my experiments. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Rearrange the vertical positions to better accomodate the temperature graph.Gravatar Joakim Bygdell
Fixes #778 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-10Organize string-lists alphabetically for completionGravatar Tomaz Canabrava
This micro patch adds the ability to sort the lists alphabetically for user interaction. Dirk asked me to do this for location, but this actually changes for location, divemaster, buddy and suit. Seems a good thing for all. Fixes #780 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-09Make filter for filter criteria case insensitiveGravatar Dirk Hohndel
When opening the filter dialog we allow the user to filter the choices that are shown. The text that they enter in that filter for filter criteria should be treated as case insensitive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-09Hide any pictures shown when closing divelogGravatar Dirk Hohndel
Fixes #776 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-09Don't skip the first tag when filteringGravatar Dirk Hohndel
No idea why this code was there... but what it caused was an invalid access to checkState[-1] when a dive had that first tag. This explains why sometimes the dives that had that tag were shown, regardless of whether the selected filter criteria should have excluded them or not. Fixes #769 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-09Close and clear filters when closing divelogGravatar Dirk Hohndel
Otherwise non-sensical information stays behind. Fixes #777 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-08Emit the successful message the right wayGravatar Anton Lundin
The successful message was emitted in a some what older way then the other messages so it was always emitted, even on error. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-04Copy all cylinders when (re)planning a diveGravatar Anton Lundin
This changes the code so we include all the cylinders from a previous dive when we re-plain a dive. Otherwise we would have a hole in the cylinders table when we plan a dive based on a dive where we have unused cylinders, and it makes more sense to copy all of them rather than not. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-04Don't interpolate pressure while dragging waypointsGravatar Robert C. Helling
A profiler session in the planner shows that for deep long dives a significant amount of CPU time is spent in populate_pressure_information() which interpolates the cylinder pressure graphs. This patch introduces a "fast" flag for the replot of the profile which is active while the mouse button is still pressed and that suppresses this calculation. In the future, this flag could be used for other responsiveness tunings of the plot. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-01Context menu entry to change setpointGravatar Robert C. Helling
This patch adds a context menu entry to add a setpoint change event. In particular, this can be used to turn a logged dive into a CCR dive. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-01A widget to add a set-point changeGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25Tuning the manual CSV import dialogGravatar Miika Turkia
This allows more space between the input fields in the dialog. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25Allow user to select date format on manual CSV importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25Correct diveplan as it's dive plan everywhere else in plannerGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25Match agreed captalisation styleGravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-25Consistent representation of O₂Gravatar Tim Wootton
Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-24Tooltips for some of the manual CSV import fieldsGravatar Miika Turkia
Date and duration formats are not necessarily self explanatory so adding tooltips to explain the expected format. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-24Reset plot info pointer when painting several polyonsGravatar Robert C. Helling
For each polygon that we paint we have to step through the plot_info from the start again. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-23Make the button labels for apply / cancel of edits more consistentGravatar Dirk Hohndel
Before you could 'Cancel' the edit and then would be asked if you wanted to 'Discard' your changes or 'Cancel'. So clicking 'Cancel' cancelled the action of having clicked 'Cancel'. That's so confusing, it's even hard to explain. Yes, it uses "typical" language for user interaction and kind of makes sense, but it's not easy to understand for the non-technical user. With the new labels the user is asked to whether they want to 'Apply' the changes or 'Discard' them. And when they choose 'Discard' the verification question is still 'Discard' or 'Cancel'. That seems much more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-22Check error code of get_cylider_idx_by_use()Gravatar Robert C. Helling
If not cylinder with type DILUENT or OXYGEN is defined, this function returns -1 which should not be used as an index to an array. This patch adds code to check for this return value and exit gracefully. On line I marked with a comment. Someone more knowledgeable of that part of code than me should double check that return is here what we want. [Dirk Hohndel: fixed small oversight...] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-22Use our own file open dialogGravatar Dirk Hohndel
Clearly the static dialogs don't work. Even with the previous commit the dialog still said "Save" insted of "Open". So let's just assemble our own dialog and be done with it. I hope I got all the options right... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-22Don't ask confusing questions in open file dialogGravatar Dirk Hohndel
Using the SaveFile dialog to open a file caused it to ask the user if they wanted to overwrite a file when they actually tried to open an existing file. This fixes that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-21Use getSaveFileName() as the file open dialogGravatar Dirk Hohndel
This way we can specify file names that don't exist and therefore make our git syntax (/path/to/dir[branch]) work. Thanks to Tomaz for pointing this out. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-20Small changes to Yearly Statistics windowGravatar John Van Ostrand
Added a title bar with close button. Set an appropriate title. Centred the window relative to mainwindow. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-19Profile: adjust tank pressures at gas change (incomplete)Gravatar Dirk Hohndel
This code sets up the UI that will allow the user to adjust tank pressures at a gaschange event. The actual changing of the pressure is not implemented, yet, so this is disabled until someone finds time to do so. The scenario is this: a tec diver or sidemount diver without pressure sensors on at least one of their tanks still wants to reasonably accurately track gas consumption during a dive. The diver takes notes of the pressures at every tank switch (I find that odd, but apparently some cave divers indeed do that as they switch back and forth between different gases) and then wants to adjust the pressures in Subsurface to match those written down. One difficulty here is that the first and last pressure of a tank with no sensor data is still considered "sensor pressure" - this is basically an implementation detail in the code that is used to do the pressure interpolation to have constant-SAC pressure plots for tanks without sensors. So when we check if there is indeed no pressure data available at the gas change, we can't just work with the interpolated pressure - if this is the first (or last) time the tank was used, that pressure may be marked as sensor pressure. What's missing is the UI to enter the desired new pressure plus the black magic that actually inserts this into the dive in a way that doesn't break the assumptions in the rest of the code. I'm running out of time to do that but wanted to preserve this code so someone can continue this later. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-19Profile: don't offer to switch to an already active tankGravatar Dirk Hohndel
Adding a gas change to tank that we are already breathing from makes no sense, so let's not offer this. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-19Profile: add helper function to get the sample entry for a mouse positionGravatar Dirk Hohndel
This seems quite useful to have. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-19Profile: keep the plotInfo in the corresponding member variableGravatar Dirk Hohndel
We had the variable. As a pointer. Which we used memset to clear. Ouch - that smells like some bad cut and paste. With this change the object keeps the corresponding plotInfo around (just like some others do) and can use it later. I suspect this code could use some larger cleanup, but it's a bit too late for this in the development cycle, I guess. I'm sure I'll regret this in the future... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-19Don't offer to add a gas change if there is ony one gasGravatar Dirk Hohndel
In the context menu of the profile it makes no sense to offer the ability to switch gases unless there is a gas to switch to. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-18Replace other references to hohndel.orgGravatar Dirk Hohndel
The only place where I'm not sure if there are unintended sideeffects of changing over to the new domain is QCoreApplication::setOrganizationDomain Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-18Move update check and survey to the new domainGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-18Don't use DC configuration menu item as preference dialog on MacGravatar Dirk Hohndel
Qt by default uses a rather simplistic text heuristic to figure out if a menu entry is one of the special ones that need to be moved into the application menu (About, Preferences, Quit - but for Preferences anything that matches settings, options, config is used as well). This patch tells Qt to keep its hands off the the DC configuration entry in the menu. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17Only show tags in filter panel that are actually usedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17Ruler: fix weird behaviour near x = 0Gravatar Lubomir I. Ivanov
RulerNodeItem2::recalculate() does something which is apparently not a good idea in combination with RulerNodeItem2::mouseMoveEvent(). Each time the mouse moves, setPos() is called. Then in recalculate() the x() value is checked and if less than 0 it's changed to x = 0 (setPos(0, y());). This last call (setPos(0, y());) however does not work and the value remains less than zero leaving one of the ruler points outside of the graph. To solve the issue we add a silly explicit check if x() < 0 before calling setPos() in RulerNodeItem2::mouseMoveEvent(). The 'x() > timeAxis->posAtValue(data->sec)' strangely works on the other hand. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17Clarify the meaning of the values in the stats tabGravatar Dirk Hohndel
Extend the tooltips to be shown both on the labels and the values and add tooltips for all min/avg/max elements. To avoid confusion when only one dive is selected, no longer show min SAC or max SAC or min duration or max duration. Fixes #694 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17Clean up yearly statisticsGravatar Dirk Hohndel
Remove the unused upper widget, set a somewhat random but at least more reasonable default size and finally support Ctrl-W and Ctrl-Q shortcuts. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17For CCR dives, show plot for diluent and O2 cylinder pressuresGravatar Robert C. Helling
Also fixes a bug in the diluent pressure interpolation Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17Allow translation of the cylinder use strings for the UIGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17Add the ability to modify the cylinder use in the UIGravatar Dirk Hohndel
Thanks to Tomaz for writing a first draft of the delegate. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17When editing cylinders, copy all relevant dataGravatar Dirk Hohndel
Maybe it would be better to just copy the whole structure and then clear the things we don't want to copy? This seems fragile. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17Correctly copy weight systems on editGravatar Dirk Hohndel
We copied the string pointers instead of copying the strings. Once those got freed, things went downhill. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>