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

The QDecorationFactory class creates window decorations in Qt for Embedded Linux. More...

#include <qdecorationfactory_qws.h>

Static Public Functions

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

Detailed Description

The QDecorationFactory class creates window decorations in Qt for Embedded Linux.

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

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

Qt for Embedded Linux provides three built-in decorations: Default, Styled and Windows. In addition, custom decorations can be added using Qt's How to Create Qt Plugins, i.e. by subclassing the QDecoration class and creating a mouse driver plugin (QDecorationPlugin).

See also
QDecoration, QDecorationPlugin

Definition at line 55 of file qdecorationfactory_qws.h.

Functions

◆ create()

static QDecoration* QDecorationFactory::create ( const QString )
static

◆ keys()

QStringList QDecorationFactory::keys ( )
static

Returns the list of valid keys, i.e., the available decorations.

See also
create()

Definition at line 133 of file qdecorationfactory_qws.cpp.

Referenced by qt_init().

134 {
135  QStringList list;
136 #ifndef QT_NO_QWS_DECORATION_STYLED
137  list << QLatin1String("Styled");
138 #endif
139 #ifndef QT_NO_QWS_DECORATION_DEFAULT
140  list << QLatin1String("Default");
141 #endif
142 #ifndef QT_NO_QWS_DECORATION_WINDOWS
143  list << QLatin1String("Windows");
144 #endif
145 
146 #if !defined(Q_OS_WIN32) || defined(QT_MAKEDLL)
147 #ifndef QT_NO_LIBRARY
148  QStringList plugins = loader()->keys();
149  for (int i = 0; i < plugins.size(); ++i) {
150  if (!list.contains(plugins.at(i)))
151  list += plugins.at(i);
152  }
153 #endif //QT_NO_LIBRARY
154 #endif //QT_MAKEDLL
155 
156  return list;
157 }
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: