Qt 4.8
Public Functions | Private Functions | Properties | List of all members
QBBIntegration Class Reference

#include <qbbintegration.h>

Inheritance diagram for QBBIntegration:
QPlatformIntegration

Public Functions

virtual QPlatformClipboardclipboard () const
 Accessor for the platform integrations clipboard. More...
 
void createDisplay (screen_display_t display, int screenIndex)
 
virtual QPixmapDatacreatePixmapData (QPixmapData::PixelType type) const
 Factory function for QPixmapData. More...
 
virtual QPlatformWindowcreatePlatformWindow (QWidget *widget, WId winId) const
 Factory function for QPlatformWindow. More...
 
virtual QWindowSurfacecreateWindowSurface (QWidget *widget, WId winId) const
 Factory function for QWindowSurface. More...
 
virtual QPlatformFontDatabasefontDatabase () const
 Accessor for the platform integrations fontdatabase. More...
 
virtual bool hasCapability (QPlatformIntegration::Capability cap) const
 
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 new screen. More...
 
virtual QPlatformNativeInterfacenativeInterface () const
 
bool paintUsingOpenGL () const
 
 QBBIntegration ()
 
void removeDisplay (QBBScreen *screen)
 
QBBScreenscreenForNative (screen_display_t screen) const
 
QBBScreenscreenForWindow (screen_window_t window) const
 
virtual QList< QPlatformScreen * > screens () const
 Accessor function to a list of all the screens on the current system. More...
 
virtual void setCursorPos (int x, int y)
 
virtual ~QBBIntegration ()
 
- Public Functions inherited from QPlatformIntegration
virtual QPlatformEventLoopIntegrationcreateEventLoopIntegration () const
 Factory function for the eventloop integration interface. More...
 
virtual QPixmap grabWindow (WId window, int x, int y, int width, int height) const
 This function is called when Qt needs to be able to grab the content of a window. More...
 
virtual bool isVirtualDesktop ()
 Returns if the current windowing system configuration defines all the screens to be one desktop(virtual desktop), or if each screen is a desktop of its own. More...
 
virtual ~QPlatformIntegration ()
 

Private Functions

void createDisplays ()
 
void destroyDisplays ()
 
QBBScreenprimaryDisplay () const
 

Properties

QBBBpsEventFiltermBpsEventFilter
 
QBBButtonEventNotifiermButtonsNotifier
 
screen_context_t mContext
 
QPlatformFontDatabasemFontDb
 
QBBLocaleThread * mLocaleThread
 
QBBNativeInterfacemNativeInterface
 
QBBNavigatorEventHandlermNavigatorEventHandler
 
QBBNavigatorEventNotifiermNavigatorEventNotifier
 
bool mPaintUsingOpenGL
 
QBBScreenEventHandlermScreenEventHandler
 
QBBScreenEventThreadmScreenEventThread
 
QList< QPlatformScreen * > mScreens
 
QBBAbstractVirtualKeyboardmVirtualKeyboard
 

Additional Inherited Members

- Public Types inherited from QPlatformIntegration
enum  Capability { ThreadedPixmaps = 1, OpenGL = 2 }
 

Detailed Description

Definition at line 62 of file qbbintegration.h.

Constructors and Destructors

◆ QBBIntegration()

QBBIntegration::QBBIntegration ( )

Definition at line 85 of file qbbintegration.cpp.

85  :
91  mPaintUsingOpenGL(getenv("QBB_USE_OPENGL") != NULL),
95 {
96  qRegisterMetaType<screen_window_t>();
97 
98  if (mPaintUsingOpenGL) {
99  // Set default window API to OpenGL
103  }
104 
105  // initialize global OpenGL resources
107 
108  // open connection to QNX composition manager
109  errno = 0;
110  int result = screen_create_context(&mContext, SCREEN_APPLICATION_CONTEXT);
111  if (result != 0) {
112  qFatal("QBB: failed to connect to composition manager, errno=%d", errno);
113  }
114 
115  // Create/start navigator event notifier
116  // Not on BlackBerry, it has specialised event dispatcher which also handles navigator events
117 #if !defined(Q_OS_BLACKBERRY)
119 
120  // delay invocation of start() to the time the event loop is up and running
121  // needed to have the QThread internals of the main thread properly initialized
123 #endif
124 
125  // Create displays for all possible screens (which may not be attached)
126  createDisplays();
127 
128  // create/start event thread
129 #if defined(QBB_SCREENEVENTTHREAD)
132 #endif
133 
134 #ifdef QBBLOCALETHREAD_ENABLED
135  // Start the locale change monitoring thread.
136  mLocaleThread = new QBBLocaleThread();
137  mLocaleThread->start();
138 #endif
139 
140 #if defined(Q_OS_BLACKBERRY)
141  bps_initialize();
142 
143  QBBVirtualKeyboardBps *virtualKeyboardBps = new QBBVirtualKeyboardBps;
144 
146  (mScreenEventThread ? 0 : mScreenEventHandler), virtualKeyboardBps);
147 
148  if (!mScreenEventThread) {
149  Q_FOREACH (QPlatformScreen *platformScreen, mScreens) {
150  QBBScreen *screen = static_cast<QBBScreen*>(platformScreen);
152  }
153  }
154 
156 
157  mVirtualKeyboard = virtualKeyboardBps;
158 #else
159  // create/start the keyboard class.
161 
162  // delay invocation of start() to the time the event loop is up and running
163  // needed to have the QThread internals of the main thread properly initialized
165 #endif
166 
167  // TODO check if we need to do this for all screens or only the primary one
168  QObject::connect(mVirtualKeyboard, SIGNAL(heightChanged(int)),
169  primaryDisplay(), SLOT(keyboardHeightChanged(int)));
170 
171  // Set up the input context
172  qApp->setInputContext(new QBBInputContext(*mVirtualKeyboard, qApp));
173 
174  // delay invocation of start() to the time the event loop is up and running
175  // needed to have the QThread internals of the main thread properly initialized
177 }
QPlatformFontDatabase * mFontDb
QBBLocaleThread * mLocaleThread
The QPlatformScreen class provides an abstraction for visual displays.
QBBNativeInterface * mNativeInterface
QBasicUnixFontDatabase QGenericUnixFontDatabase
static QAbstractEventDispatcher * instance(QThread *thread=0)
Returns a pointer to the event dispatcher object for the specified thread.
static QPlatformWindowFormat defaultFormat()
Returns the default QPlatformWindowFormat for the application.
#define SLOT(a)
Definition: qobjectdefs.h:226
The QPlatformWindowFormat class specifies the display format of an OpenGL rendering context and if po...
QBBAbstractVirtualKeyboard * mVirtualKeyboard
QBBButtonEventNotifier * mButtonsNotifier
QList< QPlatformScreen * > mScreens
#define SIGNAL(a)
Definition: qobjectdefs.h:227
static void initialize()
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
#define qApp
QBBScreenEventThread * mScreenEventThread
QBBScreen * primaryDisplay() const
Q_CORE_EXPORT void qFatal(const char *,...)
void start(Priority=InheritPriority)
Begins execution of the thread by calling run().
QBBBpsEventFilter * mBpsEventFilter
QBBScreenEventHandler * mScreenEventHandler
void setWindowApi(QPlatformWindowFormat::WindowApi api)
void installOnEventDispatcher(QAbstractEventDispatcher *dispatcher)
void registerForScreenEvents(QBBScreen *screen)
static bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(0), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
Invokes the member (a signal or a slot name) on the object obj.
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
Definition: qglobal.h:2435
QBBNavigatorEventHandler * mNavigatorEventHandler
QBBNavigatorEventNotifier * mNavigatorEventNotifier
screen_context_t mContext
int errno
static void setDefaultFormat(const QPlatformWindowFormat &f)
Sets a new default QPlatformWindowFormat for the application to f.

