aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2013-11-28Fixes ToolTip Item showing out of boundaries tooltipsGravatar Tomaz Canabrava
This patch fixes ToolTip Item showing out of boundaries Tooltips when in resizing animation. Fixes #294 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28Make it possible to hide some columns on the Cylinders Equipment pane.Gravatar Tomaz Canabrava
This patch makes it possible to hide some columns on the Cylinders Equipment pane. The 'remove' and 'type' are impossible to hide, since they are the most important ones for a non-tech diver. Fixes #281 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28More gradient on the partial pressure graph.Gravatar Tomaz Canabrava
This patch adds a bit more of gradient on the lines for the partal pressure graph grid, it also moves a tiny bit to the side the even numbers so it's easyer to read when they are too near each other. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27Show/save weights up to and including last validGravatar Anton Lundin
Previous show and save code would have aborted at the first invalid weight system. This makes sure we save and show all weight systems up until and including the last valid. If we had: integrated: 1kg belt: 2kg ankle: 3kg And changed belt to 0 kg, we would have only saved integrated 1kg, and nothing about the belt or the ankle weights. This will save all of them, and show all of them. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27Show cylinders up to and including the last validGravatar Anton Lundin
Previous code aborted at the first invalid cylinder. This instead finds the last valid and prints all the ones up until that one. Fixes #295 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27Rephrase tooltipGravatar Dirk Hohndel
This seems to better explain what the button does. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27Make sure we keep our notion of what's selected in sync with the UIGravatar Dirk Hohndel
When editing a dive, a group of dives or a trip we need to make sure that we don't lose track of which dives and trips were selected. Otherwise we might act on dives that DON'T appear selected in the UI but that we think are still selected. Fixes #304 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27Remove some constants and use helpers insteadGravatar Anton Lundin
We have allot of helpers, use them instead of local variants. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26Changing the preferences should update the Add Dive interfaceGravatar Tomaz Canabrava
Since all internal units are in mm we needed to only update what's shown on the interface. Fixes #299 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26Fixes the positioning of the ToolBarGravatar Tomaz Canabrava
This is a workaround, I plan to remove that toolbar from inside of the Profile for the next version, but since it's there for now, let's keep it. This patch hides the toolbar when the zoomLevel != 0, since the profile is unclickable while zoomed... Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26Remember Trip Selection.Gravatar Tomaz Canabrava
This patch remembers the trip selection across the Dive Tree Model. It's a tiny bit big because we used to have a variable 'selected trips' that's now calculed dynamically - this is more future proof. This is a start of Un-cluttering the view ( for 4.1 I hope to reduce the code in this class to nearly a half. ) Fixes #303 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26Fix ToolTip disappeared when resizing the ProfileWindowGravatar Tomaz Canabrava
When resizing the ProfileWindow and the tooltip was out of boundaries, it was really out of boundaries and there was no way to get it back ( besides re-expanding the window. ) this patch moves the tooltip to (0,0) and don't save that position, so when the window is re-expanded, it will move to the correct location again Fixes #237 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26Re-enable adding a location to selected dive via double-click on the mapGravatar Vinicius Machado
The fix for 'double click on the map shouldn't zoom' had broken the selection of the current location for the selected dive, this patch fixes that. See #291 Signed-off-by: Vinicius Machado <vsmachado@gmail.com> Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-25Switch tab title to Trip Notes when handling a tripGravatar Dirk Hohndel
And switch back to Dive Notes when back to looking at a dive. This makes things more consistent... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-24Create a drop down to choose default cylinderGravatar Anton Lundin
This also renames the ui element to match. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23Adding trip based statisticsGravatar Miika Turkia
This adds trip based statistics to the Yearly Statistics view. Signed-off-by: Miika Turkia <miika.turkia@nixu.fi> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23Use the default cylinder if definedGravatar Dirk Hohndel
With this every cylinder downloaded from a divecomputer that doesn't provide cylinder data, and every cylinder manually added anywhere will default to the default cylinder that is set in the preferences. For people who most of the time dive with the same equipment (always on dive boats with AL80, or almost always diving their personal HP119) this should be a nice improvement. If you don't like this behavior, simply leave the default cylinder setting in the preferences empty. This commit also fixes the incorrect s->value call (should be s->setValue). I wonder what this did to the default filename before... Fixes #145 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23Create a text entry for default cylinder in preferencesGravatar Dirk Hohndel
We don't do anything with this just yet. And frankly, a drop down of the cylinders that we know of would be even better. But hey, it's a start. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Save button on menu calls InfoWidget saveGravatar Taiane Ramos
When editing a dive and clicking save button on menu bar, it saved dive information but didn't mark dive as not being edited anymore. For closing file, user should always click on the save button on the bottom of the page and then saving it. Now when clicking save button on menu bar, it will call the accept_changes before saving to disk. Signed-off-by: exhora <exhora.tat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Work around QPlainTextEdit / QPainter bug on MacGravatar Dirk Hohndel
Actually, it's not so much "work around", it's just "disable our eye candy" for tags on Mac. This is quite frustrating. When we do anything that has the QPainter touch the widget from our GroupedLineEdit::paintEvent() path then the QPlainTextEdit::paintEvent() doesn't render the text of the tags. Fixes #298 Sort of. But I guess tag text without eye candy is better than eye candy without tag text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Hide everything 'floatable' by default on the globe.Gravatar Tomaz Canabrava
Later we spacifically enable the scale, but Dirk asked me to use the bare minimum of marble. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Disables zooming by double click and context menu on marble.Gravatar Tomaz Canabrava
Marble is a weird piece of Qt software, it seems that it wasn't thought of being a library when first written. Most of its features are not achieved by subclassing && overriding one of Qt default methods, instead we need to eventFilter for almost everything ( which is a pain, and a bit error prone - see our combo box delegate *puke*. ) This one's ready, only one thing though - if we want to implement our own context menu, we will need to use the eventFilter, and not the contextMenuEvent. Fixes #291 [Dirk Hohndel: this does not disable the context menu for me...] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Show user-hidden widget when choosing Show AllGravatar Tomaz Canabrava
A user could have hiddden and lost any of the four panels on the interface. Now when he chooses 'show all', if a part of the interface is hidden, it will be shown again. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Small code cleanup on the CylindersModelGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Better positioning of the text on Weightsystems table.Gravatar Tomaz Canabrava
Same as the cylinder, but for weightsystem. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Added a bunch of tooltips where I thought it was sane.Gravatar Tomaz Canabrava
I think we should actually fill the app with tooltips and whatsthis hints. justsain ;p Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Better positioning of the text on the table cells.Gravatar Tomaz Canabrava
Better positioning of the text on the table cells. On KDE systems the text got too near the line that divided the cells, this way the text is placed on the middle of the cell. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22Fixes the correct sizes of the tables when first open.Gravatar Tomaz Canabrava
This patch fixes the correct sizes of the tables when first opened. It was defaulting to 'resizeToContents', but most of the cases when first opened we got no content, and this was bad. Now I'm defaulting to 30 when on the 'REMOVE' column and 80 on other columns. Fixes #189 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Cleanup and bugfix gaschange event printingGravatar Anton Lundin
When a gaschange to air happened, the code did name += name=+ tr("air") which probably was due to the block being just confusing with all the ?: Unrolls to proper if statements, and fixes the bug. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Add optional support for stopdepth import from csvGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Add optional support for cns import from csv filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Add optional support for po2 import from csv filesGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Give room for more options in csv dialogGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Make temperature optional in csv importGravatar Anton Lundin
This adds a checkbox to be able to import csv files without temperature. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Rework csvimportdialog to make room for featuresGravatar Anton Lundin
This rewires things a bit to make room for new features coming. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Fix a couple of warningsGravatar Dirk Hohndel
Removing unused variables. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Added a configuration option to have gf_low apply at max depth instead of at ↵Gravatar Patrick Valsecchi
deepest ceiling. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Refactoring of the configuration handling.Gravatar Patrick Valsecchi
Before, when clicking the OK button on the preferences GUI, we were updating in-memory preferences from the GUI, saving them to the configuration file from the GUI, reloading from the file to the in-memory preferences. Then, to add to the ducplication, when the application was exiting, some fields were saved again. Basically the first step and the last step were useless appart from the fact the the other steps where missing a few fields here and there. This patch removes the first step and fixes the missing fields. Signed-off-by: Patrick Valsecchi <patrick@thus.ch> ACKed-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Fix typoGravatar Henrik Brautaset Aronsen
All hail the groub! Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Hack to make tank selection work on MacGravatar Dirk Hohndel
This is an ugly hack as it partially breaks the ability to abort a selection (so if you click outside of the combobox, the last value you hovered over is selected). But this seems much better than not being able to select a different tank at all. Fixes #275 (and by 'Fixes' I mean "hacks to sort of make work"... but the trac automation is rather inflexible in which words it understands...) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Complete add bookmark for the profile context menuGravatar Dirk Hohndel
This (together with the commits fixing the QMessageBox title) should finally close all the issues in bug 250. Fixes #250 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Work around QMessageBox not showing its title on MacGravatar Dirk Hohndel
This is a bit hacky and simply adds the title to the message text when compiling on a Mac, but hopefully this will be enough. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Quiet down warning about return in non-voidGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21Quiet down warning about duplicate nameGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Trigger redraw of the Dive Info pane on preferences changeGravatar Dirk Hohndel
If we change the units we need to redraw the info on this pane. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Collect per tank SAC rateGravatar Dirk Hohndel
This is a bit painful, but we basically walk the samples and pick the valid tank from the events. And then we do a simple discrete integration to figure out the mean depth per tank and duration per tank. And then we assemble all that into per tank statistics. Strangely the value calculated here seems slightly higher than one would expect from the overall SAC rate. This inconsistency should be investigated a bit further, but my guess it it's based on the assumption that the DC provided mean depth is possibly more accurate than what we can calculate from the profile. Fixes #284 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Add gas change event from profile context menuGravatar Dirk Hohndel
This allows to add missing gas change events to the currently shown dive computer. Only gases defined in the Equipment section are offered. Fixes: #250 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Use the correct dive to create the gas listGravatar Dirk Hohndel
If we are adding a dive, it's the stagingDive, otherwise it's the current_dive that we need to look at. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Hiding events doesn't change the dive_tableGravatar Dirk Hohndel
So let's not mark it as changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Small whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>