Mercurial > hg > orthanc-stone
comparison Applications/Qt/QCairoWidget.cpp @ 457:3b4df9925db6 am-touch-events
added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Thu, 24 Jan 2019 16:42:27 +0100 |
parents | b70e9be013e4 |
children | e77cbe4bb4c8 |
comparison
equal
deleted
inserted
replaced
456:b70fcc134ba4 | 457:3b4df9925db6 |
---|---|
123 return; // Unsupported button | 123 return; // Unsupported button |
124 } | 124 } |
125 | 125 |
126 { | 126 { |
127 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); | 127 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
128 locker.GetCentralViewport().MouseDown(button, event->pos().x(), event->pos().y(), stoneModifiers); | 128 locker.GetCentralViewport().MouseDown(button, event->pos().x(), event->pos().y(), stoneModifiers, std::vector<OrthancStone::Touch>()); |
129 } | 129 } |
130 } | 130 } |
131 | 131 |
132 | 132 |
133 void QCairoWidget::mouseReleaseEvent(QMouseEvent* /*eventNotUsed*/) | 133 void QCairoWidget::mouseReleaseEvent(QMouseEvent* /*eventNotUsed*/) |
138 | 138 |
139 | 139 |
140 void QCairoWidget::mouseMoveEvent(QMouseEvent* event) | 140 void QCairoWidget::mouseMoveEvent(QMouseEvent* event) |
141 { | 141 { |
142 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); | 142 OrthancStone::NativeStoneApplicationContext::GlobalMutexLocker locker(*context_); |
143 locker.GetCentralViewport().MouseMove(event->pos().x(), event->pos().y()); | 143 locker.GetCentralViewport().MouseMove(event->pos().x(), event->pos().y(), std::vector<OrthancStone::Touch>()); |
144 } | 144 } |
145 | 145 |
146 | 146 |
147 void QCairoWidget::wheelEvent(QWheelEvent * event) | 147 void QCairoWidget::wheelEvent(QWheelEvent * event) |
148 { | 148 { |