◆ ~QBBIntegration()

QBBIntegration::~QBBIntegration ( )
virtual

Definition at line 179 of file qbbintegration.cpp.

180 {
181 #if defined(QBBINTEGRATION_DEBUG)
182  qDebug() << "QBB: platform plugin shutdown begin";
183 #endif
184  delete mNativeInterface;
185 
186  // Destroy the hardware button notifier
187  delete mButtonsNotifier;
188 
189 #ifdef QBBLOCALETHREAD_ENABLED
190  // stop/destroy the locale thread.
191  delete mLocaleThread;
192 #endif
193 
194 #if defined(QBB_SCREENEVENTTHREAD)
195  // stop/destroy event thread
196  delete mScreenEventThread;
197 #elif defined(Q_OS_BLACKBERRY)
198  Q_FOREACH (QPlatformScreen *platformScreen, mScreens) {
199  QBBScreen *screen = static_cast<QBBScreen*>(platformScreen);
201  }
202 #endif
203 
204 #if defined(Q_OS_BLACKBERRY)
205  delete mBpsEventFilter;
206 #else
207  // stop/destroy navigator event handling classes
209 #endif
210 
211  // destroy the keyboard class.
212  delete mVirtualKeyboard;
213 
214  delete mNavigatorEventHandler;
215  delete mScreenEventHandler;
216 
217  // destroy all displays
218  destroyDisplays();
219 
220  // close connection to QNX composition manager
221  screen_destroy_context(mContext);
222 
223  // cleanup global OpenGL resources
225 
226 #if defined(Q_OS_BLACKBERRY)
227  bps_shutdown();
228 #endif
229 
230 #if defined(QBBINTEGRATION_DEBUG)
231  qDebug() << "QBB: platform plugin shutdown end";
232 #endif
233 }
QBBLocaleThread * mLocaleThread
void unregisterForScreenEvents(QBBScreen *screen)
The QPlatformScreen class provides an abstraction for visual displays.
QBBNativeInterface * mNativeInterface
QBBAbstractVirtualKeyboard * mVirtualKeyboard
QBBButtonEventNotifier * mButtonsNotifier
QList< QPlatformScreen * > mScreens
Q_CORE_EXPORT void qDebug(const char *,...)
QBBScreenEventThread * mScreenEventThread
QBBBpsEventFilter * mBpsEventFilter
QBBScreenEventHandler * mScreenEventHandler
static void shutdown()
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
Definition: qglobal.h:2435
QBBNavigatorEventHandler * mNavigatorEventHandler
QBBNavigatorEventNotifier * mNavigatorEventNotifier
screen_context_t mContext

Functions

◆ clipboard()

QPlatformClipboard * QBBIntegration::clipboard ( ) const
virtual

Accessor for the platform integrations clipboard.

Default implementation returns a default QPlatformClipboard.

See also
QPlatformClipboard

Reimplemented from QPlatformIntegration.

Definition at line 299 of file qbbintegration.cpp.

Referenced by fontDatabase().

300 {
301  static QPlatformClipboard *clipboard = 0;
302  if (!clipboard) {
303  clipboard = static_cast<QPlatformClipboard *>(new QBBClipboard);
304  }
305  return clipboard;
306 }
virtual QPlatformClipboard * clipboard() const
Accessor for the platform integrations clipboard.

◆ createDisplay()

void QBBIntegration::createDisplay ( screen_display_t  display,
int  screenIndex 
)

Definition at line 368 of file qbbintegration.cpp.

Referenced by createDisplays(), QBBScreenEventHandler::handleDisplayEvent(), and paintUsingOpenGL().

