aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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>
2013-11-15Avoid std::string: QByteArray is enough and already compiled inGravatar Thiago Macieira
No need to add more code to Subsurface by bringing in std::string too. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Once again remove debug output.Gravatar Dirk Hohndel
Oops again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Enable a context menu to remove dive handlers.Gravatar Tomaz Canabrava
This commit enables a context menu to remove dive handlers, because it was hard to find that ctrl+click selected it, then a delete button press removed it. it's better now. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15changed tag completition to case-insensitiveGravatar Maximilian Güntner
When completing tags, the case of the completion prefix should not matter. Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Escape all problematic characters when saving a tagGravatar Maximilian Güntner
Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Support translating UTF8 stringsGravatar Maximilian Güntner
Interpreting UTF8 encoded strings using tr() instead of trUtf8() and encoding the string back to utf8 again leads to serious encoding errors. Fixes #230 Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Fix dive planner widgetGravatar Dirk Hohndel
In commit 0f50b73f9e88 ("Fix planner / add dive handling of DiveHandler Points") some issues were introduced. While it is fine to remove the artificial first point at the surface, the commit broke the special handling for o2 == -1, i.e., the usual case where a default gas needs to be picked. This generalizes the algorithm previously used to also look to the right, now that we are no longer guaranteed that there is a first point to our left. This also cleans up some whitespace damage introduced in the same commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Manually add trips from dive list context menuGravatar Dirk Hohndel
We had all the logic, we were just lacking the UI. Fixes #243 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Fix potential crash when merging tripsGravatar Dirk Hohndel
strdup doesn't like to be passed a NULL pointer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Fix planner / add dive handling of DiveHandler PointsGravatar Tomaz Canabrava
Dirk, is this really necessary or it's just something that you forgot to remove? this is adding a bit of pain to fix some issues on the planner, so I'm commenting this out untill you have a bit of time to look at it. It looks like this was added to handle the gas in the pos-1, but you reverted if so, this completely reverts it, and things works as expected again. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Adds the first DiveNode at 5meters / 10minutes when clicking on plusGravatar Tomaz Canabrava
Adds the first DiveNode at 5m / 10 minutes when clicking on the plus button on the DiveNotes Table. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Fix adding DivePoints on the planner via the table.Gravatar Tomaz Canabrava
Somewhere we broke this, most probably in the code that activated the planner to be used together as an 'add dive'. This commit makes the code workable again. There's one thing, though. if the model is empty, this will add something in the first point - it's behaving strangely. I'll try to fix this in a way that's invisible to the user, but overall, why are we inserting something in the first(0,0) time and depth? Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Use the correct font for the Air Types Model.Gravatar Tomaz Canabrava
The air types model had a font bigger than the other models, this patch creates a data() method that correctly delivers the correct font. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Correctly handle changes on the CylinderModel to update the AirModel.Gravatar Tomaz Canabrava
What happened before was that the AirTypes model was only being updated when the user requested to change the air by clicking directly on the Air, in the planner ( but not on the Air Table. ). This fixes it by calling 'repopulate' whenever the cylinder model changes ( by adding, removing and changing something.) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Close the Air list when clicking outside of it.Gravatar Tomaz Canabrava
This patch closes the air list when clicing outside of it, making the use of the planner more pleasant. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15More code cleanup.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Good deal of code Cleanup.Gravatar Tomaz Canabrava
Rewrite of the way we handle the last used directory for the loading / saving of files. we didn't reuse anything for the code, and that's error prone and also dumb =p. Reworked that so we have a nice method to help us out on that. lastUsedDir and updateLastUsedDir Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Make qmake generate the install rule for user-manual.htmlGravatar Thiago Macieira
The default behaviour is to skip files that don't exist. It does that to decide whether to create an $(INSTALL_FILE) rule or an $(INSTALL_DIR) one. We need to add a setting so that it will ignore the not-found error. Found in Qt 4's own doc/doc.pri: # Install rules htmldocs.files = $$QT_BUILD_TREE/doc/html htmldocs.path = $$[QT_INSTALL_DOCS] htmldocs.CONFIG += no_check_exist directory Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Remove some unneeded member functionsGravatar Anton Lundin
We can wire qt to call the right functions directly, so we don't need these members. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Planner: Default to GF from prefs.Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Planner: use a QSpinBox for GFLow/GFHighGravatar Anton Lundin
Switch to using a QSpinBox instead of a QLineEdit. This makes it a bit more intuitive and now you can see how the deco plan changes based on the GF's. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-15Make the info box look as it did in 3.1Gravatar Anton Lundin
In the Gtk version there were no option to disable the showing of time in the mouse over, so this removes that option to limit the amount of clutter in the settings panel. This also renames the time and temperature to match the names they used to have. T -> @, Temp -> T Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Update version number for 3.9 BETAv3.9Gravatar Dirk Hohndel
Our version numbers are purely numeric, so it's actually just 3.9 :-) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14First stab at updating ReleaseNotes.txt and READMEGravatar Dirk Hohndel
This needs a lot more work. As does the manual that needs a major rewrite. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Change the menu structureGravatar Dirk Hohndel
Mostly based on suggestions by Tomaz and Luisa (but with some changes based on my rather strongly held believes). I also tried to clean up the shortcut keys. Not sure if I got this right. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Hook up the tank change and tank update for the plannerGravatar Dirk Hohndel
This failed spectacularly when I first tried it, so I put it on the back burner. And it appears that with all my recent fixes for "add dive" as a side effect this is working, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Expand the trip of the first selected dive.Gravatar Tomaz Canabrava
I probably broke this a while ago, as I was not using the big dirk dive file to test ( just using some random files over the test folder. ) Now it's working as it should. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Code Cleanup - Removed unused var.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Correctly sets the size of the Air Types on the plannerGravatar Tomaz Canabrava
The last commit correctly setted the minimumSize, but I forgot to set the maximum size, and thus, it still expanded. sigh. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Makes the Air Types widget on the planner smaller ( but expanding.)Gravatar Tomaz Canabrava
This patch makes the Air Types widget on the planner smaller, since on most dives users will only enter 1 to 2 dives, it's not good to have so much whitespace. this makes it smaller for small screens, and it will grow on bigger screens where space is not an issue. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Fix Last Column adding a horizontal Scroll on the Dive List.Gravatar Tomaz Canabrava
Fixes the last column adding a horizontal scroll on the dive list, since we have the hability to show / hide columns, I had to create a helper method to discover what is the last column and set the size of it very small so no scroll is created. Also, I'v set the setStrechLastSection to true. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Fix edition of alphanumeric input on equipments.Gravatar Tomaz Canabrava
This patch fixes the edition of alphanumeric input, columns like depth accepted '23ft', '20m' or '30', with an inplicit conversion to the unit. But the code ignored that the input could have a 'ft' or 'm' ( ot anything else for that matter. Signed-off-by: Taiane Ramos <exhora.tat@gmail.com> Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Fix some random compiler warningsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-14Sort the dive table after adding a diveGravatar Dirk Hohndel
This commit scares me. Any pointers to dives or indices into the dive table... anything like that is invalid after we resort the table. Well, not technically "invalid" (as in bad pointers), but after re-sorting the table these will possibly not be pointing at what we expected. This starts with the selection being "wrong" after we add a dive that isn't the last dive (once we click OK the chronologically last dive will be selected). But of course without doing this, our #1 assumption about the dive_table is broken. The dive_table is supposed to be in chronological order. Best advice of course would be "don't enter dives out of order" - but of course that's not realistic. Fixes #234 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>