summaryrefslogtreecommitdiffstats
path: root/qt-ui/globe.h
AgeCommit message (Collapse)Author
2013-12-02Fixes Setting the dive-location via the map.Gravatar Tomaz Canabrava
This patch adds a context menu to set the dive location via the globe, being the dive with a coordinate or not. It also fixes setting the dive location on edit mode. Fixes: #315 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-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-10-17Fix marble losting track of zoom levelGravatar Dirk Hohndel
Marble had a bug on the way it treats zoom level, there's no way for it to find out if it's user-input or algorithm input and when a user clicks on a dive, it spins and centers on it, but if the user clicks on another dive when it's still spinning, it will get the zoom in the actual state ( spinning, usually zoom is far away from the first position ) and continue the spin to the other position. This patch works by saving the first location and triggering a helper function with a timer that will only update the zoom level if the timer is not active ( and thus, will not get the bugged zoom state set by the animation. ). Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-19Consistently use slots / signalsGravatar Dirk Hohndel
We started out using Q_SLOTS and Q_SIGNALS but then changed our mind. Let's make this consistent again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Get single click on the map widget in a callback for further processingGravatar Dirk Hohndel
Now Linus can write the code that selects the right dives... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-05Show locations with same name on the map if they are more than 50m apartGravatar Dirk Hohndel
Not showing them at all was a little too blunt of an instrument. There likely are dive spots with the same name at different resorts. And even at the same resort you could have multiple morings for the same dive site. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Fix compilation: error: ‘GeoDataDocument’ does not name a typeGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-25Avoid marble widget resize when switching divesGravatar Henrik Brautaset Aronsen
The "no dive location" message box was displayed above the marble widget, which made the layout splitter move horizontally. Made the message box as an overlay on the map instead. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22The never ending, futile fight for whitespace consistencyGravatar Dirk Hohndel
I just need to write a tool that does this... Signed-off-by: Dirk Hohndel <dirk@hohndel.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>