// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later

/*!
@~chinese
@file dinputdevicetrackpoint.h
@ingroup inputdevices

dinputdevicetrackpoint.h文件定义了指针杆设备类DInputDeviceTrackPoint

@class Dtk::Device::DInputDeviceTrackPoint dinputdevicetrackpoint.h
@brief 指针杆设备类(小红点)

指针杆设备包括小红点和相应的按键.

@fn DInputDeviceTrackPoint::DInputDeviceTrackPoint(QObject *parent = nullptr)
@brief 空参构造函数和指定父对象的构造函数
@param[in] parent 父对象, 用于在对象树中管理生命周期

@fn DInputDeviceTrackPoint::DInputDeviceTrackPoint(const DeviceInfo &info, bool enabled = true)
@brief 初始化设备信息的构造函数
@param[in] info 设备信息
@param[in] enabled 设备是否启用

@property Dtk::Device::DInputDeviceTrackPoint::middleButtonEnabled
@brief 是否启用中键模拟

指针杆可以使用按键模拟鼠标中键.

@property Dtk::Device::DInputDeviceTrackPoint::middleButtonTimeout
@brief 中键模拟超时时间

保持按键按下超过该时间, 才会触发中键模拟事件.

@property Dtk::Device::DInputDeviceTrackPoint::wheelEmulation
@brief 是否启用滚轮模拟

指针杆可以通过按下按键超过某一时间并移动指针杆来模拟滚动事件.

@property Dtk::Device::DInputDeviceTrackPoint::wheelEmulationButton
@brief 滚动模拟修饰键

指针杆可以通过按下某一按键超过一定时间并移动指针杆来模拟滚动, 该属性定义哪一个按键作为触发该模拟机制的按键.

@property Dtk::Device::DInputDeviceTrackPoint::wheelEmulationTimeout
@brief 滚轮模拟触发时间

指针杆滚轮模拟机制触发之前的超时时间.

@property Dtk::Device::DInputDeviceTrackPoint::wheelHorizontalScroll
@brief 是否开启水平滚动

指针杆是否可以控制左右方向的滚动.

@fn bool DInputDeviceTrackPoint::middleButtonEnabled() const
@brief 获取是否启用中键模拟
@sa [middleButtonEnabled](@ref Dtk::InputDevices::DInputDeviceTrackPoint::middleButtonEnabled)

@fn qint32 DInputDeviceTrackPoint::middleButtonTimeout() const
@brief 获取中键模拟超时时间
@sa [middleButtonTimeout](@ref Dtk::InputDevices::DInputDeviceTrackPoint::middleButtonTimeout)

@fn bool DInputDeviceTrackPoint::wheelEmulation() const
@brief 获取是否开启滚轮模拟
@sa [wheelEmulation](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulation)

@fn qint32 DInputDeviceTrackPoint::wheelEmulationButton() const
@brief 获取滚轮模拟修饰键
@sa [wheelEmulationButton](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulationButton)

@fn qint32 DInputDeviceTrackPoint::wheelEmulationTimeout() const
@brief 获取滚轮模拟触发超时时间
@sa [wheelEmulationTimeout](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulationTimeout)

@fn bool DInputDeviceTrackPoint::wheelHorizontalScroll() const
@brief 获取是否开启水平滚动
@sa [wheelHorizontalScroll](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelHorizontalScroll)

@fn void DInputDeviceTrackPoint::setMiddleButtonEnabled(bool enabled)
@brief 设置是否启用中键模拟
@param[in] enabled 是否开启
@sa [middleButtonEnabled](@ref Dtk::InputDevices::DInputDeviceTrackPoint::middleButtonEnabled)

@fn void DInputDeviceTrackPoint::setMiddleButtonTimeout(qint32 timeout)
@brief 设置中键模拟超时时间
@param[in] timeout 超时时间
@sa [middleButtonTimeout](@ref Dtk::InputDevices::DInputDeviceTrackPoint::middleButtonTimeout)

@fn void DInputDeviceTrackPoint::setWheelEmulation(bool emulation)
@brief 设置是否开启滚轮模拟
@param[in] emulation 是否开启滚轮模拟
@sa [wheelEmulation](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulation)

@fn void DInputDeviceTrackPoint::setWheelEmulationButton(qint32 button)
@brief 设置滚轮模拟修饰键
@param[in] button 修饰按键
@sa [wheelEmulationButton](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulationButton)

@fn void DInputDeviceTrackPoint::setWheelEmulationTimeout(qint32 timeout)
@brief 设置滚轮模拟超时时间
@param[in] timeout 超时时间
@sa [wheelEmulationTimeout](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulationTimeout)

@fn void DInputDeviceTrackPoint::setWheelHorizontalScroll(bool horizontalScroll)
@brief 设置是否开启水平滚动
@param[in] horizontalScroll 是否水平滚动
@sa [wheelHorizontalScroll](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelHorizontalScroll)

@fn void DInputDeviceTrackPoint::middleButtonEnabledChanged(bool enabled)
@brief 是否启用中键模拟改变信号
@param[in] enabled 是否开启
@sa [middleButtonEnabled](@ref Dtk::InputDevices::DInputDeviceTrackPoint::middleButtonEnabled)

@fn void DInputDeviceTrackPoint::middleButtonTimeoutChanged(qint32 timeout)
@brief 中键模拟超时时间改变信号
@param[in] timeout 超时时间
@sa [middleButtonTimeout](@ref Dtk::InputDevices::DInputDeviceTrackPoint::middleButtonTimeout)

@fn void DInputDeviceTrackPoint::wheelEmulationChanged(bool emulation)
@brief 是否开启滚轮模拟改变信号
@param[in] emulation 是否开启滚轮模拟
@sa [wheelEmulation](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulation)

@fn void DInputDeviceTrackPoint::wheelEmulationButtonChanged(qint32 button)
@brief 滚轮模拟修饰键改变信号
@param[in] button 修饰按键
@sa [wheelEmulationButton](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulationButton)

@fn void DInputDeviceTrackPoint::wheelEmulationTimeoutChanged(qint32 timeout)
@brief 滚轮模拟超时时间改变信号
@param[in] timeout 超时时间
@sa [wheelEmulationTimeout](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelEmulationTimeout)

@fn void DInputDeviceTrackPoint::wheelHorizontalScrollChanged(bool horizontalScroll)
@brief 是否开启水平滚动改变信号
@param[in] horizontalScroll 是否水平滚动
@sa [wheelHorizontalScroll](@ref Dtk::InputDevices::DInputDeviceTrackPoint::wheelHorizontalScroll)

@fn DExpected<void> DInputDeviceTrackPoint::reset() override
@brief 重置指针杆的所有设置
@return 空DExpected对象, 无效表示操作失败

该函数会影响所有的指针杆设备.
*/
