diff options
Diffstat (limited to 'src/input/frontend/qinputchord.cpp')
-rw-r--r-- | src/input/frontend/qinputchord.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/input/frontend/qinputchord.cpp b/src/input/frontend/qinputchord.cpp index c1f18414c..dea23dad1 100644 --- a/src/input/frontend/qinputchord.cpp +++ b/src/input/frontend/qinputchord.cpp @@ -47,8 +47,10 @@ class QInputChordPrivate : public Qt3DInput::QAbstractAggregateActionInputPrivat public: QInputChordPrivate() : Qt3DInput::QAbstractAggregateActionInputPrivate() + , m_tolerance(0) {} + int m_tolerance; }; QInputChord::QInputChord(Qt3DCore::QNode *parent) @@ -62,11 +64,26 @@ QInputChord::~QInputChord() QNode::cleanup(); } +int QInputChord::tolerance() const +{ + Q_D(const QInputChord); + return d->m_tolerance; +} +void QInputChord::setTolerance(int tolerance) +{ + Q_D(QInputChord); + if (d->m_tolerance != tolerance) { + d->m_tolerance = tolerance; + emit toleranceChanged(tolerance); + } +} void QInputChord::copy(const Qt3DCore::QNode *ref) { QAbstractAggregateActionInput::copy(ref); + const QInputChord *input = static_cast<const QInputChord *>(ref); + d_func()->m_tolerance = input->d_func()->m_tolerance; } } // Qt3DInput |