|
2017-09-27
, 21:15
|
Posts: 339 |
Thanked: 1,623 times |
Joined on Oct 2013
@ France
|
#82
|
Any ideas? If we go with the library approach, how do I register it in the QML to make it available?
QtDeclarative.qmlRegisterType(Graph, 'myPyQtGraph', 1, 0, 'PyQtGraph')
|
2017-09-27
, 21:49
|
|
Posts: 141 |
Thanked: 1,530 times |
Joined on May 2011
@ Finland
|
#83
|
I am no specialist of Python, so I took a look on the net, and saw that some people are registering objects to QML from python, like we do in C++: [...] Wouldn't that be enough ?
|
2017-09-27
, 21:58
|
Posts: 1,548 |
Thanked: 7,510 times |
Joined on Apr 2010
@ Czech Republic
|
#84
|
Now the question from my side: how to make it simple to use the developed QML extension?
For C++ - based projects, its all trivial. We could just include corresponding library as a subproject in git and merge with the C++ project build system. As soon as QtLocation is allowed, all these projects are also Harbour-proof.
For Python-based map applications (Poor Maps and modRana), situation is not that simple. Its either I have to somehow make QML type available as a library or these applications would have to be converted to C++ in small parts (probably just to register type and define main). I presume that having extra lib requirement would make the application non-Harbour proof. The library has a small chance to be integrated into device either, since its LGPL3 (I used parts of the code from current QtLocation, hence the license).
Any ideas? If we go with the library approach, how do I register it in the QML to make it available?
import io.thp.pyotherside 1.5
The Following User Says Thank You to MartinK For This Useful Post: | ||
|
2017-09-27
, 22:00
|
Posts: 1,548 |
Thanked: 7,510 times |
Joined on Apr 2010
@ Czech Republic
|
#85
|
The Following User Says Thank You to MartinK For This Useful Post: | ||
|
2017-09-27
, 22:16
|
|
Posts: 141 |
Thanked: 1,530 times |
Joined on May 2011
@ Finland
|
#86
|
|
2017-09-27
, 22:36
|
Posts: 1,548 |
Thanked: 7,510 times |
Joined on Apr 2010
@ Czech Republic
|
#87
|
PyOtherSide provides a QML type, yes, but, PyOtherSide is part of SFOS and on the Jolla store whitelist of QML imports. Getting on that whitelist is unlikely and also store apps probably can't ship QML types for other apps to use, which means the library would need to go via Mer to SFOS?
|
2017-09-28
, 00:03
|
Posts: 959 |
Thanked: 3,427 times |
Joined on Apr 2012
|
#88
|
|
2017-09-28
, 03:01
|
Posts: 1,548 |
Thanked: 7,510 times |
Joined on Apr 2010
@ Czech Republic
|
#89
|
Still a relative QML newbie here - is it possible to have an optional dependency on a QML plugin, such that an app could import it and draw maps if the user has it installed but work fine (without that UI component) otherwise?
|
2017-09-28
, 06:53
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#90
|
It is on github here : https://github.com/Sagittarii/IVI_HUD
I made a custom minimal dark style, reduced to only what matters while driving (so I kept only building outlines, removed everything related to water, beaches, ...). Colors are not great but were picked close to randomly for the tests.
I took a screencast to show what I have done so far with your package: https://youtu.be/dQsj-n-3JNo
The screen casting takes a lot of resources on my not so beefy desktop, so there is so lag introduced in the video that doesn't exist in the real usage.
You can see however the route in overview flat mode, and the seamless transition to the zoomed and tiled view for navigation (I have not yet added the behavior to have the smooth transition for the margin).
I put the destination of the route on the left double click, and the source on the right double click for those tests, using the tag property you added when requesting the screen coordinates.
When you look at it at this stage, there is almost no code on my side !
I have not found problems, missing API, or API that are difficult to use so far. Good work !
I will now work on integrate the GPS info on it, and turn-by-turn information from the OSRM data.