diff options
Diffstat (limited to 'examples/wayland/minimal-cpp/window.cpp')
-rw-r--r-- | examples/wayland/minimal-cpp/window.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/wayland/minimal-cpp/window.cpp b/examples/wayland/minimal-cpp/window.cpp index 4c39505d..68f0a25d 100644 --- a/examples/wayland/minimal-cpp/window.cpp +++ b/examples/wayland/minimal-cpp/window.cpp @@ -24,6 +24,7 @@ void Window::initializeGL() emit glReady(); } +//! [paintGL] void Window::paintGL() { m_compositor->startRender(); @@ -64,11 +65,14 @@ void Window::paintGL() m_textureBlitter.release(); m_compositor->endRender(); } +//! [paintGL] +//! [mousePressEvent] void Window::mousePressEvent(QMouseEvent *event) { m_compositor->handleMousePress(event->position().toPoint(), event->button()); } +//! [mousePressEvent] void Window::mouseReleaseEvent(QMouseEvent *event) { @@ -85,10 +89,12 @@ void Window::wheelEvent(QWheelEvent *event) m_compositor->handleMouseWheel(event->angleDelta()); } +//! [keyPressEvent] void Window::keyPressEvent(QKeyEvent *e) { m_compositor->handleKeyPress(e->nativeScanCode()); } +//! [keyPressEvent] void Window::keyReleaseEvent(QKeyEvent *e) { |