Bug 322573

Summary: Python bindings do not build (nor cover the full API)
Product: [Applications] marble Reporter: Dennis Nienhüser <nienhueser>
Component: generalAssignee: marble-bugs
Status: CONFIRMED ---    
Severity: normal CC: benjaminjkaiser, dilfridge, kevin.kofler, rdieter, simon
Priority: HI    
Version: 1.6 (KDE 4.11)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Example Test File

Description Dennis Nienhüser 2013-07-19 13:58:36 UTC
The .sip files for the Python bindings have quite a lot of commented methods which are then lacking in the Marble Python API. See e.g. http://mail.kde.org/pipermail/marble-devel/2013-January/003889.html

What do we need to do to cover more functionality in the bindings? Simon, can you explain the blockers there a bit? My binding generation knowledge is still in its infancy.
Comment 1 Kevin Kofler 2013-08-04 23:00:55 UTC
Do the Python bindings build for you at all in 4.11? Last we tried in Fedora, there were several build errors (apparently due to Marble API changes), I tried fixing the error that we had first in the build.log, but that only exposed more errors.
Comment 2 Dennis Nienhüser 2013-08-05 07:09:28 UTC
No, they're not building yet. But I think that Simon has plans to update them.
Comment 3 Andreas K. Huettel 2013-08-09 11:42:11 UTC
The bindings do not build in the 4.11.0 pre-release tarballs on Gentoo either. Please fix if in any way possible before the release.
Comment 4 Dennis Nienhüser 2013-08-11 10:47:43 UTC
@Kevin, Andreas: Simon just pushed updated bindings to the KDE/4.11 branch which compile fine here. Thanks :-)
Comment 5 Benjamin Kaiser 2013-11-23 02:11:03 UTC
Created attachment 83710 [details]
Example Test File

In this file you can see that the floatItems returned from `marble.floatItems()` are of type AbstractFloatItem, and in the example, the compass is not a CompassFloatItem. This is most likely because the class hasn't been ported (it is not in the documentation class list: `src/bindings/python/html/marble/Marble.html`)
Comment 6 Benjamin Kaiser 2013-11-23 02:13:00 UTC
Also you can see that although the function `marble.setShowScaleBar(False)` runs, the scale bar is still present in the application.
Comment 7 Benjamin Kaiser 2013-11-23 02:43:28 UTC
`MarbleWidget.setZoom(int zoom)` and the now deprecated `MarbleWidget.zoomView(int zoom)` do not function correctly (both zoom to the outermost level) also the `MarbleWidget.zoomIn()` and `MarbleWidget.zoomOut()` do not work. Therefore there does not appear to be a way to set the zoom to a certain level from the Python API.
Comment 8 Benjamin Kaiser 2013-11-24 12:52:17 UTC
(In reply to comment #7)
> `MarbleWidget.setZoom(int zoom)` and the now deprecated
> `MarbleWidget.zoomView(int zoom)` do not function correctly (both zoom to
> the outermost level) also the `MarbleWidget.zoomIn()` and
> `MarbleWidget.zoomOut()` do not work. Therefore there does not appear to be
> a way to set the zoom to a certain level from the Python API.

As I have found when developing the third tutorial, `MarbleWidget.setZoom(int zoom)` works great. But it was very unclear (not on the docs for setZoom) that 1000-2400 is a sensible range. I was trying values close to zero and it just wan't working.
Comment 9 Benjamin Kaiser 2013-11-24 12:54:35 UTC
(In reply to comment #7)
> `MarbleWidget.setZoom(int zoom)` and the now deprecated
> `MarbleWidget.zoomView(int zoom)` do not function correctly (both zoom to
> the outermost level) also the `MarbleWidget.zoomIn()` and
> `MarbleWidget.zoomOut()` do not work. Therefore there does not appear to be
> a way to set the zoom to a certain level from the Python API.

Also `MarbleWidget.zoomIn()` and `MarbleWidget.zoomOut()` also work. It just must be set to a sensible value at first (e.g. `MarbleWidget.setZoom(1200)`)
Comment 10 Justin Zobel 2021-03-09 22:51:41 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.