Repository navigation
[Qt] Add docs for QMapboxGL - #7571
Conversation
|
@tmpsantos, thanks for your PR! By analyzing this pull request, we identified @1ec5 and @jfirebaugh to be potential reviewers. |
5a5507e to
4dc9b3f
Compare
|
|
||
| /*! | ||
| \property QMapboxGL::bearing | ||
| \brief the map bearing in degrees. |
There was a problem hiding this comment.
Clockwise or counterclockwise?
There was a problem hiding this comment.
counter, gonna add that 👍
| /*! | ||
| \property QMapboxGL::pitch | ||
| \brief the map pitch in radians. | ||
|
|
There was a problem hiding this comment.
0.60 radians? I think the property is actually in degrees.
| d_ptr->mapObj->setGestureInProgress(inProgress); | ||
| } | ||
|
|
||
| /*! |
There was a problem hiding this comment.
It might be worth mentioning core support for classes are deprecated, as per comments in the specification.
There was a problem hiding this comment.
Nice catch. I also add the tag /deprecated on the docs.
lyzidiamond
left a comment
There was a problem hiding this comment.
This looks good! I'm not super familiar with the library, so the edits here are mostly for grammar and clarity.
| \enum QMapboxGLSettings::GLContextMode | ||
|
|
||
| This enum set the expectations towards the GL state. | ||
| This enum sets the expectations towards the GL state. |
There was a problem hiding this comment.
Can we assume users know what an enum is? I assume yes, but just wanna make sure.
There was a problem hiding this comment.
Another option: change it to Sets the expectations for the GL state.
There was a problem hiding this comment.
@lyzidiamond yes, enum is what the developers expect. 👍
|
|
||
| /*! | ||
| \enum QMapboxGLSettings::ConstrainMode | ||
|
|
There was a problem hiding this comment.
Unsure about the language here: what do you mean by "sets"? Does it set itself or does the user have to set it? Like above, can change to Determines if the map wraps or similar.
|
|
||
| This enum sets whenever a map should wrap. | ||
|
|
||
| \value NoConstrain The map will wrap on the horizontal axis. Since it doesn't |
There was a problem hiding this comment.
a Mercator projection --> the Web Mercator projection
| make sense to wrap on the vertical axis in a Mercator projection, the map will simply scroll | ||
| and show some empty space. | ||
|
|
||
| \value ConstrainHeightOnly The map will wrap around the horizontal axis, like a spinning |
There was a problem hiding this comment.
This is usually what you want --> (recommended)
|
|
||
| \value ConstrainHeightOnly The map will wrap around the horizontal axis, like a spinning | ||
| globe. This is usually what you want. | ||
|
|
|
|
||
| /*! | ||
| \property QMapboxGL::zoom | ||
| \brief the map zoom factor. |
| @@ -471,26 +668,52 @@ void QMapboxGL::setGestureInProgress(bool inProgress) | |||
| d_ptr->mapObj->setGestureInProgress(inProgress); | |||
| } | |||
|
|
|||
| } | ||
|
|
||
| void QMapboxGL::addAnnotationIcon(const QString &name, const QImage &sprite) | ||
| /*! |
| void QMapboxGL::addAnnotationIcon(const QString &name, const QImage &sprite) | ||
| /*! | ||
| Adds an \a icon to the annotation icon pool. This can be later used by the annotation | ||
| functions to shown some drawing on the map by referencing the \a name. |
There was a problem hiding this comment.
Unlike using addIcon() for runtime styling, annotations added with addPointAnnotation() will survive style changes.
|
|
||
| /*! | ||
| \property QMapboxGL::margins | ||
| \brief the map margins in pixels from the corners of the map. |
There was a problem hiding this comment.
Sets a new reference center for the map.
4dc9b3f to
0c9f56a
Compare
|
@1ec5 @lyzidiamond thanks a lot for reviewing! |
|
|
||
| /*! | ||
| \property QMapboxGL::longitude | ||
| \brief the map current longitude in degrees. |
There was a problem hiding this comment.
What happens if the map rejects the longitude? Does it move to a constrained longitude, or to a wrapped longitude, or does the map refuse to move?
There was a problem hiding this comment.
@1ec5 it gets constrained, I will clarify that. 👍
There was a problem hiding this comment.
s/constrained/wrapped
Document the low level API.