DtkDevice
DTK library for device.
Dtk::Device::DInputDeviceTouchPad类 参考

触摸板设备 更多...

#include <dinputdevicetouchpad.h>

类 Dtk::Device::DInputDeviceTouchPad 继承关系图:
Dtk::Device::DInputDevicePointer Dtk::Device::DInputDeviceGeneric

Public 槽

DExpected< void > reset () override
 重置触摸板的所有设置 更多...
 
DExpected< void > enable (bool enabled=true)
 设置enabled属性 更多...
 
- Public 槽 继承自 Dtk::Device::DInputDeviceGeneric
virtual DExpected< void > reset ()
 重置设备的设置 更多...
 

信号

void disableWhileTypingChanged (bool disableWhileTyping)
 是否在打字时禁用改变信号 更多...
 
void naturalScrollChanged (bool naturalScroll)
 是否自然滚动改变信号 更多...
 
void tapToClickChanged (bool tapToClick)
 轻触时点击改变信号 更多...
 
- 信号 继承自 Dtk::Device::DInputDevicePointer
void leftHandedChanged (bool leftHanded)
 左手模式切换信号 更多...
 
void scrollMethodChanged (ScrollMethod method)
 滚动模式切换信号 更多...
 
void accelerationProfileChanged (AccelerationProfile profile)
 指针加速方式切换信号 更多...
 
void accelerationSpeedChanged (double speed)
 指针加速度修改信号 更多...
 
- 信号 继承自 Dtk::Device::DInputDeviceGeneric
void enabledChanged (bool enabled)
 设备启用状态改变信号 更多...
 

Public 成员函数

bool disableWhileTyping () const
 获取是否在打字时禁用 更多...
 
bool naturalScroll () const
 获取是否自然滚动 更多...
 
bool tapToClick () const
 获取是否轻触时点击 更多...
 
void setDisableWhileTyping (bool disableWhileTyping)
 设置是否在打字时禁用 更多...
 
void setNaturalScroll (bool naturalScroll)
 设置是否自然滚动 更多...
 
void setTapToClick (bool tapToClick)
 设置轻触时点击 更多...
 
bool enabled () const override
 获取设备是否启用 更多...
 
bool leftHanded () const override
 获取是否是左手模式 更多...
 
ScrollMethod scrollMethod () const override
 获取当前滚动模式 更多...
 
AccelerationProfile accelerationProfile () const override
 获取当前的指针加速方式 更多...
 
double accelerationSpeed () const override
 获取指针加速度 更多...
 
void setLeftHanded (bool leftHanded) override
 设置是否是左手模式 更多...
 
void setScrollMethod (ScrollMethod scrollMethod) override
 设置滚动模式 更多...
 
void setAccelerationProfile (AccelerationProfile accelerationProfile) override
 设置指针加速方式 更多...
 
void setAccelerationSpeed (double accelerationSpeed) override
 设置指针加速度 更多...
 
virtual bool leftHanded () const =0
 获取是否是左手模式 更多...
 
virtual ScrollMethod scrollMethod () const =0
 获取当前滚动模式 更多...
 
virtual AccelerationProfile accelerationProfile () const =0
 获取当前的指针加速方式 更多...
 
virtual double accelerationSpeed () const =0
 获取指针加速度 更多...
 
virtual void setLeftHanded (bool leftHanded)=0
 设置是否是左手模式 更多...
 
virtual void setScrollMethod (ScrollMethod scrollMethod)=0
 设置滚动模式 更多...
 
virtual void setAccelerationProfile (AccelerationProfile accelerationProfile)=0
 设置指针加速方式 更多...
 
virtual void setAccelerationSpeed (double accelerationSpeed)=0
 设置指针加速度 更多...
 
- Public 成员函数 继承自 Dtk::Device::DInputDeviceGeneric
virtual quint32 id () const
 获取设备id 更多...
 
virtual QString name () const
 获取设备名 更多...
 
virtual DeviceType type () const
 获取设备类型 更多...
 
virtual bool enabled () const
 获取设备是否启用 更多...
 
 ~DInputDeviceGeneric () override
 析构函数 更多...
 

