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

#include <qbbnativeinterface.h>

Inheritance diagram for QBBNativeInterface:
QPlatformNativeInterface

Public Functions

virtual void * nativeResourceForWidget (const QByteArray &resource, QWidget *widget)
 
 QBBNativeInterface (QBBIntegration *integration)
 

Properties

QBBIntegrationmIntegration
 

Detailed Description

Definition at line 51 of file qbbnativeinterface.h.

Constructors and Destructors

◆ QBBNativeInterface()

QBBNativeInterface::QBBNativeInterface ( QBBIntegration integration)
explicit

Definition at line 51 of file qbbnativeinterface.cpp.

52  : mIntegration(integration)
53 {
54 }
QBBIntegration * mIntegration

Functions

◆ nativeResourceForWidget()

void * QBBNativeInterface::nativeResourceForWidget ( const QByteArray resource,
QWidget widget 
)
virtual

Reimplemented from QPlatformNativeInterface.

Definition at line 56 of file qbbnativeinterface.cpp.

57 {
58  if (resource == "windowGroup" && widget) {
59  const QWidget * const nativeWidget =
60  widget->parentWidget() ? widget->nativeParentWidget() : widget;
61  const screen_window_t window = reinterpret_cast<screen_window_t>(nativeWidget->winId());
62  const QBBScreen * const screen = mIntegration->screenForWindow(window);
63  if (screen) {
64  // We can't just call data() instead of constData() here, since that would detach
65  // and the lifetime of the char * would not be long enough. Therefore the const_cast.
66  return const_cast<char *>(screen->rootWindow()->groupName().constData());
67  }
68  }
69 
70  return 0;
71 }
QWidget * parentWidget() const
Returns the parent of this widget, or 0 if it does not have any parent widget.
Definition: qwidget.h:1035
QPointer< QWidget > widget
QSharedPointer< QBBRootWindow > rootWindow() const
Definition: qbbscreen.h:89
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
NSWindow * window
QWidget * nativeParentWidget() const
Returns the native parent for this widget, i.
Definition: qwidget.cpp:4514
QByteArray groupName() const
Definition: qbbrootwindow.h:69
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
QBBIntegration * mIntegration
QBBScreen * screenForWindow(screen_window_t window) const
WId winId() const
Returns the window system identifier of the widget.
Definition: qwidget.cpp:2557

Properties

◆ mIntegration

QBBIntegration* QBBNativeInterface::mIntegration
private

Definition at line 58 of file qbbnativeinterface.h.

Referenced by nativeResourceForWidget().


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