369 {
370  QBBScreen *screen = new QBBScreen(mContext, display, screenIndex);
371  mScreens.append(screen);
372  screen->adjustOrientation();
373 
374  QObject::connect(mScreenEventHandler, SIGNAL(newWindowCreated(screen_window_t)),
375  screen, SLOT(newWindowCreated(screen_window_t)));
376  QObject::connect(mScreenEventHandler, SIGNAL(windowClosed(screen_window_t)),
377  screen, SLOT(windowClosed(screen_window_t)));
378 
379  QObject::connect(mNavigatorEventHandler, SIGNAL(rotationChanged(int)), screen, SLOT(setRotation(int)));
380  QObject::connect(mNavigatorEventHandler, SIGNAL(windowGroupActivated(QByteArray)), screen, SLOT(activateWindowGroup(QByteArray)));
381  QObject::connect(mNavigatorEventHandler, SIGNAL(windowGroupDeactivated(QByteArray)), screen, SLOT(deactivateWindowGroup(QByteArray)));
383  screen, SLOT(windowGroupStateChanged(QByteArray,Qt::WindowState)));
384 }
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
#define SLOT(a)
Definition: qobjectdefs.h:226
QList< QPlatformScreen * > mScreens
#define SIGNAL(a)
Definition: qobjectdefs.h:227
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
void adjustOrientation()
Definition: qbbscreen.cpp:496
QBBScreenEventHandler * mScreenEventHandler
QBBNavigatorEventHandler * mNavigatorEventHandler
screen_context_t mContext
WindowState
Definition: qnamespace.h:366

◆ createDisplays()

void QBBIntegration::createDisplays ( )
private

Definition at line 337 of file qbbintegration.cpp.

Referenced by paintUsingOpenGL(), and QBBIntegration().

338 {
339  // get number of displays
340  errno = 0;
341  int displayCount;
342  int result = screen_get_context_property_iv(mContext, SCREEN_PROPERTY_DISPLAY_COUNT, &displayCount);
343  if (result != 0)
344  qFatal("QBBIntegration: failed to query display count, errno=%d", errno);
345 
346  // get all displays
347  errno = 0;
348  screen_display_t *displays = (screen_display_t *)alloca(sizeof(screen_display_t) * displayCount);
349  result = screen_get_context_property_pv(mContext, SCREEN_PROPERTY_DISPLAYS, (void **)displays);
350  if (result != 0)
351  qFatal("QBBIntegration: failed to query displays, errno=%d", errno);
352 
353  for (int i=0; i<displayCount; i++) {
354  int isAttached = 0;
355  result = screen_get_display_property_iv(displays[i], SCREEN_PROPERTY_ATTACHED, &isAttached);
356  if (result != 0) {
357  qWarning("QBBIntegration: failed to query display attachment, errno=%d", errno);
358  isAttached = 1; // assume attached
359  }
360 
361  if (!isAttached)
362  continue;
363 
364  createDisplay(displays[i], i);
365  } // of displays iteration
366 }
void createDisplay(screen_display_t display, int screenIndex)
Q_CORE_EXPORT void qWarning(const char *,...)
Q_CORE_EXPORT void qFatal(const char *,...)
screen_context_t mContext
int errno

◆ createPixmapData()

QPixmapData * QBBIntegration::createPixmapData ( QPixmapData::PixelType  type) const
virtual

Factory function for QPixmapData.

PixelType can be either PixmapType or BitmapType.

See also
QPixmapData

Implements QPlatformIntegration.

Definition at line 246 of file qbbintegration.cpp.

247 {
248  if (paintUsingOpenGL())
249  return new QGLPixmapData(type);
250  else
251  return new QRasterPixmapData(type);
252 }
int type
Definition: qmetatype.cpp:239
bool paintUsingOpenGL() const

◆ createPlatformWindow()

QPlatformWindow * QBBIntegration::createPlatformWindow ( QWidget widget,
WId  winId 
) const
virtual

Factory function for QPlatformWindow.

The widget parameter is a pointer to the top level widget(tlw) which the QPlatformWindow is suppose to be created for. The WId handle is actually never used, but there for future reference. Its purpose is if it is going to be possible to create QPlatformWindows on existing WId.