Protected 成员函数

 DInputDeviceTouchPad (const DeviceInfo &info=DeviceInfoInitializer, bool enabled=true, QObject *parent=nullptr)
 空参构造函数和指定父对象的构造函数 更多...
 
- Protected 成员函数 继承自 Dtk::Device::DInputDevicePointer
 DInputDevicePointer (const DeviceInfo &info=DeviceInfoInitializer, bool enabled=true, QObject *parent=nullptr)
 
 DInputDevicePointer (DInputDevicePointerPrivate &dd, const DeviceInfo &info, bool enabled=true, QObject *parent=nullptr)
 
- Protected 成员函数 继承自 Dtk::Device::DInputDeviceGeneric
 DInputDeviceGeneric (const DeviceInfo &info=DeviceInfoInitializer, bool enabled=true, QObject *parent=nullptr)
 
 DInputDeviceGeneric (DInputDeviceGenericPrivate &dd, const DeviceInfo &info, bool enabled, QObject *parent)
 
void setId (quint32 id)
 设置设备的id 更多...
 
void setName (const QString &name)
 设置设备名 更多...
 
void setType (DeviceType type)
 设置设备类型 更多...
 
void setEnabled (bool enabled)
 设置设备是否启用 更多...
 
void setDeviceInfo (const DeviceInfo &info)
 设置设备信息 更多...
 

属性

bool disableWhileTyping
 是否在打字时禁用 更多...
 
bool naturalScroll
 是否自然滚动 更多...
 
bool tapToClick
 轻触时点击 更多...
 
- 属性 继承自 Dtk::Device::DInputDevicePointer
bool leftHanded
 是否开启左手模式 更多...
 
ScrollMethod scrollMethod
 当前的滚动模式 更多...
 
AccelerationProfile accelerationProfile
 当前的加速方式 更多...
 
double accelerationSpeed
 当前加速度 更多...
 
- 属性 继承自 Dtk::Device::DInputDeviceGeneric
quint32 id
 设备id 更多...
 
QString name
 设备名 更多...
 
DeviceType type
 设备类型 更多...
 
bool enabled
 设备启用状态 更多...
 

友元

class DInputDeviceManager
 

额外继承的成员函数

- Public 类型 继承自 Dtk::Device::DInputDeviceGeneric
using Ptr = QSharedPointer< DInputDeviceGeneric >
 

详细描述

触摸板设备

触摸板设备包括很多触摸板下方的实体按键.

构造及析构函数说明

◆ DInputDeviceTouchPad()

DInputDeviceTouchPad::DInputDeviceTouchPad ( const DeviceInfo info = DeviceInfoInitializer,
bool  enabled = true,
QObject *  parent = nullptr 
)
explicitprotected

空参构造函数和指定父对象的构造函数

初始化设备信息的构造函数

参数
[in]parent父对象, 用于在对象树中管理生命周期
[in]info设备信息
[in]enabled设备是否启用

成员函数说明

◆ accelerationProfile()

AccelerationProfile Dtk::Device::DInputDeviceTouchPad::accelerationProfile ( ) const
overridevirtual

获取当前的指针加速方式

返回
当前的指针加速方式
参见
accelerationProfile

实现了 Dtk::Device::DInputDevicePointer.

◆ accelerationSpeed()

double Dtk::Device::DInputDeviceTouchPad::accelerationSpeed ( ) const
overridevirtual

获取指针加速度

返回
当前的指针加速度
参见
accelerationSpeed

实现了 Dtk::Device::DInputDevicePointer.

◆ disableWhileTyping()

bool DInputDeviceTouchPad::disableWhileTyping ( ) const

获取是否在打字时禁用

参见
disableWhileTyping

◆ disableWhileTypingChanged

void DInputDeviceTouchPad::disableWhileTypingChanged ( bool  disableWhileTyping)
signal

是否在打字时禁用改变信号

参见
disableWhileTyping

◆ enable

DExpected< void > DInputDeviceTouchPad::enable ( bool  enabled = true)
slot

设置enabled属性

参数
[in]enabled设备是否启用, 默认值为true
参见
enabled

◆ enabled()

bool Dtk::Device::DInputDeviceTouchPad::enabled ( ) const
overridevirtual

获取设备是否启用

获取enabled属性, 该函数可被子类重写.

重载 Dtk::Device::DInputDeviceGeneric .

◆ leftHanded()

bool Dtk::Device::DInputDeviceTouchPad::leftHanded ( ) const
overridevirtual

获取是否是左手模式

返回
是否开启左手模式
参见
leftHanded

实现了 Dtk::Device::DInputDevicePointer.

◆ naturalScroll()

bool DInputDeviceTouchPad::naturalScroll ( ) const

获取是否自然滚动

参见
naturalScroll

◆ naturalScrollChanged

void DInputDeviceTouchPad::naturalScrollChanged ( bool  naturalScroll)
signal

是否自然滚动改变信号

参见
naturalScroll

◆ reset

DExpected< void > DInputDeviceTouchPad::reset ( )
overrideslot

重置触摸板的所有设置

返回
空DExpected对象, 无效表示操作失败

该函数会重置所有触摸板的设置.

◆ scrollMethod()

ScrollMethod Dtk::Device::DInputDeviceTouchPad::scrollMethod ( ) const
overridevirtual

获取当前滚动模式

返回
当前的滚动模式
参见
scrollMethod

实现了 Dtk::Device::DInputDevicePointer.

◆ setAccelerationProfile()

void Dtk::Device::DInputDeviceTouchPad::setAccelerationProfile ( AccelerationProfile  accelerationProfile)
overridevirtual

设置指针加速方式

参见
accelerationProfile

实现了 Dtk::Device::DInputDevicePointer.

◆ setAccelerationSpeed()

void Dtk::Device::DInputDeviceTouchPad::setAccelerationSpeed ( double  accelerationSpeed)
overridevirtual

设置指针加速度

参见
accelerationSpeed

实现了 Dtk::Device::DInputDevicePointer.

◆ setDisableWhileTyping()

void DInputDeviceTouchPad::setDisableWhileTyping ( bool  disableWhileTyping)

设置是否在打字时禁用

参见
disableWhileTyping

◆ setLeftHanded()

void Dtk::Device::DInputDeviceTouchPad::setLeftHanded ( bool  leftHanded)
overridevirtual

设置是否是左手模式

参见
leftHanded

实现了 Dtk::Device::DInputDevicePointer.

◆ setNaturalScroll()

void DInputDeviceTouchPad::setNaturalScroll ( bool  naturalScroll)

设置是否自然滚动

参见
naturalScroll

◆ setScrollMethod()

void Dtk::Device::DInputDeviceTouchPad::setScrollMethod ( ScrollMethod  scrollMethod)
overridevirtual

设置滚动模式

参见
scrollMethod

实现了 Dtk::Device::DInputDevicePointer.

◆ setTapToClick()

void DInputDeviceTouchPad::setTapToClick ( bool  tapToClick)

设置轻触时点击

参见
tapToClick

◆ tapToClick()

bool DInputDeviceTouchPad::tapToClick ( ) const

获取是否轻触时点击

参见
tapToClick

◆ tapToClickChanged

void DInputDeviceTouchPad::tapToClickChanged ( bool  tapToClick)
signal

轻触时点击改变信号

参见
tapToClick

属性说明

◆ disableWhileTyping

Dtk::Device::DInputDeviceTouchPad::disableWhileTyping
readwrite

是否在打字时禁用

如果为true, 在键盘打字的时候, 会关闭触摸板, 触摸板的enabled属性为false. 当前版本, 该设置会影响所有的触摸板设备.

◆ naturalScroll

Dtk::Device::DInputDeviceTouchPad::naturalScroll
readwrite

是否自然滚动

对于触摸板而言, 在开启自然滚动时, 双指向下拉动, 屏幕向上滑动, 反之. 其带给用户的感觉为直接使用双指控制屏幕, 故称自然滚动.

◆ tapToClick

Dtk::Device::DInputDeviceTouchPad::tapToClick
readwrite

轻触时点击

如果为true, 在轻触触摸板的时候会触发点击事件.


该类的文档由以下文件生成: