summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
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>
2013-05-12Don't print temperatures that are below 200KGravatar Dirk Hohndel
That threshold is of course ridiculous and arbitrary - but it seems like a good assumption to make that anything below that is DEFINITELY not valid data. Because of the way the scene grows automatically in Qt, printing these texts would squish the profile into one thin line. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-12Fix crash if we have no divecomputer informationGravatar Dirk Hohndel
The string we print is lame, but it keeps things consistent (and prevents us from dereferencing functions in uninitialized objects). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-11Fix crash in DiveTripModel.Gravatar Amit Chaudhuri
A left click in the treeview header leads to a call to createIndex which results in a null pointer dereference. Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Improve the text labels in the profileGravatar Dirk Hohndel
Only 1 decimal, please. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Tweaks to maintabGravatar Amit Chaudhuri
Align statistics tab labels as per infotab. Amend helper function to show degree symbol for temp measurements. Change order of member initialisation list to match order of decl (ProfileGraphicsView::ProfileGraphicsView) Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Merge branch 'fixCrash' of https://github.com/tcanabrava/subsurface into QtGravatar Dirk Hohndel
2013-05-10Crash fixed on clicking on the canvas while no dive is loaded.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-10Make nextDC and previousDC work and assign shortcutsGravatar Dirk Hohndel
Cursor right and left now work again to switch between divecomputers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Fixed loading the first dive via command line on the profile.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-10Fixed Zoom and Positioning of the Ruler ItemsGravatar Tomaz Canabrava
The items are still being placed far from each other when zooming in - I need a bit of help with the math for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Fix some compiler warningsGravatar Dirk Hohndel
Passing the alignment as int instead of float or double was actually a bug as CENTER is defined as (-0.5) ... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Change the plot text so it receives a QPointF instead of x,y, and a ParentGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-10Fix some compiler warningsGravatar Dirk Hohndel
Passing the alignment as int instead of float or double was actually a bug as CENTER is defined as (-0.5) ... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Fix showing the stuff on the canvas in the right positions.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-10Only drag the tooltip panel when not zooming.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-10Fix Tooltip Positions, code cleanupGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-10Uses the correct rectangle to englobe the profile grid.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-09Enable defautl_filename in settingsGravatar Dirk Hohndel
We don't have a UI to set it, yet, so you have to manually set it in the config file, but once you do that it works... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-09The Zoom is working just like the GTK Version.Gravatar Tomaz Canabrava
This code enables Zoom in / Out with the Wheel, and it also enables panning by moving the mouse around. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-09Removed unused code that I'm sure it's safe to delete.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>