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

The QMouseDriverFactory class creates mouse drivers in Qt for Embedded Linux. More...

#include <qmousedriverfactory_qws.h>

Static Public Functions

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

Detailed Description

The QMouseDriverFactory class creates mouse drivers in Qt for Embedded Linux.

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

QMouseDriverFactory is used to detect and instantiate the available mouse drivers, allowing Qt for Embedded Linux to load the preferred driver into the server application at runtime. The create() function returns a QWSMouseHandler object representing the mouse 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 mouse drivers. In addition, custom mouse drivers can be added using Qt's plugin mechanism, i.e. by subclassing the QWSMouseHandler class and creating a mouse driver plugin (QMouseDriverPlugin). See the Qt for Embedded Linux Pointer Handling{pointer handling} documentation for details.

See also
QWSMouseHandler, QMouseDriverPlugin

Definition at line 56 of file qmousedriverfactory_qws.h.

Functions

◆ create()

static QWSMouseHandler* QMouseDriverFactory::create ( const QString ,
const QString  
)
static

◆ keys()

QStringList QMouseDriverFactory::keys ( )
static

Returns the list of valid keys, i.e.

the available mouse drivers.

See also
create()

Definition at line 161 of file qmousedriverfactory_qws.cpp.

162 {
163  QStringList list;
164 
165 #if defined(Q_OS_QNX) && !defined(QT_NO_QWS_MOUSE_QNX)
166  list << QLatin1String("QNX");
167 #endif
168 #if defined(Q_OS_INTEGRITY) && !defined(QT_NO_QWS_MOUSE_INTEGRITY)
169  list << QLatin1String("INTEGRITY");
170 #endif
171 #ifndef QT_NO_QWS_MOUSE_LINUXTP
172  list << QLatin1String("LinuxTP");
173 #endif
174 #ifndef QT_NO_QWS_MOUSE_PC
175  list << QLatin1String("Auto")
176  << QLatin1String("IntelliMouse")
177  << QLatin1String("Microsoft")
178  << QLatin1String("MouseSystems")
179  << QLatin1String("MouseMan");
180 #endif
181 #ifndef QT_NO_QWS_MOUSE_TSLIB
182  list << QLatin1String("Tslib");
183 #endif
184 #ifndef QT_NO_QWS_MOUSE_LINUXINPUT
185  list << QLatin1String("LinuxInput");
186 #endif
187 
188 #if !defined(Q_OS_WIN32) || defined(QT_MAKEDLL)
189 #ifndef QT_NO_LIBRARY
190  QStringList plugins = loader()->keys();
191  for (int i = 0; i < plugins.size(); ++i) {
192  if (!list.contains(plugins.at(i)))
193  list += plugins.at(i);
194  }
195 #endif //QT_NO_LIBRARY
196 #endif //QT_MAKEDLL
197  return list;
198 }
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
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: