[][src]Struct qt_gui::QTouchDevice

#[repr(C)]pub struct QTouchDevice { /* fields omitted */ }

The QTouchDevice class describes the device from which touch events originate.

C++ class: QTouchDevice.

C++ documentation:

The QTouchDevice class describes the device from which touch events originate.

Each QTouchEvent contains a QTouchDevice pointer to allow accessing device-specific properties like type and capabilities. It is the responsibility of the platform or generic plug-ins to register the available touch devices via QWindowSystemInterface before generating any touch events. Applications do not need to instantiate this class, they should just access the global instances pointed to by QTouchEvent::device().

Methods

impl QTouchDevice[src]

pub unsafe fn capabilities(&self) -> QFlags<CapabilityFlag>[src]

Returns the touch device capabilities.

Calls C++ function: QFlags<QTouchDevice::CapabilityFlag> QTouchDevice::capabilities() const.

C++ documentation:

Returns the touch device capabilities.

See also setCapabilities().

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QTouchDevice>>
) -> Ref<QTouchDevice>
[src]

The QTouchDevice class describes the device from which touch events originate.

Calls C++ function: QTouchDevice& QTouchDevice::operator=(const QTouchDevice& other).

C++ documentation:

The QTouchDevice class describes the device from which touch events originate.

Each QTouchEvent contains a QTouchDevice pointer to allow accessing device-specific properties like type and capabilities. It is the responsibility of the platform or generic plug-ins to register the available touch devices via QWindowSystemInterface before generating any touch events. Applications do not need to instantiate this class, they should just access the global instances pointed to by QTouchEvent::device().

pub unsafe fn devices() -> CppBox<QListOfQTouchDevice>[src]

Returns a list of all registered devices.

Calls C++ function: static QList<const QTouchDevice*> QTouchDevice::devices().

C++ documentation:

Returns a list of all registered devices.

Note: The returned list cannot be used to add new devices. To add a simulated touch screen for an autotest, QTest::createTouchDevice() can be used. To add real touch screens to QPA plugins, the private QWindowSystemInterface::registerTouchDevice() function can be used.

pub unsafe fn maximum_touch_points(&self) -> c_int[src]

Returns the maximum number of simultaneous touch points (fingers) that can be detected.

Calls C++ function: int QTouchDevice::maximumTouchPoints() const.

C++ documentation:

Returns the maximum number of simultaneous touch points (fingers) that can be detected.

This function was introduced in Qt 5.2.

See also setMaximumTouchPoints().

pub unsafe fn name(&self) -> CppBox<QString>[src]

Returns the touch device name.

Calls C++ function: QString QTouchDevice::name() const.

C++ documentation:

Returns the touch device name.

This string may often be empty. It is however useful for systems that have more than one touch input device because there it can be used to differentiate between the devices (i.e. to tell from which device a QTouchEvent originates from).

See also setName().

pub unsafe fn new() -> CppBox<QTouchDevice>[src]

Creates a new touch device instance. By default the name is empty, the only capability is Position and type is TouchScreen.

Calls C++ function: [constructor] void QTouchDevice::QTouchDevice().

C++ documentation:

Creates a new touch device instance. By default the name is empty, the only capability is Position and type is TouchScreen.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QTouchDevice>>
) -> CppBox<QTouchDevice>
[src]

The QTouchDevice class describes the device from which touch events originate.

Calls C++ function: [constructor] void QTouchDevice::QTouchDevice(const QTouchDevice& other).

C++ documentation:

The QTouchDevice class describes the device from which touch events originate.

Each QTouchEvent contains a QTouchDevice pointer to allow accessing device-specific properties like type and capabilities. It is the responsibility of the platform or generic plug-ins to register the available touch devices via QWindowSystemInterface before generating any touch events. Applications do not need to instantiate this class, they should just access the global instances pointed to by QTouchEvent::device().

pub unsafe fn set_capabilities(&self, caps: QFlags<CapabilityFlag>)[src]

Sets the capabilities caps supported by the device and its driver.

Calls C++ function: void QTouchDevice::setCapabilities(QFlags<QTouchDevice::CapabilityFlag> caps).

C++ documentation:

Sets the capabilities caps supported by the device and its driver.

See also capabilities().

pub unsafe fn set_maximum_touch_points(&self, max: c_int)[src]

Sets the maximum number of simultaneous touchpoints max supported by the device and its driver.

Calls C++ function: void QTouchDevice::setMaximumTouchPoints(int max).

C++ documentation:

Sets the maximum number of simultaneous touchpoints max supported by the device and its driver.

See also maximumTouchPoints().

pub unsafe fn set_name(&self, name: impl CastInto<Ref<QString>>)[src]

Sets the name (a unique identifier) for the device. In most systems it is enough to leave this unset and keep the default empty name. This identifier becomes important when having multiple touch devices and a need to differentiate between them.

Calls C++ function: void QTouchDevice::setName(const QString& name).

C++ documentation:

Sets the name (a unique identifier) for the device. In most systems it is enough to leave this unset and keep the default empty name. This identifier becomes important when having multiple touch devices and a need to differentiate between them.

See also name().

pub unsafe fn set_type(&self, dev_type: DeviceType)[src]

Sets the device type devType.

Calls C++ function: void QTouchDevice::setType(QTouchDevice::DeviceType devType).

C++ documentation:

Sets the device type devType.

See also type().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn type_(&self) -> DeviceType[src]

Returns the touch device type.

Calls C++ function: QTouchDevice::DeviceType QTouchDevice::type() const.

C++ documentation:

Returns the touch device type.

See also setType().

Trait Implementations

impl CppDeletable for QTouchDevice[src]

unsafe fn delete(&self)[src]

Destroys a touch device instance.

Calls C++ function: [destructor] void QTouchDevice::~QTouchDevice().

C++ documentation:

Destroys a touch device instance.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.