Qt 4.8
|
The QPlatformIntegration class is the entry for WindowSystem specific functionality. More...
#include <qplatformintegration_qpa.h>
Public Types | |
enum | Capability { ThreadedPixmaps = 1, OpenGL = 2 } |
Public Functions | |
virtual QPlatformClipboard * | clipboard () const |
Accessor for the platform integrations clipboard. More... | |
virtual QPlatformEventLoopIntegration * | createEventLoopIntegration () const |
Factory function for the eventloop integration interface. More... | |
virtual QPixmapData * | createPixmapData (QPixmapData::PixelType type) const =0 |
Factory function for QPixmapData. More... | |
virtual QPlatformWindow * | createPlatformWindow (QWidget *widget, WId winId=0) const =0 |
Factory function for QPlatformWindow. More... | |
virtual QWindowSurface * | createWindowSurface (QWidget *widget, WId winId) const =0 |
Factory function for QWindowSurface. More... | |
virtual QPlatformFontDatabase * | fontDatabase () const |
Accessor for the platform integrations fontdatabase. 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 | hasCapability (Capability cap) const |
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 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 QPlatformNativeInterface * | nativeInterface () const |
virtual QList< QPlatformScreen * > | screens () const =0 |
Accessor function to a list of all the screens on the current system. More... | |
virtual | ~QPlatformIntegration () |
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
QPlatformIntegration is the single entry point for windowsystem specific functionality when using the QPA platform. It has factory functions for creating platform specific pixmaps and windows. The class also controls the font subsystem.
QPlatformIntegration is a singelton class which gets instansiated in the QApplication constructor. The QPlatformIntegration instance do not have ownership of objects it creates in functions where the name starts with create. However, functions which don't have a name starting with create acts as assessors to member variables.
It is not trivial to create or build a platform plugin outside of the Qt source tree. Therefor the recommended approach for making new platform plugin is to copy an existing plugin inside the QTSRCTREE/src/plugins/platform and develop the plugin inside the source tree.
The minimal platform integration is the smallest platform integration it is possible to make, which makes it an ideal starting point for new plugins. For a slightly more advanced plugin, consider reviewing the directfb plugin, or the testlite plugin.
Definition at line 65 of file qplatformintegration_qpa.h.
|
inlinevirtual |
Definition at line 73 of file qplatformintegration_qpa.h.
|
virtual |
Accessor for the platform integrations clipboard.
Default implementation returns a default QPlatformClipboard.
Reimplemented in QBBIntegration, QXlibIntegration, and QWaylandIntegration.
Definition at line 98 of file qplatformintegration_qpa.cpp.
Referenced by QWaylandDisplay::displayHandleGlobal(), and QXlibScreen::handleSelectionRequest().
|
virtual |
Factory function for the eventloop integration interface.
Default implementation returns 0, which causes the eventloop to run in a single thread mode.
Reimplemented in QOpenKODEIntegration, QCocoaIntegration, and QUIKitIntegration.
Definition at line 66 of file qplatformintegration_qpa.cpp.
|
pure virtual |
Factory function for QPixmapData.
PixelType can be either PixmapType or BitmapType.
Implemented in QOpenKODEIntegration, QVNCIntegration, QLinuxFbIntegration, QVFbIntegration, QCocoaIntegration, QMinimalIntegration, QBBIntegration, QXlibIntegration, QDirectFbIntegration, QEglFSIntegration, QXcbIntegration, QWaylandIntegration, and QUIKitIntegration.
|
pure 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.
Implemented in QOpenKODEIntegration, QVNCIntegration, QLinuxFbIntegration, QVFbIntegration, QCocoaIntegration, QMinimalIntegration, QBBIntegration, QXlibIntegration, QDirectFbIntegration, QEglFSIntegration, QXcbIntegration, QWaylandIntegration, and QUIKitIntegration.
|
pure 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.
Implemented in QOpenKODEIntegration, QVNCIntegration, QLinuxFbIntegration, QVFbIntegration, QCocoaIntegration, QMinimalIntegration, QBBIntegration, QXlibIntegration, QDirectFbIntegration, QEglFSIntegration, QXcbIntegration, QWaylandIntegration, and QUIKitIntegration.
|
virtual |
Accessor for the platform integrations fontdatabase.
Default implementation returns a default QPlatformFontDatabase.
Reimplemented in QOpenKODEIntegration, QVNCIntegration, QLinuxFbIntegration, QVFbIntegration, QCocoaIntegration, QBBIntegration, QXlibIntegration, QDirectFbIntegration, QXcbIntegration, QEglFSIntegration, QWaylandIntegration, and QUIKitIntegration.
Definition at line 78 of file qplatformintegration_qpa.cpp.
Referenced by QtFontStyle::~QtFontStyle().
|
virtual |
This function is called when Qt needs to be able to grab the content of a window.
Returnes the content of the window specified with the WId handle within the boundaries of QRect(x,y,width,height).
Reimplemented in QVNCIntegration, QXlibIntegration, and QXcbIntegration.
Definition at line 49 of file qplatformintegration_qpa.cpp.
|
virtual |
Reimplemented in QOpenKODEIntegration, QVNCIntegration, QLinuxFbIntegration, QCocoaIntegration, QMinimalIntegration, QBBIntegration, QXlibIntegration, QEglFSIntegration, QXcbIntegration, and QWaylandIntegration.
Definition at line 224 of file qplatformintegration_qpa.cpp.
Referenced by QWaylandIntegration::hasCapability(), QXcbIntegration::hasCapability(), QEglFSIntegration::hasCapability(), QXlibIntegration::hasCapability(), QBBIntegration::hasCapability(), QMinimalIntegration::hasCapability(), QCocoaIntegration::hasCapability(), QLinuxFbIntegration::hasCapability(), QVNCIntegration::hasCapability(), and QOpenKODEIntegration::hasCapability().
|
inlinevirtual |
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.
Default implementation returns false.
Reimplemented in QVNCIntegration, and QXcbIntegration.
Definition at line 85 of file qplatformintegration_qpa.h.
|
inlinevirtual |
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.
Reimplemented in QVNCIntegration, QBBIntegration, and QXcbIntegration.
Definition at line 84 of file qplatformintegration_qpa.h.
Referenced by QWidgetPrivate::init(), and q_createNativeChildrenAndSetParent().
|
virtual |
Reimplemented in QXlibIntegration, QBBIntegration, QXcbIntegration, and QWaylandIntegration.
Definition at line 109 of file qplatformintegration_qpa.cpp.
|
pure 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.
Implemented in QOpenKODEIntegration, QVNCIntegration, QLinuxFbIntegration, QVFbIntegration, QCocoaIntegration, QMinimalIntegration, QBBIntegration, QXlibIntegration, QDirectFbIntegration, QEglFSIntegration, QXcbIntegration, QWaylandIntegration, and QUIKitIntegration.
Referenced by QPlatformScreen::platformScreenForWidget(), screenForDevice(), and QDesktopWidgetPrivate::updateScreenList().