[Marble-devel] GPS
Torsten Rahn
rahn at kde.org
Tue Mar 3 09:05:15 CET 2009
Hi,
On Monday 02 March 2009 23:52:12 Andrew Manson wrote:
> What i mean by reimplementing a QGraphicsView and QGraphicsScene is that
> we could look into Extending the given Qt framework classes that
> usually deal with this sort of stuff giving us a whole load more
> functionality without too much fuss.
Yes, being able to use QGraphicsView would give us some advantages (and in the
really long term it is certainly a good aim). However it also poses quite a
few obstacles:
The biggest being that different projections are not supported (and from what
I've seen would be rather hard to implement as QGraphicsView was never meant
to be anything beyond a 2D canvas).
Currently the only big advantage I see that we'd get is the fact that float
items could get implemented easier.
So what I'm thinking about would be a careful "migration track" that would
converge into the direction of QGraphicsView:
What we still need to change in Marble is that the geodata objects should get
painted in a scene graph approach: Like a QGraphicsItem (or like the
AbstractLayers in Andrew's work) the geodata objects should paint themselves.
1. So the first step would be to add a QGraphicsItem-style paint method. (And I
think that Patrick intended to implement that ;-)
2. Then of course one could let MarbleWidget inherit from QGraphicsView and
convert the float items over to be QGraphicsItems.
The second step mostly just would give us the advantage that we'd be able to
use QWidgets on the canvas.
I myself don't consider the second step too important at the current point:
What we IMHO currently rather need is implementation of user-requested
features than yet another long period of refactoring with little merit.
And with the first step we already get the most important aspect out of
QGraphicsView (and keep a possible future migration path towards QGraphicsView
an option).
Torsten
> The only real problem to overcome
> would be the Subclassing of the QGraphicsView as we would have to
> consider the spherical rendering and correct accordingly. Alternativly
> the mapping could be done at at the QGraphics Scene level but this would
> mean that each QGraphicsItem would have to maintain its coordinates in
> both the spherical and the flat ( rectangular ) projections. Either way
> the use of the QGraphics Library could be really helpful.
>
> -Andrew Manson
>
> ps. moderators please ignore the repost of this message from mansona
> [at] tcd , Thanks
>
>
>
>
>
> _______________________________________________
> Marble-devel mailing list
> Marble-devel at kde.org
> https://mail.kde.org/mailman/listinfo/marble-devel
More information about the Marble-devel
mailing list