Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QAbstractServerInterface class allows the Qt Extended Server UI to be replaced. More...
#include <QAbstractServerInterface>
Inherits QWidget.
Inherited by PhoneLauncher and PlatformServerInterface.
The QAbstractServerInterface class allows the Qt Extended Server UI to be replaced.
While it is usually easier to customize one of the existing Qt Extended server interfaces, when building a product on top of the Qt Extended system, it is sometimes desirable to replace the entire Qt Extended server user interface. Qt Extended supports replacing the server user interface through the QAbstractServerInterface class.
The Qt Extended server user interface is reponsible for direct interaction with the user. Core system services, such as telephony and application launching, are handled independently within the system and are not affected by replacing the UI. Likewise, Qt Extended APIs that require a server-side UI component, such as QSoftMenuBar, also include server side APIs, QSoftMenuBarProvider in the case of QSoftMenuBar, which allows their functionality to be maintained or adapted to the new UI model. In this way, it is relatively simple to replace the server's visual interface while maintaining a functioning and featureful Qt Extended platform.
Replacing the entire server user interface consists of three steps:
The Qt Extended server itself provides no UI outside of this implementation (with the exception of some dialogs, all of which can be disabled through the StandardDialogs class) and so the implementation must provide all aspects of the user interface.
Some helpful widget and backend classes are provided that make implementing a server UI easier. The documentation for these classes can be perused in the QtopiaServer group.
For example, if creating a new UI implementation class named TestServerInterface, the following stub code may be appropriate:
// testserverinterface.h class TestServerInterface : public QAbstractServerInterface { Q_OBJECT public: TestServerInterface(QWidget *parent = 0, Qt::WFlags flags = 0); // ... declaration ... }; // testserverinterface.cpp // ... definition ... QTOPIA_REPLACE_WIDGET(QAbstractServerInterface, TestServerInterface);
Note that QAbstractServerInterface derived type, like all that use the widget replacement mechanism, must have a standard (QWidget *, Qt::WFlags) constructor.
During startup, the Qt Extended Server uses the standard qtopiaWidget() method to acquire a server interface instance. As such, all the mechanisms available for configuring server widgets also work in configuring the server interface. In summary,
The server interface is constructed after all other Qt Extended Server tasks. The server constructs it as a toplevel, frameless widget which ignores close events. If during startup an appropriate QAbstractServerInterface implementation cannot be found, the system will run without a primary user interface.
For more details can be found in the server widget documentation.
This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.
Construct a new QAbstractServerInterface with the specified parent and widget flags.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |