aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-11-19Only translate default tagsGravatar Maximilian Güntner
We translate only tags we know since possible translations of custom tags (provided by the user) may be out of context and therefore wrong. Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19A first update of subsurface V4.0 manualGravatar Willem Ferguson
This starts mostly from scratch. It removes big chunkgs of the old manual, the old pictures and starts with new visuals and new descriptions. A lot more work is needed, but it's a good start. Signed-off-by: Willem Ferguson <willem@willem-Precision-M4700.(none)> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Clear selected trips after restoring selectionGravatar Dirk Hohndel
The rememberSelection() / restoreSelection() functions ONLY handle selected dives, not selected trips. This is a bit of a misfeature, but because of that we need to make sure we clear our notion of selected trips when we use restoreSelection() Fixes #285 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Hook up MOD in the preferences dialogGravatar Dirk Hohndel
For some reason this was never connected. Oops. Fixes #267 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Sanity check on gas percentagesGravatar Dirk Hohndel
O2 + He + N2 = 100% (well, there are some other gases, but this is close enough) Since N2 can't be negative that means we should refuse any change where O2 + He > 100% (or o2.permille + he.permille > 1000). Fixes #280 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Immediately update the dive flag label when editing location textGravatar Dirk Hohndel
This seems like a much nicer user experience. Editing a location's name is immediately reflected on the globe label, the moment it happens. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Immediately show new locations on globe widgetGravatar Dirk Hohndel
When modifying or adding a dive location on the globe widget while in dive edit or dive add mode, we now show the modified / new location right away on the globe (assuming a location name has been given). This makes it much easier to manually reposition a dive location. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-19Handle double clicks on globe during dive edit modeGravatar Dirk Hohndel
When we are editing or adding a dive, the globe widget needs to act differently. Instead of directly changing the lat/lon of selected dives, it needs populate the coordinate text field as if this information was entered by the user (effectively all it is is a way to more conveniently enter coordinates). As a side effect, this also allows us to change the location once it has been added (you just need to go into dive edit mode to do so). There is one weird issue that occasionally (and I can't quite reproduce this) I get lat/lon very close to 0/0 (as if the globe widget was centered on 0/0 and not on whatever it is actually showing). That still needs to be addressed. Fixes #239 Fixes #131 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Quick hack to make the dive add icons smallerGravatar Dirk Hohndel
This is about the right size, but the scaling pixelates the icons. So this is not really a fix, just a hack. See #269 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Change the order of the increase / decrease buttons on the planner.Gravatar Tomaz Canabrava
Change the order of the increase / decrease depth button on the planner since 'bottom' means increase depth and 'top' means decrease. Sorry I'm too undiver currently :) See #269 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Do not let the dive have the 0 value.Gravatar Tomaz Canabrava
The number 0 means "this dive has not been numbered". So manually assigning this seems wrong. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Make it posible to renumber dives.Gravatar Tomaz Canabrava
If the user doubleclicks on the number of the dive in the dive list, this will present to him a dialog to change that number. Pressing enter will renumber the dive if there's no dive with the same number already. Fixes #288 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Anchor bottom of the dive ruler editor ro items on the DivePlannerGravatar Tomaz Canabrava
This patch is a crude attempt to 'anchor' the bottom of the Dive ruler editor ( the new graphics ) to the bottom of the scene. since QGraphicsView doesn't have a good way to modify the origin point of an item, I'v just shifted all other items up a bit, this way the 0,0 point is in the bottom of the drawing and I can safely move it around, making it bottom-anchorable. :D Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Just some code cleanup.Gravatar Tomaz Canabrava
This flag is added to all items on the parent, so there's no need to implement this on all of them. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Fix various issues with the dive add / edit manual dive codeGravatar Dirk Hohndel
- get_gas_from_events does NOT always set o2/he. It only updates them IFF a matching event is found; so we need to make sure we start out with a valid gas mix - the way we tried to restore the edited dive in case of an edit to a manually added that is cancelled was completely bogus. Way too complex when we can simply and reliably simply store the dive and then copy it back Fixes #270 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Don't add spurious 5m/15ft node at 10 minutes when canceling editGravatar Dirk Hohndel
When cancelling the edit of a manually added dive, we should send the sample with timestamp 0 to addStop - that's a magic value and causes us to add a node at 5m/15ft and 10 minutes instead. Since the dive always starts at the surface, calling addStop is redundant, anyway, so let's just not do that. See #270 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Improve shift time functionalityGravatar Dirk Hohndel
In commit 85fab31c71fc ("Shift times of selected dives") we added a dialog that didn't align its content very well. This change improves the layout (I hope) and makes the labels in the layout clearer (earlier and later seem easier to correlate with the direction of the shift). The original commit also forgets to deal with the consequences of shifting the dives. The dive list needs to be re-sorted (as the relative order of dives could have changed) and be marked as changed. And we should try to maintain the selection across these operations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-18Shift times of selected divesGravatar Robert Helling
This patch adds the possibility to shift the times of all selected dives by a fixed amount to correct for time zone problems or mis-set dive computer clocks. Select the dives and right click in the dive list. [Dirk Hohndel: added .ui file to FORMS and fixed some whitespace damage] Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Make edit / dive add in progress check more consistentGravatar Dirk Hohndel
We need to check for this whenever we do something that directly or indirectly closes the data file. Previously we were missing the straight "quit". Also, we should consistently check for both editing or dive addition. And lastly, we should use consistent language with commit 0e9cd0944284 ("Make editing message consistent with button labels"). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Removed the ugly icons on the visual profile editorGravatar Tomaz Canabrava
Removed the ugly icons on the visual profile editor and replaced them with the much better looking ones that Luisa designed. This was not a simple search and replace since Luisa's design was a bit more sophisticated. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Add "add dive(s) to trip above" featureGravatar Dirk Hohndel
This honors the sort order of the dive list when figuring which trip is "above". It works both on a single dive or all selected dives. This also fixes a couple other cases where the dive list selection and trip display could get messed up. Fixes #287 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Fix a couple of problems with dive mergingGravatar Dirk Hohndel
- Dive list no longer has messed up trip entries - Dive list is now correctly marked as modified after trips are merged - When data file is closed, the list of selected trips is cleared which avoids a potential crash when loading a new data file Fixes #286 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Remove ununsed variablesGravatar Dirk Hohndel
The warnings are distracting - and the variables are truly obsolete by now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Make editing message consistent with button labelsGravatar Tim Wootton
Changes Ok button to a Save button Modifies editing messages to reference buttons Save and Cancel. Fixes #245 Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Add more file types to import/default log file dialogGravatar Henrik Brautaset Aronsen
- Allow ssrf as a default log file suffix. - Allow sde/dld/db as import log suffices (we don't use the LIBZIP and SQLITE3 ifdefs anymore) Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Make it possible to set the coordinates via map for all selected dives.Gravatar Tomaz Canabrava
This patch makes it possible to set the coordinates on the map for all selected dives. Note however that after a coordinate is set, user cannot edit it unless he multi-edit it with a dive that doesn't have coordinate's set. this is just because it's missing a 'edit coords' button. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Mapped files of the planner icons on the subsurface.qrc fileGravatar Luisa Domingues
[Dirk Hohndel: fixed several typos and changed the alias of the planner related plus / minus icons to avoid duplicate aliases] Signed-off-by: Luisa Domingues <luisapiresdesign@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17just added the files with the parts of the buttons for the planner.Gravatar Luisa Domingues
these parts must be put together, they were saved in parts to make it easy for hover effects, etc. Signed-off-by: Luisa Domingues <luisapiresdesign@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-17Use date format from system localeGravatar Anton Lundin
Instead of hard coding a American date format, let qt use whatever the locale suggests. Fixes #248 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Fix crash when entering a dive via dive-add on a empty table.Gravatar Tomaz Canabrava
We were selecting garbage, not anymore. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Fix showing the tooltips on the profile.Gravatar Tomaz Canabrava
We incorrectly mapped the profile's widget tooltip based on the global screen coordinates. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Fix a crash with trying to show the tooltip on the profile.Gravatar Tomaz Canabrava
Fixed a crash with trying to show the tooltip on the profile, with an empty profile. Since the widgets are not created yet, we got a crash trying to access the toolBarProxy. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Fix dive mergingGravatar Linus Torvalds
This limits merging dives to dives that have at most half an hour of surface time between them. That "half hour" is kind of a random thing to pick, but it's not horribly horribly wrong. It also changes the semantics of "merge selected dives" to something that actually works pretty well: you can select a whole range of dives, and it will merge only the ones that makes sense to merge. I tested it, and it's reasonable. I could select all my dives from one dive trip, and then do "Merge selected dives", and it did the right thing (Dirk: I selected the florida trip, and it merged the aborted "missed the trench" dive with the _actual_ "trench" dive). I'm _slightly_ hesitant about this in the sense that maybe some crazy person actually would want to merge dives with more than half an hour of surface time between them, but it really doesn't seem to make much sense. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Removed duplicated method.Gravatar Tomaz Canabrava
This patch removes a duplicated method: get_divenr and get_index_for_dive. The two are exactly the same ( if my c is not broken, but I may be broken since I'm working like crazy for almost 30h nonstop. ), so please take a good look before applying this one. [Dirk Hohndel: Tomaz took the slightly broken of the two implementations, so I switched that out for the correct one] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Small code cleanup.Gravatar Tomaz Canabrava
This was bugging me for a while. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Expand the trip of the newly selected dive.Gravatar Tomaz Canabrava
I hit this bug on deleting dives and the newly selected one got inside a trip, that wasn't expanded. anyway, easy one. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Selects the dive before the deleted ones.Gravatar Tomaz Canabrava
This patch makes a selection just after the dives that got deleted, or nothing if the list is empty. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Do not break Dive Headings on trip mode when a delete dive is done.Gravatar Tomaz Canabrava
When the dive is deleted, we force a recreation of the dive list, this is done because we were broken by design on the first transition to the Qt infrastructure - one thing to change for 4.1, but no time for 4.0. We forgot to ask the headers to 'please, span more than one row, please' when we recreate the model. easy =) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Fix wrong handling of Dive Table, and revert some wrong changes.Gravatar Tomaz Canabrava
This patch just reverts some wrong changes that I'v done on a past commit ( sorry ) and correctly handles the selectDive, by using a IDX instead of the dive pointer, as dirk told me it's extremely error-prone since the pointer can change. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-16Planner: Make cylinder and time/depth boxes scaleGravatar Anton Lundin
When moving the horisontal splitter the cylinder and time/depth boxes didn't scale down but got "stuck" on a certain height. This makes them scale down when pulling the horisontal splitter up. I would prefer if we could scale them individually, but i didn't manage to get that going, but i didn't manage to get that going. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15This moves the removal code to the model.Gravatar Tomaz Canabrava
It's very important when programming via Model/View, in gtk or qt, to not mess with the model data outside of the model. We were deleting stuff that the model controlled outside of the model, so it thought that there was still data there. This fixes the deletion part, but there are also lots of other parts that I'll tackle in the next commits. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Include icons in the Windows installerGravatar Dirk Hohndel
Also fix the dependency / ordering issue with running makensis Fixes #252 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Don't close the active file or start "add dive" while editing a diveGravatar Dirk Hohndel
Seems rather obvious to me - the language in the warning doesn't sound very smooth, though. Fixes #246 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Forget old filename on starting a new log.Gravatar Robert C. Helling
Fixes #253. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Don't create stop at time zero when re-editing manually added diveGravatar Dirk Hohndel
To our addStop method time = 0 & depth = 0 are a magic flag. And since we always start at the surface, that is assumed, anyway. So let's just not add a stop for that when re-creating a plan from a dive. Fixes #254 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Get rid of the plannerGravatar Dirk Hohndel
This is nothing but an indefinite time sink. Let's focus on things that the majority of our users actually need and use. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Maintain opened the trips of the selected dive.Gravatar Tomaz Canabrava
In various occasions the branches of selected dives got collapsed because I'm dummy boy and didn't programmed the logic correctly. This one correctly works for the few cases that I'v tried, I'm verifying if the current selected index is a trip or a dive, and asking to expand it. The expanded state is lost because we delete and recreate the model ( and we do that because we can switch between tree and table model ). Now I think we correctly track the cornercases. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Fix the sentense 'collapse' to 'collapse others' and scroll to it.Gravatar Tomaz Canabrava
This patch changes the string 'collapse' to a more meaningfull 'collapse others', it also scrolls the view to the first selec ted index, since after collapsing the others, things could be in the wrong position., Fixes #233 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Make more context menu functions act on all selected divesGravatar Dirk Hohndel
Remove from trip and delete both should deal with all selected dives. Fixes #247 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Make tooltips work in the profile toolbarGravatar Taiane Ramos
This patch enables tooltips on the profile toolbar. Tooltips were being treated as text to be shown at notification area. Now it is verified if the cursor was positioned over the toolbar when it activated the event. If so, tooltip is shown normally. Fixes #238 Signed-off-by: exhora <exhora.tat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>