Skip to content

BluetoothUuid

Base classes

Name Children Inherits
UuidMixin
prettyqt.core._uuid
QBluetoothUuid
PySide6.QtBluetooth
QBluetoothUuid(self, /) -> None

⋔ Inheritance diagram

graph TD
  2403645422["bluetooth.BluetoothUuid"]
  3054306185["core.UuidMixin"]
  2751680898["builtins.object"]
  999895899["QtBluetooth.QBluetoothUuid"]
  3599593057["QtCore.QUuid"]
  37984305["Shiboken.Object"]
  3054306185 --> 2403645422
  2751680898 --> 3054306185
  999895899 --> 2403645422
  3599593057 --> 999895899
  37984305 --> 3599593057
  2751680898 --> 37984305

🛈 DocStrings

Bases: UuidMixin, QBluetoothUuid

Generates a UUID for each Bluetooth service.

Source code in prettyqt/bluetooth/bluetoothuuid.py
class BluetoothUuid(core.UuidMixin, QtBluetooth.QBluetoothUuid):
    """Generates a UUID for each Bluetooth service."""

    @classmethod
    def characteristic_to_string(cls, characteristic: CharacteristicTypeStr | md) -> str:
        """Return string representation for given characteristic."""
        return cls.characteristicToString(
            CHARACTERISTIC_TYPES.get_enum_value(characteristic)
        )

    @classmethod
    def descriptor_to_string(cls, descriptor: DescriptorTypeStr | dt) -> str:
        """Return string representation for given descriptor."""
        return cls.descriptorToString(DESCRIPTOR_TYPE.get_enum_value(descriptor))

    @classmethod
    def protocol_to_string(cls, protocol: ProtocolUuidStr | pu) -> str:
        """Return string representation for given protocol."""
        return cls.protocolToString(PROTOCOL_UUID.get_enum_value(protocol))

    @classmethod
    def service_class_to_string(cls, service_class: ServiceClassUuidStr | su) -> str:
        """Return string representation for given service class."""
        return cls.serviceClassToString(SERVICE_CLASS_UUID.get_enum_value(service_class))

characteristic_to_string(characteristic: CharacteristicTypeStr | md) -> str classmethod

Return string representation for given characteristic.

Source code in prettyqt/bluetooth/bluetoothuuid.py
@classmethod
def characteristic_to_string(cls, characteristic: CharacteristicTypeStr | md) -> str:
    """Return string representation for given characteristic."""
    return cls.characteristicToString(
        CHARACTERISTIC_TYPES.get_enum_value(characteristic)
    )

descriptor_to_string(descriptor: DescriptorTypeStr | dt) -> str classmethod

Return string representation for given descriptor.

Source code in prettyqt/bluetooth/bluetoothuuid.py
@classmethod
def descriptor_to_string(cls, descriptor: DescriptorTypeStr | dt) -> str:
    """Return string representation for given descriptor."""
    return cls.descriptorToString(DESCRIPTOR_TYPE.get_enum_value(descriptor))

protocol_to_string(protocol: ProtocolUuidStr | pu) -> str classmethod

Return string representation for given protocol.

Source code in prettyqt/bluetooth/bluetoothuuid.py
@classmethod
def protocol_to_string(cls, protocol: ProtocolUuidStr | pu) -> str:
    """Return string representation for given protocol."""
    return cls.protocolToString(PROTOCOL_UUID.get_enum_value(protocol))

service_class_to_string(service_class: ServiceClassUuidStr | su) -> str classmethod

Return string representation for given service class.

Source code in prettyqt/bluetooth/bluetoothuuid.py
@classmethod
def service_class_to_string(cls, service_class: ServiceClassUuidStr | su) -> str:
    """Return string representation for given service class."""
    return cls.serviceClassToString(SERVICE_CLASS_UUID.get_enum_value(service_class))

:fa-brands-github: Show source on GitHub