MapControl (Qt OpenGLWidget) Class
This element is not available using the selected API.
This element is not available using the selected API.
In this article
Represents a Qt widget that displays a View.
Members of this class should only be accessed from the GUI thread. Exceptions to this rule are noted on the documentation page for each individual member.
The Thread Access Verifier will enforce this rule when it is active.
More details about thread safety and the main thread of the application can be found in Threading model, GUI.
class QtMapControl : public QOpenGLWidget, public MapControl
A Carmenta Engine MapControl is used to integrate a map view into the GUI of an application. Carmenta Engine provides several different MapControl classes, for different API:s and GUI platforms; for a complete list see MapControl classes in Carmenta Engine.
This control implements a Qt Widget control and inherits from the https://doc.qt.io/qt-6/qopenglwidget.html class.
It only supports OpenGL rendering. The OpenGL context is managed by the base class, and the control uses an ExternalDrawable instance to render the map.
The default behavior of the MapControl (Qt OpenGLWidget) is to re-throw exceptions that occur when it calls into the Carmenta Engine kernel. You can provide a handler for the IMapControl::error event if you want to suppress this behavior, for example if you want to send the errors to an application log or display a custom error dialog.
When using Qt for Linux/X11 with the QtMapControl, the Qt platform plugin for X11 needs use EGL. Qt can be configured to use EGL by setting the environment variable QT_XCB_GL_INTEGRATION to xcb_egl.
MapControl (C++ base class)
MapControl (Qt OpenGLWidget)
Windows, Linux, Android
The MapControl (Qt OpenGLWidget) type has the following members.
Name | Description |
---|---|
QtMapControl | Initializes a new instance of the MapControl (Qt OpenGLWidget) class. |
Name | Description |
---|---|
IMapControl::guiDelayMinimum | The minimum amount of time in milliseconds that needs to pass between an update ending and another one starting. Inherited from IMapControl |
IMapControl::guiDelayPercentage | The percentage of the previous update time used to delay the next update. Inherited from IMapControl |
IMapControl::isConnected | Gets a value that tells whether the MapControl (Qt OpenGLWidget) implementation is connected to a View. Inherited from IMapControl |
Gets a value that tells whether the current platform supports touch input. Inherited from MapControl | |
IMapControl::requestUpdatesInAdvance | Allows an extra paint event to be posted by the internal view update scheduler before the previous paint event was handled. Inherited from IMapControl |
IMapControl::tool | Gets or sets the ITool that is used by the MapControl (Qt OpenGLWidget) implementation. Inherited from IMapControl |
IMapControl::toolTimerInterval | The interval used by the MapControl (Qt OpenGLWidget) implementation to update tools. Inherited from IMapControl |
IMapControl::touchTool | Gets or sets the ITouchTool that is used by the MapControl (Qt OpenGLWidget) implementation. Inherited from IMapControl |
IMapControl::updateInterval | The update interval used by the MapControl implementation. Inherited from IMapControl |
IMapControl::updateMode | Gets or sets the update mode used by the MapControl (Qt OpenGLWidget) implementation. Inherited from IMapControl |
IMapControl::view | Gets or sets the View that is displayed by the MapControl implementation. Inherited from IMapControl |
Name | Description |
---|---|
Returns the monotonic time in microseconds. Inherited from MapControl | |
getWindow | Gets the native window that the MapControl is associated with. Inherited from MapControl |
keyDown | Forwards a key down event to the MapControl. Inherited from MapControl |
keyUp | Forwards a key up event to the MapControl. Inherited from MapControl |
mouseDoubleClick | Forwards a mouse double click event to the MapControl. Inherited from MapControl |
mouseDown | Forwards a mouse down event to the MapControl. Inherited from MapControl |
mouseMove | Forwards a mouse move event to the MapControl. Inherited from MapControl |
mouseUp | Forwards a mouse up event to the MapControl. Inherited from MapControl |
mouseWheel | Forwards a mouse wheel event to the MapControl. Inherited from MapControl |
onAreaChanged | Called when the connected View fires the View::areaChanged event. Inherited from MapControl |
onBusy | Called when the control is busy drawing or loading data. Inherited from MapControl |
onCustomDraw | Called when the connected View fires the View::customDraw event. Inherited from MapControl |
onCustomDrawBackground | Called when the connected View fires the View::customDrawBackground event. Inherited from MapControl |
onError | Called when an operation raises an exception. Inherited from MapControl |
onHoverChanged | Called when the connected View fires the View::hoverChanged event. Inherited from MapControl |
onIdle | Occurs after an update when all data has been loaded. Inherited from MapControl |
onRequestToolTimerElapsed | May be called from a background thread to indicate a tool timer has elapsed. Inherited from MapControl |
onRequestUpdate | May be called from a background thread to request an update. Inherited from MapControl |
onSelectionChanged | Called when the connected View fires the View::selectionChanged event. Inherited from MapControl |
onToolTimerElapsed | Call this to update tools that implement IToolTimerSink. Inherited from MapControl |
onUpdated | Called when the connected View fires the View::updated event. Inherited from MapControl |
onUpdating | Called when the connected View fires the View::updating event. Inherited from MapControl |
paint | Forwards a paint event to the MapControl. Inherited from MapControl |
releaseCapture | Virtual function called by the control to release a previously captured mouse. Inherited from MapControl |
setCapture | Virtual function called by the control to capture the mouse. Inherited from MapControl |
setCursor | Virtual function called by the control to set the mouse cursor. Inherited from MapControl |
setCustomCursor | Replaces one of the predefined mouse cursors with a custom cursor. Inherited from MapControl |
sizeChanged | Forwards a size changed event with the new width and height to the MapControl. Inherited from MapControl |
touchBegin | Called before forwarding one or more touch events to the MapControl. Inherited from MapControl |
touchDown | Forwards a touch down event to the MapControl. Inherited from MapControl |
touchEnd | Called after forwarding one or more touch events to the MapControl. Inherited from MapControl |
touchMove | Forwards a touch move event to the MapControl. Inherited from MapControl |
touchUp | Forwards a touch up event to the MapControl. Inherited from MapControl |
IMapControl::updateView | Overloaded. Updates the map presentation. Inherited from IMapControl |
waitForBackgroundThreadEvents | Disconnects the MapControl from event handlers and waits until any pending events from background threads have been handled. Inherited from MapControl |
windowsMessage | Forwards a Windows event to the MapControl. Inherited from MapControl |
In this article
This element is not available using the selected API.
In this article
This element is not available using the selected API.
In this article