1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* vim: set ts=4 et sw=4 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 #include "nsIWidget.h"
12 #include <QtGui/QWindow>
25 class MozQWidget
: public QWindow
29 explicit MozQWidget(nsWindow
* aReceiver
, QWindow
* aParent
= 0);
32 virtual void render(QPainter
* painter
);
34 virtual nsWindow
* getReceiver() { return mReceiver
; };
35 virtual void dropReceiver() { mReceiver
= nullptr; };
36 virtual void SetCursor(nsCursor aCursor
);
43 virtual bool event(QEvent
* event
);
44 virtual void exposeEvent(QExposeEvent
* event
);
45 virtual void focusInEvent(QFocusEvent
* event
);
46 virtual void focusOutEvent(QFocusEvent
* event
);
47 virtual void hideEvent(QHideEvent
* event
);
48 virtual void keyPressEvent(QKeyEvent
* event
);
49 virtual void keyReleaseEvent(QKeyEvent
* event
);
50 virtual void mouseDoubleClickEvent(QMouseEvent
* event
);
51 virtual void mouseMoveEvent(QMouseEvent
* event
);
52 virtual void mousePressEvent(QMouseEvent
* event
);
53 virtual void mouseReleaseEvent(QMouseEvent
* event
);
54 virtual void moveEvent(QMoveEvent
* event
);
55 virtual void resizeEvent(QResizeEvent
* event
);
56 virtual void showEvent(QShowEvent
* event
);
57 virtual void tabletEvent(QTabletEvent
* event
);
58 virtual void touchEvent(QTouchEvent
* event
);
59 virtual void wheelEvent(QWheelEvent
* event
);
64 nsWindowType mWindowType
;
68 } // namespace mozilla
70 #endif // MOZQWIDGET_H