Class: QgsInputControllerManager

Manages input control devices.

QgsInputControllerManager is not usually directly created, but rather accessed through QgsGui.inputControllerManager().

Added in version 3.34.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsInputControllerManager

Base classes

QObject

Methods

available2DMapControllers

Returns a list of the device IDs of available 2D map controllers.

available3DMapControllers

Returns a list of the device IDs of available 3D map controllers.

create2DMapController

Returns a new instance of the 2D map controller with the specified deviceId.

create3DMapController

Returns a new instance of the 3D map controller with the specified deviceId.

register2DMapController

Registers a new 2D map controller.

register3DMapController

Registers a new 3D map controller.

class qgis.gui.QgsInputControllerManager[source]

Bases: QObject

__init__(parent: QObject | None = None)

Constructor for QgsInputControllerManager, with the specified parent object.

Note

QgsInputControllerManager is not usually directly created, but rather accessed through QgsGui.inputControllerManager().

Parameters:

parent (Optional[QObject] = None)

available2DMapControllers(self) List[str][source]

Returns a list of the device IDs of available 2D map controllers.

Return type:

List[str]

available3DMapControllers(self) List[str][source]

Returns a list of the device IDs of available 3D map controllers.

Return type:

List[str]

create2DMapController(self, deviceId: str | None) QgsAbstract2DMapController | None[source]

Returns a new instance of the 2D map controller with the specified deviceId.

The caller takes ownership of the returned object.

Will return None if no matching controller is found.

Parameters:

deviceId (Optional[str])

Return type:

Optional[QgsAbstract2DMapController]

create3DMapController(self, deviceId: str | None) QgsAbstract3DMapController | None[source]

Returns a new instance of the 3D map controller with the specified deviceId.

The caller takes ownership of the returned object.

Will return None if no matching controller is found.

Parameters:

deviceId (Optional[str])

Return type:

Optional[QgsAbstract3DMapController]

register2DMapController(self, controller: QgsAbstract2DMapController | None) bool[source]

Registers a new 2D map controller.

Ownership of controller is transferred to the manager.

Returns True if the controller was successfully registered, or False if it could not be registered (e.g. if a controller with matching deviceId has already been registered).

Parameters:

controller (Optional[QgsAbstract2DMapController])

Return type:

bool

register3DMapController(self, controller: QgsAbstract3DMapController | None) bool[source]

Registers a new 3D map controller.

Ownership of controller is transferred to the manager.

Returns True if the controller was successfully registered, or False if it could not be registered (e.g. if a controller with matching deviceId has already been registered).

Parameters:

controller (Optional[QgsAbstract3DMapController])

Return type:

bool