Qt 4.8
Public Functions | Protected Functions | Protected Variables | List of all members
QDirectFbIntegration Class Reference

#include <qdirectfbintegration.h>

Inheritance diagram for QDirectFbIntegration:
QPlatformIntegration

Public Functions

QPixmapDatacreatePixmapData (QPixmapData::PixelType type) const
 Factory function for QPixmapData. More...
 
QPlatformWindowcreatePlatformWindow (QWidget *widget, WId winId=0) const
 Factory function for QPlatformWindow. More...
 
QWindowSurfacecreateWindowSurface (QWidget *widget, WId winId) const
 Factory function for QWindowSurface. More...
 
QPlatformFontDatabasefontDatabase () const
 Accessor for the platform integrations fontdatabase. More...
 
void initialize ()
 
 QDirectFbIntegration ()
 
QList< QPlatformScreen * > screens () const
 Accessor function to a list of all the screens on the current system. More...
 
 ~QDirectFbIntegration ()
 
- Public Functions inherited from QPlatformIntegration
virtual QPlatformClipboardclipboard () const
 Accessor for the platform integrations clipboard. More...
 
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 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 QPlatformNativeInterfacenativeInterface () const
 
virtual ~QPlatformIntegration ()
 

Protected Functions

virtual void initializeDirectFB ()
 
virtual void initializeInput ()
 
virtual void initializeScreen ()
 

Protected Variables

QDirectFBPointer< IDirectFB > m_dfb
 
QScopedPointer< QPlatformFontDatabasem_fontDb
 
QScopedPointer< QDirectFbInputm_input
 
QScopedPointer< QThreadm_inputRunner
 
QScopedPointer< QDirectFbScreenm_primaryScreen
 
QList< QPlatformScreen * > mScreens
 

Additional Inherited Members

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

Detailed Description

Definition at line 56 of file qdirectfbintegration.h.

Constructors and Destructors

◆ QDirectFbIntegration()

QDirectFbIntegration::QDirectFbIntegration ( )

Definition at line 58 of file qdirectfbintegration.cpp.

60 {}
QBasicUnixFontDatabase QGenericUnixFontDatabase
QScopedPointer< QPlatformFontDatabase > m_fontDb

◆ ~QDirectFbIntegration()

QDirectFbIntegration::~QDirectFbIntegration ( )

Definition at line 104 of file qdirectfbintegration.cpp.

105 {
107  m_input->wait();
108 }
void stopInputEventLoop()
QScopedPointer< QDirectFbInput > m_input
bool wait(unsigned long time=ULONG_MAX)
Blocks the thread until either of these conditions is met:

Functions

◆ createPixmapData()

QPixmapData * QDirectFbIntegration::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 110 of file qdirectfbintegration.cpp.

◆ createPlatformWindow()

QPlatformWindow * QDirectFbIntegration::createPlatformWindow ( QWidget widget,
WId  winId = 0 
) 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 118 of file qdirectfbintegration.cpp.

119 {
120  return new QDirectFbWindow(window,m_input.data());
121 }
T * data() const
Returns the value of the pointer referenced by this object.
NSWindow * window
QScopedPointer< QDirectFbInput > m_input

◆ createWindowSurface()

QWindowSurface * QDirectFbIntegration::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 123 of file qdirectfbintegration.cpp.

◆ fontDatabase()

QPlatformFontDatabase * QDirectFbIntegration::fontDatabase ( ) const
virtual

Accessor for the platform integrations fontdatabase.

Default implementation returns a default QPlatformFontDatabase.

See also
QPlatformFontDatabase

Reimplemented from QPlatformIntegration.

Definition at line 128 of file qdirectfbintegration.cpp.

Referenced by screens().

129 {
130  return m_fontDb.data();
131 }
T * data() const
Returns the value of the pointer referenced by this object.
QScopedPointer< QPlatformFontDatabase > m_fontDb

◆ initialize()

void QDirectFbIntegration::initialize ( )

Definition at line 62 of file qdirectfbintegration.cpp.

Referenced by QDirectFbIntegrationPlugin::create(), and screens().

63 {
67 }
virtual void initializeDirectFB()

