添加OpenCv
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <QObject>
|
||||
#include <QPoint>
|
||||
#include <QKeyEvent>
|
||||
|
||||
#include <QTimer>
|
||||
class CursorController : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
|
||||
public slots:
|
||||
void handleKey(int key); // 接受 Qt::Key_xxx
|
||||
|
||||
void handleKey(int key, bool pressed);
|
||||
signals:
|
||||
void cursorMoved(const QPoint &globalPos);
|
||||
void clicked(QWidget *target);
|
||||
@@ -33,6 +33,10 @@ private:
|
||||
bool m_useRealCursor; // true: 系统光标 false: 自绘光标
|
||||
void move(const QPoint &delta);
|
||||
void emulateClick();
|
||||
|
||||
QTimer m_holdTimer; // 用来检测是否达到长按时间
|
||||
bool m_isLongPress; // 当前按键是否是长按
|
||||
int m_curStep; // 当前应该用的步长(1 或 5)
|
||||
};
|
||||
|
||||
#endif // CURSORCONTROLLER_H
|
||||
|
||||
Reference in New Issue
Block a user