Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qhaikurasterwindow.h
Go to the documentation of this file.
1// Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Tobias Koenig <tobias.koenig@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QHAIKURASTERWINDOW_H
5#define QHAIKURASTERWINDOW_H
6
7#include "qhaikuwindow.h"
8
9#include <View.h>
10
12
13class HaikuViewProxy : public QObject, public BView
14{
16
17public:
18 explicit HaikuViewProxy(BWindow *window, QObject *parent = nullptr);
19
20 void MessageReceived(BMessage *message) override;
21 void Draw(BRect updateRect) override;
22 void MouseDown(BPoint pos) override;
23 void MouseUp(BPoint pos) override;
24 void MouseMoved(BPoint pos, uint32 code, const BMessage *dragMessage) override;
25 void KeyDown(const char *bytes, int32 numBytes) override;
26 void KeyUp(const char *bytes, int32 numBytes) override;
27
29 void mouseEvent(const QPoint &localPosition, const QPoint &globalPosition, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source);
30 void wheelEvent(const QPoint &localPosition, const QPoint &globalPosition, int delta, Qt::Orientation orientation, Qt::KeyboardModifiers modifiers);
31 void keyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text);
33 void exitedView();
34 void drawRequest(const QRect &rect);
35
36private:
37 Qt::MouseButtons keyStateToMouseButtons(uint32 keyState) const;
38 Qt::KeyboardModifiers keyStateToModifiers(uint32 keyState) const;
39 void handleKeyEvent(QEvent::Type type, BMessage *message);
40};
41
43{
45
46public:
49
50 BView* nativeViewHandle() const;
51
52private:
53 HaikuViewProxy *m_view;
54};
55
57
58#endif
void MessageReceived(BMessage *message) override
void wheelEvent(const QPoint &localPosition, const QPoint &globalPosition, int delta, Qt::Orientation orientation, Qt::KeyboardModifiers modifiers)
HaikuViewProxy(BWindow *window, QObject *parent=nullptr)
void drawRequest(const QRect &rect)
void MouseUp(BPoint pos) override
void mouseEvent(const QPoint &localPosition, const QPoint &globalPosition, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source)
void Draw(BRect updateRect) override
void MouseMoved(BPoint pos, uint32 code, const BMessage *dragMessage) override
void MouseDown(BPoint pos) override
void keyEvent(QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString &text)
void enteredView()
Type
This enum type defines the valid event types in Qt.
Definition qcoreevent.h:51
BView * nativeViewHandle() const
QHaikuRasterWindow(QWindow *window)
\inmodule QtCore
Definition qobject.h:103
QObject * parent() const
Returns a pointer to the parent object.
Definition qobject.h:346
QWindow * window() const
Returns the window which belongs to the QPlatformWindow.
\inmodule QtCore\reentrant
Definition qpoint.h:25
\inmodule QtCore\reentrant
Definition qrect.h:30
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtGui
Definition qwindow.h:63
EGLImageKHR int int EGLuint64KHR * modifiers
QString text
rect
[4]
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
MouseEventSource
GLuint64 key
GLenum type
GLuint GLsizei const GLchar * message
GLsizei GLsizei GLchar * source
#define Q_OBJECT
#define Q_SIGNALS
aWidget window() -> setWindowTitle("New Window Title")
[2]