Qt 4.8
Static Public Functions | List of all members
QScreenDriverFactory Class Reference

The QScreenDriverFactory class creates screen drivers in Qt for Embedded Linux. More...

#include <qscreendriverfactory_qws.h>

Static Public Functions

static QScreencreate (const QString &, int)
 
static QStringList keys ()
 Returns the list of valid keys, i.e. More...
 

Detailed Description

The QScreenDriverFactory class creates screen drivers in Qt for Embedded Linux.

Note that this class is only available in Qt for Embedded Linux.

QScreenDriverFactory is used to detect and instantiate the available screen drivers, allowing Qt for Embedded Linux to load the preferred driver into the server application at runtime. The create() function returns a QScreen object representing the screen driver identified by a given key. The valid keys (i.e. the supported drivers) can be retrieved using the keys() function.

Qt for Embedded Linux provides several built-in screen drivers. In addition, custom screen drivers can be added using Qt's plugin mechanism, i.e. by subclassing the QScreen class and creating a screen driver plugin (QScreenDriverPlugin). See the Qt for Embedded Linux Display Management{display management} documentation for details.

See also
QScreen, QScreenDriverPlugin

Definition at line 56 of file qscreendriverfactory_qws.h.

Functions

◆ create()

static QScreen* QScreenDriverFactory::create ( const QString ,
int   
)
static

Referenced by qt_get_screen().

◆ keys()

QStringList QScreenDriverFactory::keys ( )
static

Returns the list of valid keys, i.e.

the available screen drivers.

See also
create()

Definition at line 163 of file qscreendriverfactory_qws.cpp.

Referenced by QVNCScreen::connect(), QTransformedScreen::connect(), and qt_get_screen().

164 {
165  QStringList list;
166 
167 #if defined(Q_OS_QNX) && !defined(QT_NO_QWS_QNX)
168  list << QLatin1String("QNX");
169 #endif
170 #if defined(Q_OS_INTEGRITY) && !defined(QT_NO_QWS_INTEGRITY)
171  list << QLatin1String("INTEGRITYFB");
172 #endif
173 #ifndef QT_NO_QWS_QVFB
174  list << QLatin1String("QVFb");
175 #endif
176 #ifndef QT_NO_QWS_LINUXFB
177  list << QLatin1String("LinuxFb");
178 #endif
179 #ifndef QT_NO_QWS_TRANSFORMED
180  list << QLatin1String("Transformed");
181 #endif
182 #ifndef QT_NO_QWS_VNC
183  list << QLatin1String("VNC");
184 #endif
185 #ifndef QT_NO_QWS_MULTISCREEN
186  list << QLatin1String("Multi");
187 #endif
188 
189 #if !defined(Q_OS_WIN32) || defined(QT_MAKEDLL)
190 #ifndef QT_NO_LIBRARY
191  QStringList plugins = loader()->keys();
192  for (int i = 0; i < plugins.size(); ++i) {
193 # ifdef QT_NO_QWS_QVFB
194  // give QVFb top priority for autodetection
195  if (plugins.at(i) == QLatin1String("QVFb"))
196  list.prepend(plugins.at(i));
197  else
198 # endif
199  if (!list.contains(plugins.at(i)))
200  list += plugins.at(i);
201  }
202 #endif //QT_NO_LIBRARY
203 #endif //QT_MAKEDLL
204  return list;
205 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
void prepend(const T &t)
Inserts value at the beginning of the list.
Definition: qlist.h:541
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
QBool contains(const QString &str, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the list contains the string str; otherwise returns false.
Definition: qstringlist.h:172
int size() const
Returns the number of items in the list.
Definition: qlist.h:137

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