summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2013-05-20Move visibility Star widget to the DiveNotes tabGravatar Dirk Hohndel
This looks much better and seems much more contextual. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Display the statisticsGravatar Dirk Hohndel
This would be correct if the current selection code wasn't broken. Right now we only add to our internal notion of what is selected - we never deselect anything. Once that is fixed, thestatistics should be correctly displayed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Try to add a StarWidget for visibilityGravatar Dirk Hohndel
It's not editable. And of course it continues to look like utter crap - even more so now since this is left aligned and everything else is centered. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Close needs to clear the Globe and the DiveNotesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19When no dive is displayed, the DiveNotes field should not be editableGravatar Dirk Hohndel
This also fixes a potential crash if no dives were loaded and the user started editing the fields and clicked OK. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Replace glib file/directory handling with equivalent Qt codeGravatar Dirk Hohndel
I hope this is indeed equivalent... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Implenent file_save and file_save_asGravatar Dirk Hohndel
This allows us to do the right thing at exit (and also connects to more of the menu actions to actually do something). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Show the correct question at exit when there are unsaved changesGravatar Dirk Hohndel
We want to give the user the option to 'cancel' and not exit the program, to 'save' the file, or to say I'm 'OK' with losing the unsaved data. This does NOT implement the actual save / save-as, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Figure out if the user changed anything when editingGravatar Dirk Hohndel
And mark the divelist changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Rename buttons for dive editGravatar Dirk Hohndel
The old names made sense in the initial model (where you'd click on the edit button to start an edit). The new names seem much more natural given what we do now. Also a tiny code cleanup removing a redundant if statement. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Make direct edit the style of choiceGravatar Dirk Hohndel
Plus minor coding style fixes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Fix edit behaviorGravatar Dirk Hohndel
Commit 7b00668b400b ("Improve the Dirk edit mode.") had what looks like an "autocomplete" typo. This also stops us from changing the text on the button that in this edit mode is always just the "OK" button. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Merge branch 'chooseEditMode' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-19Continue populating the DiveInfo tabGravatar Dirk Hohndel
Pulled one more helper from statistics-gtk.c (but didn't modify the code there to use it as that code is no longer being compiled). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Improve the Dirk edit mode.Gravatar Tomaz Canabrava
The dirk edit mode will be triggered as soon as the user clicks on the field that he wants to edit. then he can edit all fields, till he press ok / reset. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-19Made possible to choose the edit style on compile timeGravatar Tomaz Canabrava
This is just a for choosing the default edit style in the future. I prefer the new edit style as the user is sure what the hell is going on ( ie - if he chooses to edit, he is editing, there's a message warning him that he is editing and everything else is blocked till he finishes editing. ) and the GTK version is 'edit whenever I feel like', wich I think is more unsafe but dirk asked me to put an option and let the others choose. e Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-19Removed unused GTK calls onto the Qt versionGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19Make the Text on the DiveList be 30% smaller than other textGravatar Tomaz Canabrava
This makes the DiveList be similiar to the GTK one, comparing the size of the text. The current code makes text on the table be 30% smaller. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-18While editing the left button is renamed to "OK" to accept the changesGravatar Dirk Hohndel
This seemed more logical than keeping it as "edit" and basically having to hit "edit" a second time in order to save a change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Make impossible to change dives while editing one.Gravatar Tomaz Canabrava
This is to prevent loss of data, so if the user is editing something, either cancel the edition or save it, to continue moving around on the Dive List. - Only the dive list is affected, user can still play with the globe and the profile. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Added option to edit the selected dive.Gravatar Tomaz Canabrava
Added option to edit the selected dive. Now the user can click on 'Edit', and a nice box will appear stating that the dive is in edit mode, and the user can edit all of the 'Notes' tab fields, including the rating. When the edition is finished, the user needs to click on 'edit' again to mark as accepted, or in reset to reset the fields to it's original state Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Work around broken Marble on DebianGravatar Dirk Hohndel
This is a major hack. Debian appears to be missing a necessary header file for Marble to work correctly. We include this header file for now and hack the Configure process to recognize that we are on Debian and force using our local copy of the header file in that case. This may be needed on Ubuntu as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-17Compile fixGravatar Dirk Hohndel
Forgot to add this before pushing the previous commits Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-17Don't add a dive on the globe twice ( well, actually, different dives with ↵Gravatar Tomaz Canabrava
same location ) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-17Prettification of the map view.Gravatar Tomaz Canabrava
Just some prettifications, better defaults, etc. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-17Borrowed the KMessageWidget code to better show passive information.Gravatar Tomaz Canabrava
Borrowed the code from KMessageWidget from Aurelian Gateau, Kdelibs, to better show passive information and notifications. instead of a popup blowing in the user's face, a nice, animated and well designed widget will gracefully fade-in, show the notes, and fade out when not needed anymore. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-17Added the possibility to change the coordinates of a dive.Gravatar Tomaz Canabrava
Added the possibility to change the coordinates of a dive. it's too intrusive in the moment, but it was a proof of concept. so I'll commit as is and try to find a better way to warn the user what's going on in the future, using something less terrible than a popup exploding in his face. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-17Adds rotation while selecting a dive.Gravatar Tomaz Canabrava
This adds rotation, a very, very shinny feature. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-17removed whitespace.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-17Added real support for the marble widgetGravatar Tomaz Canabrava
The marble widget now shows the dive locations and also will center on the dive that the user clicked in the dive list. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-17Adds preliminary support for Marble WidgetGravatar Tomaz Canabrava
Adds preliminary support for marble widget, alongside with the dive list. my idea is to let the view stay there at the left of the dive list since we got a lot of unused space and a globe is something nice to have - so you can look around where did you dived, the dives near the one that's currectly selected, and so on. I'm not using OpenStreetMaps right now, but a good thing about marble is that it is skinnable - so for instance, a dive school could present a dive lesson using subsurface with a globe from the 1600, to make it feel like 'history'. This version will only compile to Qt4. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-16Fix loading a dive via command line.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-16Don't deleteLater a null pointerGravatar Thiago Macieira
When the application launches, the oldModel is null. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-16Fix loading a second dive, after the first file was loaded.Gravatar Tomaz Canabrava
This patch fixes loading a second dive-file after the first one had been loaded. it simply clears some information and makes sure that the current selected dive is invalid when the file closes. I also did a bit of code cleanup on this one to make things simpler in the future. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-16Fixed the loading of some mapsGravatar Tomaz Canabrava
On some maps, the lack of setting up the dc before plotting the dive-computer nick caused a division by zero, breaking the correct visualization of the dive. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-16Correctly set the unselected dive.Gravatar Tomaz Canabrava
The selected dive was being set to zero when the program started, but zero is actually the first dive. There were workarounds on the gtk code for that probably Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-14Don't add half a kilo/pound when adding weightsGravatar Henrik Brautaset Aronsen
The weight management widget added 500 grams / 0.5 lbs when a new entry was added. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-14Fix the focus issues, load a profile when load a file.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-14code to show profile againGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-14Fix inaccurate weight and temperature display in dive listGravatar Henrik Brautaset Aronsen
A nonexisting temperature (mkelvin==0) was displayed as -273°C. Weight was always displayed with an extra 500 grams/0.5 lbs. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-14Clean up some typosGravatar Henrik Brautaset Aronsen
Cosmetic commit to clean up some of the annoying typos in qt-ui Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13removed a unused debug.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13shift-key + shift-click + key corner cases covered.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13Speed fixesGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13Trying to make the DiveList selection behave correctlyGravatar Tomaz Canabrava
And rip out all the code that Dirk put there to do that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13Change setText(QString()) to clear()Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13Fix segfault on mouseOver at the Profile with an invalid dive selected ( trip )Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-12Merge branch 'Qt-selection' into QtGravatar Dirk Hohndel
2013-05-12Allow walking the dive list with the cursor keysGravatar Dirk Hohndel
Figure out what is our first selected element (in case we start out from a multiple selection) and then move to the next logical element. So the code traverses an expanded tree (from a trip 'down' to its first dive or 'up' to the last dive of the previous trip - and similar from a first dive in a trip 'up' to its trip and from a last dive in a trip 'down' to the next trip. This does not take 'shift-cursor-up/down' into account (i.e. manual selection extension). Instead with just cursor up and down a single dive (or single trip) is selected. My guess is that the code will make someone's eyes bleed. Be warned. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-12Modify selection changed slot to deal with trips correctlyGravatar Dirk Hohndel
If a user clicks on a trip, all the dives in a trip should be selected. But if a user selects a range of dives that happens to have a trip header in it, then only the range of dives should be selected (the trip header is marked as 'selected' for visual consistency, even though not all dives in this trip are selected). This also changes the code to scrollTo the first selected dive instead of just expanding the parent. This seems to give us a more pleasant visual appearance (trying to keep the selected dive centered in the dive list) and as a side effect no longer hides the first dive trip at program start (before this change the first dive in the first trip would be the top entry in the dive list, with its trip just out of sight above). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>