[Marble-devel] Re: RoutingModel.h missing?
Dennis Nienhüser
earthwings at gentoo.org
Thu Oct 7 08:07:55 CEST 2010
Hi,
the routing related classes are not yet exported: There'll be some API changes
in them in the near future that will change the way route request options are
set and some other changes to make it easily usable from the outside. I want
to export them for KDE 4.6, however, to support that kind of usage.
If you're willing to adapt your code to any API changes, you can manually
export the missing headers (RoutingModel, RoutingManager, RouteRequest may be
enough) now. I haven't fully tested that yet, YMMV. It's probably a good idea
to CC yourself to bug 248086 [1] which I'll update with the progress on this.
Note that the code posted in comment #1 in that bug is already a bit outdated,
RouteSkeleton is now RouteRequest and shouldn't be created on its own, but
requested from the RoutingManager.
Regards,
Dennis
[1] https://bugs.kde.org/show_bug.cgi?id=248086
Am Donnerstag, 7. Oktober 2010, um 06:03:50 schrieb Miguel Chavez Gamboa:
> Hi,
>
>
> Sorry for the inconvenience caused by my previous mail with formated text,
> this goes in plain text.
>
>
> Im trying to incorporate marble and its new offline routing capabilities in
> my own project, and Im reading the marble source code and the
> documentation. From the marble source code, i got some code to start and
> experiment.
>
> The next code (adapted from marble source) is causing me some troubles.
>
> RoutingManager *routingManager = theMap->model()->routingManager();
> RoutingModel *routingModel = routingManager->routingModel();
> bool hasRoute = routingModel->rowCount(); //here is the problem
>
> My includes are:
>
> #include <marble/global.h>
> #include <marble/MarbleModel.h>
> #include <marble/RoutingManager.h>
>
> The third line (getting the rowCount), causes the compilation to fail with
> the error:
> error: invalid use of incomplete type ‘struct Marble::RoutingModel’
> As I have seen, the RoutingModel Class is defined (as Class RoutingModel;)
> in RoutingManager.h, but included in the ControlView.cpp file as '
> #include "routing/RoutingModel.h" ' .
>
> Are the "routing"-folder headers inside the marble lib sources not
> installed (at /usr/include/marble) ?
> Is this intentional, only for the Marble application (not the library) ?
>
> What is the correct way to incorporate routing capabilities to another
> application? What Classes to use? The RoutingManager?
>
>
> Im using the marble code from the anonymous kde svn repository (svn://
> anonsvn.kde.org/home/kde/trunk/KDE/kdeedu/marble/src).
>
> Thanks in advance,
More information about the Marble-devel
mailing list