Qt 4.8
qbbintegration.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2011 - 2012 Research In Motion <blackberry-qt@qnx.com>
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtCore module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QBBINTEGRATION_H
43 #define QBBINTEGRATION_H
44 
45 #include <QtGui/QPlatformIntegration>
46 
47 #include <screen/screen.h>
48 
50 
54 class QBBLocaleThread;
56 class QBBScreen;
58 class QBBNativeInterface;
59 class QBBBpsEventFilter;
61 
63 {
64 public:
66  virtual ~QBBIntegration();
67 
68  virtual bool hasCapability(QPlatformIntegration::Capability cap) const;
69 
71  virtual QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId) const;
72  virtual QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
74 
75  virtual QList<QPlatformScreen *> screens() const;
76  virtual void moveToScreen(QWidget *window, int screen);
77  virtual void setCursorPos(int x, int y);
78 
79  virtual QPlatformFontDatabase *fontDatabase() const { return mFontDb; }
80 
81 #ifndef QT_NO_CLIPBOARD
82  virtual QPlatformClipboard *clipboard() const;
83 #endif
84 
85  bool paintUsingOpenGL() const { return mPaintUsingOpenGL; }
86 
87  QBBScreen *screenForWindow(screen_window_t window) const;
88 
89  QBBScreen *screenForNative(screen_display_t screen) const;
90 
91  void createDisplay(screen_display_t display, int screenIndex);
92  void removeDisplay(QBBScreen *screen);
93 private:
94  QBBScreen *primaryDisplay() const;
95  void createDisplays();
96  void destroyDisplays();
97 
98  screen_context_t mContext;
103  QBBLocaleThread *mLocaleThread;
111 };
112 
114 
115 #endif // QBBINTEGRATION_H
QPlatformFontDatabase * mFontDb
QBBLocaleThread * mLocaleThread
unsigned long WId
Definition: qwindowdefs.h:119
int type
Definition: qmetatype.cpp:239
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPointer< QWidget > widget
QBBNativeInterface * mNativeInterface
void createDisplay(screen_display_t display, int screenIndex)
virtual QList< QPlatformScreen * > screens() const
Accessor function to a list of all the screens on the current system.
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
virtual void moveToScreen(QWidget *window, int screen)
This function is called when a QWidget is displayed on screen, or the QWidget is to be displayed on a...
The QPlatformWindow class provides an abstraction for top-level windows.
QBBAbstractVirtualKeyboard * mVirtualKeyboard
QBBButtonEventNotifier * mButtonsNotifier
virtual bool hasCapability(QPlatformIntegration::Capability cap) const
virtual ~QBBIntegration()
QList< QPlatformScreen * > mScreens
virtual QPixmapData * createPixmapData(QPixmapData::PixelType type) const
Factory function for QPixmapData.
NSWindow * window
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
QBBScreenEventThread * mScreenEventThread
virtual QPlatformFontDatabase * fontDatabase() const
Accessor for the platform integrations fontdatabase.
QBBScreen * screenForNative(screen_display_t screen) const
The QWindowSurface class provides the drawing area for top-level windows.
virtual QPlatformNativeInterface * nativeInterface() const
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
QBBScreen * primaryDisplay() const
virtual QWindowSurface * createWindowSurface(QWidget *widget, WId winId) const
Factory function for QWindowSurface.
virtual void setCursorPos(int x, int y)
QBBBpsEventFilter * mBpsEventFilter
QBBScreenEventHandler * mScreenEventHandler
void removeDisplay(QBBScreen *screen)
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
QBBScreen * screenForWindow(screen_window_t window) const
QBBNavigatorEventHandler * mNavigatorEventHandler
QBBNavigatorEventNotifier * mNavigatorEventNotifier
screen_context_t mContext
virtual QPlatformClipboard * clipboard() const
Accessor for the platform integrations clipboard.
bool paintUsingOpenGL() const
virtual QPlatformWindow * createPlatformWindow(QWidget *widget, WId winId) const
Factory function for QPlatformWindow.
The QList class is a template class that provides lists.
Definition: qdatastream.h:62