All tlw has to have a QPlatformWindow, and it will be created when the QPlatformWindow is set to be visible for the first time. If the tlw's window flags are changed, or if the tlw's QPlatformWindowFormat is changed, then the tlw's QPlatformWindow is deleted and a new one is created.

See also
QPlatformWindow, QPlatformWindowFormat
createWindowSurface(QWidget *widget, WId winId) const

Implements QPlatformIntegration.

Definition at line 254 of file qbbintegration.cpp.

255 {
256  Q_UNUSED(winId);
257 
258  return new QBBWindow(widget, mContext, primaryDisplay());
259 }
QBBScreen * primaryDisplay() const
screen_context_t mContext
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ createWindowSurface()

QWindowSurface * QBBIntegration::createWindowSurface ( QWidget widget,
WId  winId 
) const
virtual

Factory function for QWindowSurface.

The QWidget parameter is a pointer to the top level widget(tlw) the window surface is created for. A QPlatformWindow is always created before the QWindowSurface for tlw where the widget also requires a WindowSurface. It is possible to create top level QWidgets without a QWindowSurface by specifying QPlatformWindowFormat::setWindowSurface(false) for the tlw QPlatformWindowFormat.

See also
QWindowSurface
createPlatformWindow(QWidget *widget, WId winId = 0) const

Implements QPlatformIntegration.

Definition at line 261 of file qbbintegration.cpp.

262 {
263  Q_UNUSED(winId);
264  if (paintUsingOpenGL())
265  return new QBBGLWindowSurface(widget);
266  else
267  return new QBBRasterWindowSurface(widget);
268 }
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
bool paintUsingOpenGL() const

◆ destroyDisplays()

void QBBIntegration::destroyDisplays ( )
private

Definition at line 394 of file qbbintegration.cpp.

Referenced by paintUsingOpenGL(), and ~QBBIntegration().

395 {
397  mScreens.clear();
398 }
QList< QPlatformScreen * > mScreens
void clear()
Removes all items from the list.
Definition: qlist.h:764
Q_OUTOFLINE_TEMPLATE void qDeleteAll(ForwardIterator begin, ForwardIterator end)
Definition: qalgorithms.h:319

◆ fontDatabase()

virtual QPlatformFontDatabase* QBBIntegration::fontDatabase ( ) const
inlinevirtual

Accessor for the platform integrations fontdatabase.

Default implementation returns a default QPlatformFontDatabase.

See also
QPlatformFontDatabase

Reimplemented from QPlatformIntegration.

Definition at line 79 of file qbbintegration.h.

79 { return mFontDb; }
QPlatformFontDatabase * mFontDb

◆ hasCapability()

bool QBBIntegration::hasCapability ( QPlatformIntegration::Capability  cap) const
virtual

Reimplemented from QPlatformIntegration.

Definition at line 235 of file qbbintegration.cpp.

236 {
237  switch (cap) {
238  case ThreadedPixmaps: return true;
239 #if defined(QT_OPENGL_ES)
240  case OpenGL: return true;
241 #endif
242  default: return QPlatformIntegration::hasCapability(cap);
243  }
244 }
virtual bool hasCapability(Capability cap) const

◆ moveToScreen()

void QBBIntegration::moveToScreen ( QWidget window,
int  screen 
)
virtual

This function is called when a QWidget is displayed on screen, or the QWidget is to be displayed on a new screen.

The QWidget parameter is a pointer to the top level widget and the int parameter is the index to the screen in QList<QPlatformScreen *> screens() const.

Default implementation does nothing.

See also
screens() const

Reimplemented from QPlatformIntegration.

Definition at line 275 of file qbbintegration.cpp.

276 {
277 #if defined(QBBINTEGRATION_DEBUG)
278  qDebug() << "QBBIntegration::moveToScreen - w=" << window << ", s=" << screen;
279 #endif
280 
281  // get platform window used by widget
282  QBBWindow* platformWindow = static_cast<QBBWindow*>(window->platformWindow());
283 
284  // lookup platform screen by index
285  QBBScreen* platformScreen = static_cast<QBBScreen*>(mScreens.at(screen));
286 
287  // move the platform window to the platform screen (this can fail when move to screen
288  // is called before the window is actually created).
289  if (platformWindow && platformScreen)
290  platformWindow->setScreen(platformScreen);
291 }
void setScreen(QBBScreen *platformScreen)
Definition: qbbwindow.cpp:474
QList< QPlatformScreen * > mScreens
Q_CORE_EXPORT void qDebug(const char *,...)
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468