◆ initializeDirectFB()

void QDirectFbIntegration::initializeDirectFB ( )
protectedvirtual

Definition at line 69 of file qdirectfbintegration.cpp.

Referenced by initialize(), and screens().

70 {
72  int argc = args.size();
73  char **argv = new char*[argc];
74 
75  for (int i = 0; i < argc; ++i)
76  argv[i] = qstrdup(args.at(i).toLocal8Bit().constData());
77 
78  DFBResult result = DirectFBInit(&argc, &argv);
79  if (result != DFB_OK) {
80  DirectFBError("QDirectFBScreen: error initializing DirectFB",
81  result);
82  }
83 
84  for (int i = 0; i < argc; ++i)
85  delete[] argv[i];
86  delete[] argv;
87 
88  // This must happen after DirectFBInit.
90 }
QDirectFBPointer< IDirectFB > m_dfb
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
QByteArray toLocal8Bit() const Q_REQUIRED_RESULT
Returns the local 8-bit representation of the string as a QByteArray.
Definition: qstring.cpp:4049
void reset(T *other=0)
Deletes the existing object it is pointing to if any, and sets its pointer to other.
const char * constData() const
Returns a pointer to the data stored in the byte array.
Definition: qbytearray.h:433
Q_CORE_EXPORT char * qstrdup(const char *)
int size() const
Returns the number of items in the list.
Definition: qlist.h:137
static IDirectFB * dfbInterface()
static QStringList arguments()
Returns the list of command-line arguments.

◆ initializeInput()

void QDirectFbIntegration::initializeInput ( )
protectedvirtual

Definition at line 98 of file qdirectfbintegration.cpp.

Referenced by initialize(), and screens().

99 {
101  m_input->start();
102 }
T * data() const
Returns the value of the pointer referenced by this object.
QDirectFBPointer< IDirectFB > m_dfb
void reset(T *other=0)
Deletes the existing object it is pointing to if any, and sets its pointer to other.
IDirectFBDisplayLayer * dfbLayer() const
QScopedPointer< QDirectFbInput > m_input
void start(Priority=InheritPriority)
Begins execution of the thread by calling run().
QScopedPointer< QDirectFbScreen > m_primaryScreen

◆ initializeScreen()

void QDirectFbIntegration::initializeScreen ( )
protectedvirtual

Definition at line 92 of file qdirectfbintegration.cpp.

Referenced by initialize(), and screens().

93 {
96 }
T * data() const
Returns the value of the pointer referenced by this object.
QList< QPlatformScreen * > mScreens
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507
void reset(T *other=0)
Deletes the existing object it is pointing to if any, and sets its pointer to other.
QScopedPointer< QDirectFbScreen > m_primaryScreen

◆ screens()

QList<QPlatformScreen *> QDirectFbIntegration::screens ( ) const
inlinevirtual

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 66 of file qdirectfbintegration.h.

66 { return mScreens; }
QList< QPlatformScreen * > mScreens

Properties

◆ m_dfb

QDirectFBPointer<IDirectFB> QDirectFbIntegration::m_dfb
protected

Definition at line 79 of file qdirectfbintegration.h.

Referenced by initializeDirectFB(), and initializeInput().

◆ m_fontDb

QScopedPointer<QPlatformFontDatabase> QDirectFbIntegration::m_fontDb
protected

Definition at line 83 of file qdirectfbintegration.h.

Referenced by fontDatabase().

◆ m_input

QScopedPointer<QDirectFbInput> QDirectFbIntegration::m_input
protected

◆ m_inputRunner

QScopedPointer<QThread> QDirectFbIntegration::m_inputRunner
protected

Definition at line 82 of file qdirectfbintegration.h.

◆ m_primaryScreen

QScopedPointer<QDirectFbScreen> QDirectFbIntegration::m_primaryScreen
protected

Definition at line 80 of file qdirectfbintegration.h.

Referenced by initializeInput(), and initializeScreen().

◆ mScreens

QList<QPlatformScreen *> QDirectFbIntegration::mScreens
protected

Definition at line 78 of file qdirectfbintegration.h.

Referenced by initializeScreen(), and screens().


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