| Home · All Classes · Grouped Classes · Annotated · Functions |
The BuiltinApplicationLauncher class supports launching simple applications that run inside the Qtopia Server process. More...
#include <BuiltinApplicationLauncher>
Inherits ApplicationTypeLauncher and ApplicationIpcRouter::RouteDestination.
The BuiltinApplicationLauncher class supports launching simple applications that run inside the Qtopia Server process.
The BuiltinApplicationLauncher provides a Qtopia Server Task. Qtopia Server Tasks are documented in full in the QtopiaServerApplication class documentation.
| Task Name | BuiltinApplicationLauncher |
| Interfaces | ApplicationTypeLauncher |
| Services | None |
The BuiltinApplicationLauncher class provides the ApplicationLauncherType implementation for simple applications compiled into the Qtopia Server - known as builtin applications.
A builtin application must consist of a single, toplevel widget. Generally builtins do not implement services, but they may. If multiple builtins implement the same service, or the Qtopia Server and a builtin implements the same service, the behaviour is undefined.
Adding a builtin application is a simple case of linking it into the Qtopia Server, and adding a QTOPIA_SIMPLE_BUILTIN() macro to your code. The QTOPIA_SIMPLE_BUILTIN() macro registers the builtin application with the BuiltinApplicationLauncher class. The macro takes the application name, and a simple static function that "launches" the application and returns a QWidget pointer as paramters.
Note: Builtins may not currently implement services. This functionality is planned for future versions of Qtopia.
This class is part of the Qtopia server and cannot be used by other Qtopia applications.
The BuiltinFunc provides a type definition that the static function used to create a builtin application must conform to. The exact specification is:
typdef QWidget *(*BuiltinFunc)()
Constructs a new BuiltinApplicationLauncher instance.
Destroys the BuiltinExeApplicationLauncher instance.
Add a new builtin application to the server. ApplicationName must be the name of the application and createFunc a static function, of type BuiltinApplicationLauncher::BuiltinFunc, that creates the applications. For example, the following code adds a simple builtin named "TestBuiltin" to the server.
class TestBuiltinWindow : public QWidget
{
// ...
};
static QWidget *testBuiltinFunc()
{
return new TestBuiltinWindow(0);
}
QTOPIA_SIMPLE_BUILTIN(TestBuiltin, testBultinFunc);
| Copyright © 2007 Trolltech | Trademarks | Qtopia 4.3.0 |