◆ nativeInterface()

QPlatformNativeInterface * QBBIntegration::nativeInterface ( ) const
virtual

Reimplemented from QPlatformIntegration.

Definition at line 270 of file qbbintegration.cpp.

271 {
272  return mNativeInterface;
273 }
QBBNativeInterface * mNativeInterface

◆ paintUsingOpenGL()

bool QBBIntegration::paintUsingOpenGL ( ) const
inline

Definition at line 85 of file qbbintegration.h.

Referenced by createPixmapData(), and createWindowSurface().

85 { return mPaintUsingOpenGL; }

◆ primaryDisplay()

QBBScreen * QBBIntegration::primaryDisplay ( ) const
private

Definition at line 327 of file qbbintegration.cpp.

Referenced by createPlatformWindow(), paintUsingOpenGL(), and QBBIntegration().

328 {
329  return static_cast<QBBScreen*>(mScreens.first());
330 }
QList< QPlatformScreen * > mScreens
T & first()
Returns a reference to the first item in the list.
Definition: qlist.h:282

◆ removeDisplay()

void QBBIntegration::removeDisplay ( QBBScreen screen)

Definition at line 386 of file qbbintegration.cpp.

Referenced by QBBScreenEventHandler::handleDisplayEvent(), and paintUsingOpenGL().

387 {
388  Q_CHECK_PTR(screen);
389  Q_ASSERT(mScreens.contains(screen));
390  mScreens.removeAll(screen);
391  screen->deleteLater();
392 }
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QList< QPlatformScreen * > mScreens
QBool contains(const T &t) const
Returns true if the list contains an occurrence of value; otherwise returns false.
Definition: qlist.h:880
#define Q_CHECK_PTR(p)
Definition: qglobal.h:1853
void deleteLater()
Schedules this object for deletion.
Definition: qobject.cpp:2145
int removeAll(const T &t)
Removes all occurrences of value in the list and returns the number of entries removed.
Definition: qlist.h:770

◆ screenForNative()

QBBScreen * QBBIntegration::screenForNative ( screen_display_t  screen) const

Definition at line 400 of file qbbintegration.cpp.

Referenced by QBBScreenEventHandler::handleDisplayEvent(), and paintUsingOpenGL().

401 {
402  Q_FOREACH (QPlatformScreen *screen, mScreens) {
403  QBBScreen *bbScreen = static_cast<QBBScreen*>(screen);
404  if (bbScreen->nativeDisplay() == nativeScreen)
405  return bbScreen;
406  }
407 
408  return 0;
409 }
The QPlatformScreen class provides an abstraction for visual displays.
QList< QPlatformScreen * > mScreens
screen_display_t nativeDisplay() const
Definition: qbbscreen.h:72
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
Definition: qglobal.h:2435

◆ screenForWindow()

QBBScreen * QBBIntegration::screenForWindow ( screen_window_t  window) const

Definition at line 310 of file qbbintegration.cpp.

Referenced by QBBNativeInterface::nativeResourceForWidget(), and paintUsingOpenGL().

