Skip to content

positioning

Class info

Classes

Name Children Inherits
GeoAddress
prettyqt.positioning.geoaddress
    GeoAreaMonitorInfo
    prettyqt.positioning.geoareamonitorinfo
      GeoAreaMonitorSource
      prettyqt.positioning.geoareamonitorsource
        GeoCircle
        prettyqt.positioning.geocircle
          GeoCoordinate
          prettyqt.positioning.geocoordinate
            GeoLocation
            prettyqt.positioning.geolocation
              GeoPath
              prettyqt.positioning.geopath
                GeoPolygon
                prettyqt.positioning.geopolygon
                  GeoPositionInfo
                  prettyqt.positioning.geopositioninfo
                    GeoPositionInfoSource
                    prettyqt.positioning.geopositioninfosource
                      GeoPositionInfoSourceMixin
                      prettyqt.positioning.geopositioninfosource
                      GeoRectangle
                      prettyqt.positioning.georectangle
                        GeoSatelliteInfo
                        prettyqt.positioning.geosatelliteinfo
                          GeoSatelliteInfoSource
                          prettyqt.positioning.geosatelliteinfosource
                            GeoShape
                            prettyqt.positioning.geoshape
                              GeoShapeMixin
                              prettyqt.positioning.geoshape
                              NmeaPositionInfoSource
                              prettyqt.positioning.nmeapositioninginfosource

                                🛈 DocStrings

                                Provides access to position, satellite info and area monitoring classes.

                                GeoAreaMonitorSource

                                Bases: ObjectMixin, QGeoAreaMonitorSource

                                Source code in prettyqt/positioning/geoareamonitorsource.py
                                class GeoAreaMonitorSource(core.ObjectMixin, QtPositioning.QGeoAreaMonitorSource):
                                    def __str__(self):
                                        return self.sourceName()
                                
                                    def __repr__(self):
                                        return get_repr(self, self.sourceName())
                                
                                    def get_error(self) -> ErrorStr:
                                        """Return error type.
                                
                                        Returns:
                                            error type
                                        """
                                        return ERRORS.inverse[self.error()]
                                

                                get_error() -> ErrorStr

                                Return error type.

                                Source code in prettyqt/positioning/geoareamonitorsource.py
                                def get_error(self) -> ErrorStr:
                                    """Return error type.
                                
                                    Returns:
                                        error type
                                    """
                                    return ERRORS.inverse[self.error()]
                                

                                GeoPositionInfoSourceMixin

                                Bases: ObjectMixin, _GeoPositionInfoSourceBase

                                Source code in prettyqt/positioning/geopositioninfosource.py
                                class GeoPositionInfoSourceMixin(core.ObjectMixin, _GeoPositionInfoSourceBase):
                                    def __str__(self):
                                        return self.sourceName()
                                
                                    def __repr__(self):
                                        return get_repr(self)
                                
                                    def get_error(self) -> ErrorStr:
                                        """Return error type.
                                
                                        Returns:
                                            error type
                                        """
                                        return ERRORS.inverse[self.error()]
                                
                                    def set_preferred_positioning_methods(self, *methods: PositioningMethodStr):
                                        """Set preferred positioning methods.
                                
                                        Args:
                                            methods: positioning methods to use
                                        """
                                        flags = POSITIONING_METHODS.merge_flags(methods)
                                        self.setPreferredPositioningMethods(flags)
                                
                                    def get_preferred_positioning_methods(self) -> list[PositioningMethodStr]:
                                        """Return list of preferred positioning methods.
                                
                                        Returns:
                                            list of preferred positioning methods
                                        """
                                        return POSITIONING_METHODS.get_list(self.preferredPositioningMethods())
                                
                                    def get_supported_positioning_methods(self) -> list[PositioningMethodStr]:
                                        """Return list of supported positioning methods.
                                
                                        Returns:
                                            list of supported positioning methods
                                        """
                                        return POSITIONING_METHODS.get_list(self.supportedPositioningMethods())
                                

                                get_error() -> ErrorStr

                                Return error type.

                                Source code in prettyqt/positioning/geopositioninfosource.py
                                def get_error(self) -> ErrorStr:
                                    """Return error type.
                                
                                    Returns:
                                        error type
                                    """
                                    return ERRORS.inverse[self.error()]
                                

                                get_preferred_positioning_methods() -> list[PositioningMethodStr]

                                Return list of preferred positioning methods.

                                Source code in prettyqt/positioning/geopositioninfosource.py
                                def get_preferred_positioning_methods(self) -> list[PositioningMethodStr]:
                                    """Return list of preferred positioning methods.
                                
                                    Returns:
                                        list of preferred positioning methods
                                    """
                                    return POSITIONING_METHODS.get_list(self.preferredPositioningMethods())
                                

                                get_supported_positioning_methods() -> list[PositioningMethodStr]

                                Return list of supported positioning methods.

                                Source code in prettyqt/positioning/geopositioninfosource.py
                                def get_supported_positioning_methods(self) -> list[PositioningMethodStr]:
                                    """Return list of supported positioning methods.
                                
                                    Returns:
                                        list of supported positioning methods
                                    """
                                    return POSITIONING_METHODS.get_list(self.supportedPositioningMethods())
                                

                                set_preferred_positioning_methods(*methods: PositioningMethodStr)

                                Set preferred positioning methods.

                                Parameters:

                                Name Type Description Default
                                methods PositioningMethodStr

                                positioning methods to use

                                ()
                                Source code in prettyqt/positioning/geopositioninfosource.py
                                def set_preferred_positioning_methods(self, *methods: PositioningMethodStr):
                                    """Set preferred positioning methods.
                                
                                    Args:
                                        methods: positioning methods to use
                                    """
                                    flags = POSITIONING_METHODS.merge_flags(methods)
                                    self.setPreferredPositioningMethods(flags)
                                

                                GeoSatelliteInfo

                                Bases: QGeoSatelliteInfo

                                Source code in prettyqt/positioning/geosatelliteinfo.py
                                class GeoSatelliteInfo(QtPositioning.QGeoSatelliteInfo):
                                    def __getitem__(self, index: AttributeStr):
                                        return self.attribute(ATTRIBUTE[index])
                                
                                    def __setitem__(self, index: AttributeStr, value: float):
                                        self.setAttribute(ATTRIBUTE[index], value)
                                
                                    def __delitem__(self, index: AttributeStr):
                                        self.removeAttribute(ATTRIBUTE[index])
                                
                                    def __contains__(self, value: object) -> bool:
                                        if not isinstance(value, str) or value not in ATTRIBUTE:
                                            return False
                                        return self.hasAttribute(ATTRIBUTE[value])
                                
                                    def __int__(self):
                                        return self.satelliteIdentifier()
                                
                                    def set_satellite_system(
                                        self, system: SatelliteSystemStr | QtPositioning.QGeoSatelliteInfo.SatelliteSystem
                                    ):
                                        """Set satellite system.
                                
                                        Args:
                                            system: satellite system to use
                                        """
                                        self.setSatelliteSystem(SATELLITE_SYSTEMS.get_enum_value(system))
                                
                                    def get_satellite_system(self) -> SatelliteSystemStr:
                                        """Return satellite system.
                                
                                        Returns:
                                            satellite system
                                        """
                                        return SATELLITE_SYSTEMS.inverse[self.satelliteSystem()]
                                

                                get_satellite_system() -> SatelliteSystemStr

                                Return satellite system.

                                Source code in prettyqt/positioning/geosatelliteinfo.py
                                def get_satellite_system(self) -> SatelliteSystemStr:
                                    """Return satellite system.
                                
                                    Returns:
                                        satellite system
                                    """
                                    return SATELLITE_SYSTEMS.inverse[self.satelliteSystem()]
                                

                                set_satellite_system(system: SatelliteSystemStr | QtPositioning.QGeoSatelliteInfo.SatelliteSystem)

                                Set satellite system.

                                Parameters:

                                Name Type Description Default
                                system SatelliteSystemStr | SatelliteSystem

                                satellite system to use

                                required
                                Source code in prettyqt/positioning/geosatelliteinfo.py
                                def set_satellite_system(
                                    self, system: SatelliteSystemStr | QtPositioning.QGeoSatelliteInfo.SatelliteSystem
                                ):
                                    """Set satellite system.
                                
                                    Args:
                                        system: satellite system to use
                                    """
                                    self.setSatelliteSystem(SATELLITE_SYSTEMS.get_enum_value(system))
                                

                                GeoSatelliteInfoSource

                                Bases: ObjectMixin, QGeoSatelliteInfoSource

                                Source code in prettyqt/positioning/geosatelliteinfosource.py
                                class GeoSatelliteInfoSource(core.ObjectMixin, QtPositioning.QGeoSatelliteInfoSource):
                                    def __str__(self):
                                        return self.sourceName()
                                
                                    def __repr__(self):
                                        return get_repr(self)
                                
                                    def get_error(self) -> ErrorStr:
                                        """Return error type.
                                
                                        Returns:
                                            error type
                                        """
                                        return ERROR.inverse[self.error()]
                                

                                get_error() -> ErrorStr

                                Return error type.

                                Source code in prettyqt/positioning/geosatelliteinfosource.py
                                def get_error(self) -> ErrorStr:
                                    """Return error type.
                                
                                    Returns:
                                        error type
                                    """
                                    return ERROR.inverse[self.error()]