75 WordClickMode(
const QString &name =
"WordClickMode",
const QString &description =
"", QObject *parent = NULL);
78 virtual void onStateChanged(
bool state);
80 Qt::KeyboardModifiers wordClickModifiers()
const {
return m_mouseMoveKeyboardModifiers; }
81 void setWordClickModifiers(Qt::KeyboardModifiers modifiers) { m_mouseMoveKeyboardModifiers = modifiers; }
84 void selectWordCursor();
85 virtual void clearSelection();
86 virtual void checkWordCursor(
const QTextCursor &cursor) = 0;
87 void addDecoration(
const QTextCursor &cursor);
88 void removeDecoration();
91 int m_previousCursorStart;
92 int m_previousCursorEnd;
94 TextDecoration::Ptr m_deco;
97 void emitWordClicked(QTextCursor cursor)
99 emit wordClicked(cursor);
102 Qt::KeyboardModifiers m_mouseMoveKeyboardModifiers;
105 void onMouseDoubleClicked(QMouseEvent *e);
106 void onMouseMoved(QMouseEvent *e);
107 void onMouseReleased(QMouseEvent *e);
108 void onKeyReleased(QKeyEvent *e);
111 void wordClicked(
const QTextCursor &cursor);