311 {
312  screen_display_t display = 0;
313  if (screen_get_window_property_pv(window, SCREEN_PROPERTY_DISPLAY, (void**)&display) != 0) {
314  qWarning("QBBIntegration: Failed to get screen for window, errno=%d", errno);
315  return 0;
316  }
317 
318  Q_FOREACH (QPlatformScreen *screen, mScreens) {
319  QBBScreen * const bbScreen = static_cast<QBBScreen*>(screen);
320  if (bbScreen->nativeDisplay() == display)
321  return bbScreen;
322  }
323 
324  return 0;
325 }
The QPlatformScreen class provides an abstraction for visual displays.
QList< QPlatformScreen * > mScreens
NSWindow * window
Q_GUI_EXPORT EGLDisplay display()
Definition: qegl.cpp:589
Q_CORE_EXPORT void qWarning(const char *,...)
screen_display_t nativeDisplay() const
Definition: qbbscreen.h:72
#define Q_FOREACH(variable, container)
Same as foreach(variable, container).
Definition: qglobal.h:2435
int errno

◆ screens()

QList< QPlatformScreen * > QBBIntegration::screens ( ) const
virtual

Accessor function to a list of all the screens on the current system.

The screen with the index == 0 is the default/main screen.

Implements QPlatformIntegration.

Definition at line 293 of file qbbintegration.cpp.

294 {
295  return mScreens;
296 }
QList< QPlatformScreen * > mScreens

◆ setCursorPos()

void QBBIntegration::setCursorPos ( int  x,
int  y 
)
virtual

Definition at line 332 of file qbbintegration.cpp.

333 {
335 }
void injectPointerMoveEvent(int x, int y)
QBBScreenEventThread * mScreenEventThread

Properties

◆ mBpsEventFilter

QBBBpsEventFilter* QBBIntegration::mBpsEventFilter
private

Definition at line 110 of file qbbintegration.h.

Referenced by QBBIntegration(), and ~QBBIntegration().

◆ mButtonsNotifier

QBBButtonEventNotifier* QBBIntegration::mButtonsNotifier
private

Definition at line 102 of file qbbintegration.h.

Referenced by QBBIntegration(), and ~QBBIntegration().

◆ mContext

screen_context_t QBBIntegration::mContext
private

◆ mFontDb

QPlatformFontDatabase* QBBIntegration::mFontDb
private

Definition at line 104 of file qbbintegration.h.

Referenced by fontDatabase().

◆ mLocaleThread

QBBLocaleThread* QBBIntegration::mLocaleThread
private

Definition at line 103 of file qbbintegration.h.

Referenced by QBBIntegration(), and ~QBBIntegration().

◆ mNativeInterface

QBBNativeInterface* QBBIntegration::mNativeInterface
private

Definition at line 109 of file qbbintegration.h.

Referenced by nativeInterface(), and ~QBBIntegration().

◆ mNavigatorEventHandler

QBBNavigatorEventHandler* QBBIntegration::mNavigatorEventHandler
private

Definition at line 100 of file qbbintegration.h.

Referenced by createDisplay(), QBBIntegration(), and ~QBBIntegration().

◆ mNavigatorEventNotifier

QBBNavigatorEventNotifier* QBBIntegration::mNavigatorEventNotifier
private

Definition at line 101 of file qbbintegration.h.

Referenced by QBBIntegration(), and ~QBBIntegration().

◆ mPaintUsingOpenGL

bool QBBIntegration::mPaintUsingOpenGL
private

Definition at line 107 of file qbbintegration.h.

Referenced by paintUsingOpenGL(), and QBBIntegration().

◆ mScreenEventHandler

QBBScreenEventHandler* QBBIntegration::mScreenEventHandler
private

Definition at line 106 of file qbbintegration.h.

Referenced by createDisplay(), QBBIntegration(), and ~QBBIntegration().

◆ mScreenEventThread

QBBScreenEventThread* QBBIntegration::mScreenEventThread
private

Definition at line 99 of file qbbintegration.h.

Referenced by QBBIntegration(), setCursorPos(), and ~QBBIntegration().

◆ mScreens

QList<QPlatformScreen*> QBBIntegration::mScreens
private

◆ mVirtualKeyboard

QBBAbstractVirtualKeyboard* QBBIntegration::mVirtualKeyboard
private

Definition at line 108 of file qbbintegration.h.

Referenced by QBBIntegration(), and ~QBBIntegration().


The documentation for this class was generated from the following files: