Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
In general, developing a Qt Extended device requires the following two processes:
The majority of this step-by-step guide refers to the Qt Extended integration process. The target audience is system integrators and ODMs intending to integrate Qt Extended with their hardware. The items in this document are ordered according to their dependencies, starting with the Linux kernel and followed by the root file system requirements, then Qt for Embedded Linux and Qt Extended requirements. Particular attention is paid to dependencies existing between Qt Extended features and Linux kernel/file system options.
Subsequent to the integration process, the Running Qt Extended section describes how to start Qt Extended on different targets/platforms.
The last section of this document focuses on the Qt Extended customization options. This guide refers to customization as the steps that are required to modify or extend the features and user interfaces provided by Qt Extended. Therefore this part of the development process is optional but usually highly desired.
Many of the features in Qt Extended are dependent on support from the underlying operating system. This section outlines the dependencies between these features and the configuration options for the Linux kernel. This list has been limited to only those configuration options explicitly required by Qt Extended. It is highly likely that additional configuration options will need to be enabled in order to bring the system up.
Many kernel features can be configured to be either built into the kernel binary or built as loadable modules. If you choose to configure kernel features as modules you must ensure that the modules are loaded during system startup. This can be achieved by either manually loading the modules or by using an automatic module loading mechanism such as hotplug or udev.
Qt Extended requires that the Linux kernel be configured with the following minimum configuration.
Kernel Feature | Qt Extended Dependency |
---|---|
System V IPC (Shared Memory and Semaphores) | Qt Extended uses System V IPC (shared memory and semaphores) to share window regions between client applications and the server. For full details on integrating this feature see Linux Framebuffer and Display Management. The Linux kernel must be configured with the following option to enable System V IPC.
|
Unix-domain Sockets | Qt Extended uses Unix-domain Sockets for Inter-process Communication (IPC) between client applications and the server. For details on the IPC mechanism used in Qt Extended See Client/Server Communication and Qt Extended IPC Layer. The Linux kernel must be configured with the following options to enable Unix-domain Sockets
|
Linux Framebuffer | Qt Extended uses the Linux Framebuffer to draw onto the screen of the device. For full details on integrating this feature see Linux Framebuffer and Display Management. The Linux kernel must be configured with the following options to enable access to the Framebuffer device
|
proc Filesystem | The proc virtual filesystem provides an interface for querying the status of and controlling certain aspect of the running system. Qt Extended uses this filesystem for managing processes, authenticating IPC communication when SXE is enabled, monitoring memory use, querying mounted filesystems, managing network interfaces, power management and querying general system information. The proc filesystem must be mounted on /proc during start-up. The Linux kernel must be configured with the following option to enable access to the proc filesystem.
|
Qt Extended includes many optional features and components that may not be needed for all devices. The following table lists these optional features and components together with the Linux kernel configuration options that they depend on.
Optional Qt Extended Component | Description |
---|---|
AT Modem | The telephony stack includes support for AT modems. These devices are typically connected via a serial interface. If the modem is connected via a different interface, you will need to enable support for that interface. For full details on modem integration see Modem Integration. The Linux kernel must be configured with the following options to enable access to an AT modem connected via a serial interface
|
Bluetooth | Qt Extended supports Bluetooth communication devices via the BlueZ API. For full details on Bluetooth integration see Bluetooth. The Linux kernel must be configured with the following options to enable Bluetooth support
Depending on how the Bluetooth device is connected other configuration options may be required. For example, to support a Bluetooth device connected via a serial interface the following addition configuration options will need to be enabled
|
Internet, VoIP | Qt Extended can use a variety of network interfaces to provide Internet connectivity. For full details on integrating Internet connectivity see Networking. As VoIP routes calls over the Internet, it has the same kernel configuration requirements as Internet connectivity. The Linux kernel must be configured with the following options to enable support for Internet connectivity
For WiFi support the following additional configuration options will also need to be enabled
Qt Extended supports Internet connectivity over GPRS. This feature requires the following additional configuration options to be enabled
Qt Extended can connect to OpenVPN based Virtual Private Networks (VPNs). This feature requires the following kernel configuration option
Qt Extended can share it's Internet connection with other devices. This feature requires the following kernel configuration option
|
SXE | Qt Extended provides a Safe Execution Environment (SXE) for running third party applications. The SXE environment currently uses the LIDS patch set to provide kernel level Mandatory Access Controls (MACs). For full details on SXE integration see SXE integration. The Linux kernel must be patched and configured with the following options to fully enable SXE functionality
|
Camera | The Camera application uses the video4linux API to access the device's camera. The Linux kernel must be configured with the following options to enable camera support
The camera device used by the Camera application is configured in the custom.h file as V4L_VIDEO_DEVICE. |
Infrared | Qt Extended supports Infrared devices. The Linux kernel must be configured with the following options to enable Infrared support
|
Multimedia Cards | Qt Extended supports multimedia cards. The most common filesystems used on these devices are FAT or FAT32, although these are not the only possibility. For maximum compatibility it is recommended that the Linux kernel be configured with the following options to enable support for multimedia cards
|
Audio Playback and Recording | Qt Extended Extended can be configured to process sound either with or without the Media Server integration. For details on Media Server integration is see Media integration. The Linux kernel provides two sets of sound drivers, the Open Sound System (OSS) and the Advanced Linux Sound Architecture (ALSA). Qt Extended supports both sets of drivers when built without Media Server integration. Generally only one set of drivers will be used at a time. Check the documentation on the Media Server for it's requirements if Media Server integration is being used. The Linux kernel must be configured with the following options to enable OSS based audio playback and recording
Alternatively the Linux kernel must be configured with the following options to enable ALSA based audio playback and recording
|
USB Gadgets | Qt Extended can manage what class of USB device your device appears as when connected to a PC. For details on USB integration see USB. The Linux kernel must be configured with the following options to enable USB Gadget support
and one or more of the following gadget drivers
|
There are a number of Linux kernel features which are generally not desirable on a production device, but may be useful during development. This section lists these options and gives examples on how to use them during development.
Useful Development Options | Description |
---|---|
NFS Filesystem Support | Enabling NFS support allows you to mount remote NFS shares onto your device. NFS shares can be used as an alternative method of accessing the Qt Extended image on your device, instead of reflashing the device. Note: The runtime performance of Qt Extended may be degraded when running over NFS. This is caused by delays in transferring data over the network interface. To enable NFS support configure the Linux kernel with the following options enabled
To run Qt Extended over NFS you will first need to export the Qt Extended image directory to your device. Please consult the documentation for your development system on how to achieve this. On a Linux system, the following command can be used to export the Qt Extended image directory to your device. You should replace $DEVICE_ADDRESS and $PATH_TO_IMAGE with the IP address of your device and the absolute path to the Qt Extended image directory you want to export. exportfs -o rw,no_root_squash,async $DEVICE_ADDRESS:$PATH_TO_IMAGE To mount the exported Qt Extended image on your device run the following command on your device, replacing $SERVER_ADDRESS with the IP address of the development system that is exporting the Qt Extended image and $PATH_TO_IMAGE with the same absolute path you used above. If you have configured Qt Extended with a different runtime prefix you will need to replace /opt/Qt Extended with that prefix. mount -t nfs -o nolock,tcp $SERVER_ADDRESS:$PATH_TO_IMAGE /opt/Qtopia Finally you can run Qt Extended over NFS by setting up the environment variables as you normally would and running /opt/Qtopia/bin/qpe. For more details on running Qt Extended via NFS see Running Qt Extended using NFS |
A typical Linux device's root file system hierarchy would be arranged as follows:
Directory | Usage |
---|---|
/bin | command binaries |
/boot | bootloader files |
/dev | device files |
/etc | system configuration files |
/lib | system libraries and kernel modules |
/media | mount point for removable media |
/mnt | mount point for mounting temporary file systems |
/opt | add-on software packages |
/proc | stub directory for kernel processes. |
/sbin | system binary commands |
/tmp | temporary files |
/usr | secondary hierarchy |
/var | variable data |
More information is available on the Linux filesystem at Filesystem Hierarchy Standard
Qt Extended has it's own file system hierarchy, which is usually mounted at /opt/Qtopia. For more details see the Qt Extended File System Standards.
Directory | Usage |
---|---|
/bin | Qt Extended binaries. |
/etc | Qt Extended system configuration files. |
/help | Qt Extended html help documentation. |
/i18n | Qt Extended translation files. |
/lib | Qt Extended library files. |
/pics | Qt Extended images and icons. |
/plugins | Qt Extended plugins |
/qt_plugins | Qt for Embedded Linux plugins. |
/services | Qt Extended service task directory |
/sounds | Qt Extended sound files. |
There are a number of ways a device may be partitioned, depending on the hardware configuration.
Generally, the bootloader, the kernel and at the root filesystem get their own partitions. The root fileystem can also be partitioned into /, /tmp and /home.
Note: If allowing the user to download and install software packages, you will need the /tmp directory or partiton to be large enough to temporarily store any downloaded application package files.
Qt Extended can run on and use a number of file systems. Some are more appropriate for NAND flash devices while others are better for more traditional hard drive devices.
File System Type | Comments |
---|---|
ext2 | general read/write. no journaling. not recommended for NAND devices. |
ext3 | general read/write. journalled ext2. not recommended for NAND devices. |
cramfs | read only compressed |
squashfs | read only compressed. requires kernel patches. See squashfs web site |
jffs2 | read/write, compressed, journalled, NAND device only. |
yaffs | read/write, compressed, journalled, NAND device only. kernel patches required. See yaffs web site |
ramfs or tmpfs | read/write, dynamic size allocation (in RAM), for temporary files. |
Qt Extended may be installed to a read-only filesystem, provided a writable /tmp, /etc and $HOME is provided.
Busybox is a compact and powerful replacement for many common Linux(tm) utilities in a single executable, and is extremely configurable.
Qt Extended uses a few system commands that are required to be on the filesystem.
command | Qt Extended Components | Busybox config | Notes |
---|---|---|---|
ash | Startup/script | Shells CONFIG_ASH, need bash symlink | |
apm | systemsuspendtask | ||
hwclock | qalarmserver | Linux System Utilities CONFIG_HWCLOCK | |
logread | Logging viewer | System Logging Utilities CONFIG_LOGREAD | |
syslogd | Logging viewer | System Logging Utilities CONFIG_SYSLOGD | |
echo | oommanager | Shells CONFIG_ASH_BUILTIN_ECHO | Qt Extended version 4.3 |
cp | systemtime | Coreutils CONFIG_CP | |
rm | packagemanager, obexservicemanager | Coreutils CONFIG_RM | |
mkdir | obexservicemanager | Coreutils CONFIG_MKDIR | |
modprobe | USB peripheral support | Linux Module Utilities CONFIG_MODPROBE | Qt Extended version 4.4 |
rmmod | USB peripheral support | Linux Modules Utilities CONFIG_RMMOD | Qt Extended version 4.4 |
A very minimal Linux System configuration might consist of these packages:
Package | Minimum Version | Description | Notes |
---|---|---|---|
binutils | Base system binary utilities | ||
glibc | Essential C library | ||
glibc-linuxthreads | Multi-threading capability | ||
linux kernel | 2.4.19 (recommend 2.6.20) | Linux kernel | |
busybox | 1.2.1 | system commands. See Busybox | |
libstdc++ | |||
libgcc_s | |||
e2fsprogs | file system tools | ||
libasound | Alsa sound support | ||
patch | patching tool | compile time requirement only | |
libreadline | |||
perl | compile time requirement only | ||
libsvg | parser for SVG content | ||
libxslt | XSLT C library |
In addition to the Minimal Linux System Configuration, these optional packages may be provided, or required based upon the Qt Extended Components used.
Qt Extended Component | Package |
---|---|
Bluetooth |
|
Camera |
|
DBus |
|
Image Viewer |
|
Irda | |
Media Player |
|
Messages |
|
PIM |
|
SXE |
|
Telephony (Googletalk) |
|
Touchscreen |
|
Wireless Networking |
|
These packages may be installed on the target device.
Package | Minimum Version | Description | Qt Extended Component | Notes |
---|---|---|---|---|
ALSA | Advanced Linux Sound Architecture | Media Player | ||
D-Bus | 1.0.2 | Message Bus system / Inter process communication D-Bus | dbus | |
DHCP | DHCP server | Networking | ||
Helix | Helix Multimedia Engine | Media Player | Helix Integration | |
OpenObex | Object Exchange protocol | bluetooth, Irda | ||
PPP | Point to Point Protocol | Networking | ||
TSLib | 1.0 | Touchscreen Library | TSLib plugin | Mouse Pointer Handling |
WAP | Integrator-provided component | MMS | ||
bluez-firmware | 1.2 | bluez firmware utilities | Bluetooth | |
bluez-hcidump | 1.34 | bluez | Bluetooth | |
bluez-libs | 3.9 | bluez library | Bluetooth | |
bluez-utils | 3.9 | bluez utilities | Bluetooth | |
dosfstools | utilities for DOS file systems | |||
dropbear | ssh service and client | |||
expat | XML Parser | Bluetooth | ||
e2fsprogs | Utilities for ext2 file systems | |||
LIDS | 1.2.2 | Linux Intrusion Detection System | Safe Execution Environment - SXE | |
libungif | GIF library | |||
pcmcia | PCMCIA utilities | |||
sqlite | SQLite database | PIM, Messaging | Provided by Qt for Embedded Linux | |
sysvinit | sysvinit project System initialization | busybox also provides a simple init without runlevels | ||
udev | Kernel device manager | Udev web site | ||
v4l | Video For Linux | camera | ||
wireless_tools | 0.28 | wireless utilities | wireless networking Wireless Tools | |
wpa_supplicant | 0.4.9 | WPA\WPA2 Authentication | wireless networking | |
zoneinfo | Time Zone Data | WorldTime, Date/Time | Time on an Embedded Device |
Other tools you may want to provide for development or general use.
Package | Provides | Qt Extended Component | Notes |
---|---|---|---|
libelf | Linux file system tools | ||
dosfstools | DOS file system tools | ||
libungif | gif library | ||
zlib | File Compression Utility | Package Manager | Provided by Qt for Embedded Linux |
libjpeg | JPEG image library | Provided by Qt for Embedded Linux | |
OpenSSH | OpenSSH | developer tool | |
telnet | Telnet Terminal Services | developer tool | |
ftp | File Transfer Protocol | developer tool | |
tar | Archive Utility | developer tool | |
freetype | Font Library | Provided by Qt for Embedded Linux Fonts | |
libmng | PNG animation library | Provided by Qt for Embedded Linux | |
libpng | Provided by Qt for Embedded Linux | ||
md5 | Provided by Qt for Embedded Linux | ||
gdb server | Remote debugging utility | Remote Debugging | |
prelink | Binary optimization | Prelink Tutorial |
The compiler requirements are mentioned in the build prerequisites.
There are a number of commercial companies and GPL projects that can provide an Embedded Linux distribution.
To build a cross toolchain yourself:
The Qt Extended build system has its own reference documentation which provides function and variable descriptions for the various parts of the build system. This section of the integration guide will reference various parts of it as well as additional example documentation.
Before Qt Extended can be built various prerequisites and dependencies have to be satisfied. Most of these dependencies are related to the Linux system and root filesystem that Qt Extended is running on. The first part of this guide explicitly states those mandatory and optional requirements. Additional information, such as supported compilers, can be found in the Dependencies and Prerequisites documentation.
Qt Extended can be built in multiple ways. In general, the build system distinguishes several ways of building a Qt Extended application. They are directly related to launch methods and footprint optimizations provided by Qt Extended.
Build type | description |
---|---|
Normal | Every application is compiled into a binary that is executed by the Qt Extended Server. |
Quicklauncher | This is the default mode for Qt Extended. It improves the application startup time by using a stub application to preload libraries and construct classes that are common to all Qt Extended applications in the background before an application is started. A quicklaunch enabled application is built as a plugin that is loaded by the stub application. |
Singleexec Mode | The Qt Extended Server and all applications are linked together in a single large binary. A single binary is smaller in size than many separate application binaries and launch times are decreased because libraries are statically linked together with applications. The disadvantages are reduced flexibility when updating libraries and applications on already deployed devices, and the inability of user-installed applications to dynamically link against the Qt Extended libraries. |
Note that the various options provided in the above table can be combined. A detailed overview of the possible options are provided by the Qt Extended configure script.
The configure options allow the enabling/disabling of Qt Extended modules. Some modules are not required for every conceivable target device and may be disabled to reduce filesystem and memory use. Module selction can be done via configure's -modules flag.
./configure -devices xyz -modules ipcomms
The above example assumes that the target build for device xyz requires support for a VoIP features only. Therefore the required modules are the Base and IpComms module. The Base module is required for all Qt Extended builds and is implicitly selected by all build configurations. The next example demonstrates how to select multiple module at the same time:
./configure -devices xyz -modules ipcomms,cell,location
More information about the module concept can be found in the Qt Extended Modules documentation.
In addition to the modules flag Qt Extended maintains two sets of configure options. The first set is related to the Qt Extended configure script and the second set is related to Qt's configure script.
Note that Qt config options are actually passed to Qt Extended via the -extra-qtopiacore-config option provided by the Qt Extended configure script.
In addition to the removal of Qt Extended features, applications can be removed and added to a Qt Extended build. The Qt Extended project files list each individual project that is part of the build and hence enables the developer to choose among provided libraries, plug-ins and applications. This level of customization is also available via device profiles. This enables an even better level of customization but has the disadvantage that project dependencies may have to be resolved manually.
As an example the greenphone profile adds and removes the following projects to/from the build process:
PROJECTS*=\ 3rdparty/tools/atd\ 3rdparty/applications/target_sqlite\ settings/startupflags\ tools/phonebounce PROJECTS-=\ settings/beaming THEMES-=finxi
As already mentioned earlier in this guide device profiles provide a convenient way of bundling device-specific code and configurations. This removes the need for code customizations within in the main Qt Extended source tree. Device Profiles may be provided by hardware manufactures and/or with Qt Extended as separate packages that can easily be integrated into a Qt Extended source package. Device profiles can be found in $QTOPIA_DEPOT_PATH/devices, are entirely independent of the main Qt Extended source tree and are easily enabled via the build system.
The following example configures, compiles and installs the Greephone device profile which is located in $QTOPIA_DEPOT_PATH/devices/greenphone:
cd $QPEDIR $QTOPIA_DEPOT_PATH/configure -device greenphone bin/qbuild bin/qbuild image
The build system will use the configure options stored in QTOPIA_DEPOT_PATH/devices/greenphone/configure to build Qt Extended for the Greenphone. Note that even cross-compiling is handled by device profiles.
The device plugin tutorial may be of interest as well because it demonstrates how a new profile is created using the requirement for a device plugin, such as a keyboard plugin, as an example.
The Qt Extended build system has a separate documentation index. Its main aim is to explain the various project file functions, variables and how they interact with the configure script. Supplemental overviews and tutorials introduce common tasks which may occur during the Qt Extended development process.
Qt for Embedded Linux allows the fine-tuning of library content via the qconfig tool. QConfig provides a visual user interface that enables a convenient way of customizing library content. It presents a short description of particular features, can enable/disable them and resolves dependencies among these features. This allows the adjustment of Qt for Embedded Linux library sizes as needed. Qt Extended uses a default configuration provided by QPEDIR/qtopiacore/qconfig-qpe.h which may be used as a starting point for further customization. Please note that the qconfig system can only be used to customize Qt for Embedded Linux libraries and not Qt Extended libraries.
qconfig-qpe.h excludes the following Qt components from a standard Qt Extended build:
#define | Description |
---|---|
QT_NO_STL | standard template library compatibility |
QT_NO_COLORDIALOG | removes QColorDialog |
QT_NO_ERRORMESSAGE | removes QErrorMessage |
QT_NO_FILEDIALOG | removes QFileDialog |
QT_NO_INPUTDIALOG | removes QInputDialog |
QT_NO_PROGRESSDIALOG | removes QProgressDialog |
QT_NO_TABDIALOG | removes Q3TabDialog |
QT_NO_IMAGEFORMAT_PPM | removes support for PPM images |
QT_NO_IMAGE_HEURISTIC_MASK | removes support for 1-bpp heuristic mask (see QImage::createHeuristicMask() ) |
QT_NO_IMAGE_TEXT | removes support for image file text strings |
QT_NO_BIG_CODECS | no support for big codecs e.g., CJK (should be added via plug-ins when necessary) |
QT_NO_CODECS | no support for non-unicode text conversions |
QT_NO_DIRMODEL | no data model support for the local filesystem (see QDirModel) |
QT_NO_CURSOR | no mouse cursor support (see QCursor) |
QT_NO_DRAGANDDROP | removes drag and drop mechanisms |
QT_NO_EFFECTS | removes special widget effects (e.g., fading and scrolling) |
QT_NO_SESSIONMANAGER | removes support for session management |
QT_NO_NETWORKPROXY | removes network layer proxy support (see QNetworkProxy) |
QT_NO_SOCKS5 | removes SOCKS v5 network proxy support (depends on QT_NO_NETWORKPROXY) |
QT_NO_COLORNAMES | removes colar names such as "red", which are used by QColor |
QT_NO_QWS_ALPHA_CURSOR | removes support for alpha-blended cursors |
QT_NO_QWS_CURSOR | removes support for visible cursors (depends on QT_NO_CURSOR) |
QT_NO_QWS_DECORATION_WINDOWS | no support for "Windows" style decorations of top level windows |
QT_NO_QWS_MOUSE | removes mouse driver support |
QT_NO_QWS_MOUSE_AUTO | removes support for auto-detected mouse drivers |
QT_NO_QWS_MOUSE_MANUAL | removes support for non-autodetected mouse drivers |
QT_NO_STYLE_MOTIF | removes support for Motif look and feel (see QMotifStyle) |
QT_NO_STYLE_CDE | removes support for CDE look and feel (depends in QT_NO_STYLE_MOTIF) |
QT_NO_STYLE_PLASTIQUE | removes support for widget style similar to the Plastik style available in KDE (see QPlastiqueStyle) |
QT_NO_STYLE_WINDOWSXP | removes support for Microsoft WindowsXP look and feel (see QWindowsXPStyle) |
QT_NO_CONTEXTMENU | removes support for pop-up menus on right mouse click |
QT_NO_DOCKWIDGET | removes support for docking widgets inside a QMainWindow or floated as a top-level window (see QDockWidget) |
QT_NO_WORKSPACE | removes QWorkSpace |
QT_NO_SPLITTER | removes QSplitter |
QT_NO_SIZEGRIP | removes QSizeGrip |
QT_NO_DIAL | removes QDial |
QT_NO_SYNTAXHIGHLIGHTER | removes QSyntaxHighlighter |
QT_NO_STATUSBAR | removes QStatusBar |
QT_NO_STATUSTIP | removes support for status tip functionality and events |
QT_NO_TOOLBOX | removes QToolBox |
QT_NO_TOOLTIP | removes QToolTip |
The term porting is used to describe two similar processes. The first use of the term is in the context of modifying Qt for Embedded Linux to support a new hardware platform or operating system. In this case the statements "Porting Qt for Embedded Linux to a new Architecture" and "Porting Qt for Embedded Linux to another Operating System" refer to the process of adding the necessary platform dependent code to Qt for Embedded Linux to support the target hardware platform and operating system. The second use refers to the process of changing application code, for an existing application, to work with a newer version of the Qt Extended API.
Porting Qt for Embedded Linux to a new Architecture involves implementing device drivers for keypad input pointer input, and screen output. You must also ensure that platform dependent atomic operations are provided. These topics are covered in the Porting Qt for Embedded Linux to a New Architecture document.
Porting Qt for Embedded Linux to another Operating System involves replacing all Linux specific system calls used in Qt for Embedded Linux with equivalents available on the new Operating System. Porting Qt for Embedded Linux to Another Operating System documents the Linux specific system calls that are currently used and what they are used for.
Existing Qt 4 applications should require no porting provided there is no platform dependent code. If platform dependent code is used, Porting Qt Applications to Qt for Embedded Linux provides information on how to manage platform dependent code within your application.
Porting applications from Qtopia 2.x to Qtopia / Qt Extended 4.x primarily involves making changes related to changes in the Qt API. Qt Extended does not support the Qt 3 Support module, so the task of porting from Qtopia 2 to Qtopia / Qt Extended 4 takes more work than porting from Qt 2 to Qt 4. An overview on the planned incompatibilities between Qtopia / Qt Extended versions and instructions on how to update your code to the new API is described in the Porting Between Qtopia/Qt Extended Versions document.
For Qtopia Qt Extended 4 applications it is no longer recommended that the main() function be written explicitly by the programmer. Instead macros are used to declare the application entry point. These macros are designed so that your application can be built for different configurations (such as singleexec, quicklaunch and standard builds) without requiring any code changes. For details on declaring the entry point for your application see Applications.
Qt Extended for Embedded Linux provides screen drivers for the Linux Framebuffer, virtual framebuffer, transformed screens, VNC servers and multiple screens. Qt for Embedded Linux's default behavior is for each client application to render its contents into an off-screen buffer. The Qt Extended Server process copies the memory contents onto the screen. For an overview of this process see Graphics Rendering and Drawing on Screen.
The virtual framebuffer and VNC server drivers are used predominantly during development. When Qt is deployed on a device the Linux framebuffer, transformed screens or multi-screen drivers are typically used. The screen driver that Qt Extended uses is specified in the QWS_DISPLAY environment variable. Refer to Qt for Embedded Linux Display Management for documentation on building screen drivers and how to specify which screen driver Qt Extended should use.
Most devices will use the Linux Framebuffer driver. The Qt for Embedded Linux document Testing the Linux Framebuffer includes a small test program that can be used to verify that the Linux Framebuffer is configured and works correctly.
Qt Extended includes support for multiple screens and accelerated graphics drivers. For documentation on integrating these features refer to Multiple Screen Support and Accelerated Graphics Driver.
Qt for Embedded Linux uses the FreeType 2 font engine to render fonts. In addition Qt for Embedded Linux also supports native prerendered fonts (QPF2) and legacy prerendered fonts (QPF). For full details on the font formats supported by Qt for Embedded Linux see Qt for Embedded Linux Fonts.
Qt for Embedded Linux ships with several fonts. The licensing terms for these fonts are described in Licenses for Fonts Used in Qt for Embedded Linux.
Qt Extended selects the font size based on the size and resolution of the target display. Please refer to Setting the Display Size which demonstrates how the actual font size is calculated.
Qt Extended keyboard handling is controlled by Qt for Embedded Linux. There are a few default keyboard drivers available: tty usb sl5000 yopy vr41xx qvfb
A custom keyboard driver may be implemented through the Device Configuration Profiles, and documentation can be found for the class QWSKeyboardHandler.
Keyboard driver | Source | Description |
---|---|---|
tty | $QPEDIR/qtopiacore/qt/src/gui/embedded/qkbdtty_qws.cpp | Standard tty keyboard |
usb | $QPEDIR/qtopiacore/qt/src/gui/embedded/qkbdusb_qws.cpp | Standard USB keyboard |
sl5000 | $QPEDIR/qtopiacore/qt/src/gui/embedded/qkbdsl5000_qws.cpp | Keyboard specific to the Sharp Zaurus 5500 |
yopy | $QPEDIR/qtopiacore/qt/src/gui/embedded/qkbdyopy_qws.cpp | Keyboard specific to the Yopy |
vr41xx | $QPEDIR/qtopiacore/qt/src/gui/embedded/qkbdvr41xx_qws.cpp | Keyboard specific for the NEC Vr41XX device. |
qvfb | $QPEDIR/qtopiacore/qt/src/gui/embedded/qkbdvfb_qws.cpp | Keyboard specific for Qvfb |
More information about Keyboard Plugins:
In Qt for Embedded Linux, there are built-in Mouse Pointer (touchscreen) Plugins. If none of these work, a Device Configuration may include a custom mouse pointer plugin.
Driver | Source | Description |
---|---|---|
pc | $QPEDIR/qtopiacore/qt/src/gui/embedded/qmousepc_qws.cpp | Standard pc mouse |
bus | $QPEDIR/qtopiacore/qt/src/gui/embedded/qmousebus_qws.cpp | Standard bus mouse |
linuxtp | $QPEDIR/qtopiacore/qt/src/gui/embedded/qmouselinuxtp_qws.cpp | Standard Linux Touchscreen |
yopy | $QPEDIR/qtopiacore/qt/src/gui/embedded/qmouseyopy_qws.cpp | Yopy device |
vr41xx | $QPEDIR/qtopiacore/qt/src/gui/embedded/qmousevr41xx_qws.cpp | vr41 device |
tslib | $QPEDIR/qtopiacore/qt/src/gui/embedded/qmousetslib_qws.cpp | Use libts for touchscreen events. |
qvfb | $QPEDIR/qtopiacore/qt/src/gui/embedded/qmousevfb_qws.cpp | Mouse pointer for QVFb |
More information about Mouse Pointer plug-ins:
The display performance can be enhanced by the use of a hardware graphics accelerator.
More information about Accelerated Graphics Drivers in Qt for Embedded Linux:
Qt Extended makes use of a few environment variables. These are usually set by the startup script.
#!/bin/sh export QWS_DISPLAY=LinuxFb:mmWidth34:mmHeight44:0 /opt/Qtopia/bin/qpe
They can also be set from the defaultbuttons.conf file.
[Environment] QWS_DISPLAY=LinuxFb:mmWidth34:mmHeight44:0
Note that variables set in defaultbuttons.conf do not override variables set in the environment before running Qt Extended.
More Information on most Qt for Embedded Linux Environmental Variables:
In addition to the Qt for Embedded Linux specific environment variables mentioned above the following standard variables may be required:
Variable | Description |
---|---|
LANG | Specifies the language and codeset to be used by Qt for Embedded Linux. If problems with missing or wrong text codecs are occuring this variable should be checked. The format for this variable is:<language>_<country>.<codeset> A valid example would be en_GB.utf8 (British English w/ UTF8 codeset). The codeset must always be set to utf8 for Qt Extended. Refer to the Internationalization section for more details on language and translation specifc information. |
Services are a standardized way of accessing functionality supplied by other applications. Any application can utilize these services via the QtopiaService* classes. Messages between applications are delivered via Qt Extended IPC.
Qt Extended services are documented in the service documentation. It explains what services are provided by Qt Extended, how they can be accessed and the steps required to add new services. The various meta-information describing a service can be found in $QPEDIR/services and each service is documented like any other Qt Extended class (see the ClockService as an example).
Qt Extended supports multiple screens. A possible use case for such a situation might be a clamshell phone which has a small status display on the outside and a larger display on the inside. The Dual Screen guide describes the necessary setup steps for dual display development and how any application can display a widget on the secondary display. Support for more than two displays can be achieved with similar steps.
Qt Extended provides an integrated and themeable secondary display via the server widget classes QAbstractSecondaryDisplay and ThemedSecondaryDisplay. More details can be found in the Server widgets part of this guide.
The Qt Extended Server needs to launch processes during startup but it also needs to do it's own initializing which can cause the processes to die. This happens because of a 5 second timeout, QWS clients wait only 5 seconds for the server to respond after connecting to it's socket.
To avoid this problem the server sets the QWS_CONNECTION_TIMEOUT variable to 30, extending the timeout to 30 seconds. This value was chosen after testing on the Greenphone. It can be overriden by setting the variable (see Qt Extended Environment Variables for how to do this).
The Qt Extended Server application is structured as a collection of server tasks. Ideally each task would perform a small, well-defined portion of work or functionality. Server tasks allow ODMs to easily customize Qt Extended by extending, replacing and removing tasks from the Qt Extended Server application with little or no changes required to the Qt Extended Server source code. This is achieved by using device profiles and the $QPEDIR/etc/Tasks.cfg configuration file. For information about particular server tasks refer to the server task class documentation.
In most cases Qt Extended Server tasks are implemented as QObject derived classes. An exception to this are functional tasks, which are implemented as static functions. The developer uses QTOPIA_TASK() and QTOPIA_STATIC_TASK() macros to declare server tasks. For full details see the QtopiaServerApplication documentation. The following example demonstrates how to implement a server task. First the class is declared in the header file
// exampleservertask.h
#include <QObject>
class ExampleServerTask : public QObject
{
public:
ExampleServerTask();
};
Then the class is implemented and registered with the task system in the implementation file
#include "exampleservertask.h" ExampleServerTask::ExampleServerTask() { ... } QTOPIA_TASK(ExampleServerTask, ExampleServerTask);
New server tasks are added by placing the source code for the server tasks into the server/ directory of the configured device profile. The Qt Extended Build System automatically includes source files in this directory into the Qt Extended Server application.
Existing server tasks can be extended to provide additional functionality or to implement device specific code by creating subclasses of the existing server tasks. Source code for these classes should be stored in the server/ directory of the configured device profile.
Removing server tasks can be achieved by adding task names to the exclude group of the $QPEDIR/etc/Tasks.cfg configuration file.
This mechanism enables the Qt Extended Server to add new task to the system without having to recompile the server. This is particularly useful for patching of already deployed systems. More information about server task plug-ins can be found in the Server task plug-in tutorial.
The startup process of the Qt Extended Server Application is defined by the order that tasks are listed in the Tasks.cfg configuration file. Tasks.cfg supports the definition of task groups which can be used to collect related tasks together. Except for a few reserved task group names, group names can be any alphanumeric string. For details on the format of the Tasks.cfg configuration file refer to Qt Extended Server Tasks.
Qt Extended supports two types of tasks: preemptive tasks and on-demand tasks. Preemptive tasks are started during the startup process as defined in the Tasks.cfg configuration file. On-demand tasks are configured as such by marking tasks to be started on demand in the Tasks.cfg configuration file. Only tasks in the reserved prestartup, startup and idle groups are preemptively started by Qt Extended.
Some server tasks provide essential functionality and their startup order must be well defined. Two such tasks are the QtopiaApplication server task (implemented in the QtopiaServerApplication class) and the QtopiaServerApplicationLauncher tasks. The startup order of the QtopiaApplication server task must be configured correctly as many other server tasks have an implicit dependency on it. This requirement is documented as part of the Tasks Startup Order. Typically Qt Extended is configured to start the QtopiaApplication task from the prestartup group. To achieve this Tasks.cfg should contain a prestartup group with contents similar to
[prestartup] EnvironmentSetup DBMigrate QtopiaApplication IpcRouter
QtopiaServerApplicationLauncher is part of the application launcher framework. It functions as a proxy for the Qt Extended Server within the application launcher framework. To ensure correct behavior it is essential that the QtopiaServerApplicationLauncher task is the first task with the ApplicationTypeLauncher interface that is started. The startup sequence of the application framework is typically configured by including something similar to the following in the Tasks.cfg configuration file:
... [ApplicationLauncher] ApplicationMonitor ApplicationLauncher QtopiaServerApplicationLauncher BuiltinApplicationLauncher ConsoleApplicationLauncher QuickExeApplicationLauncher QuickForkedApplicationLauncher SandboxedExeApplicationLauncher SimpleExeApplicationLauncher [startup] +ApplicationLauncher ...
Some tasks cannot be set as on-demand tasks, but can have their construction delayed until after the user interface is shown. This is accomplished by putting the task in the idle group. Tasks in this group will be started shortly after the UI is displayed, but their construction will be delayed if the user starts interacting with the device (for example, making calls).
Good candidates for this task group are tasks which provide services in the background with no user-visible component. For example, a task providing a Bluetooth dialup service can be placed in the idle group by adding the following to Tasks.cfg:
... [idle] BtDialupServiceTask ...
In some cases, launch time of the Qt Extended Server can be improved by placing the All task in the idle group and manually specifying any tasks in startup which must be launched before the user interface is shown.
Qt Extended uses the official Linux Bluetooth stack, BlueZ, for Bluetooth support. The Bluetooth Support document covers the third party requirements and describes the Bluetooth functionality supported by Qt Extended.
The Bluetooth Service Management Framework enables Bluetooth services to be handled consistently within Qt Extended.
Qt Extended supports the following Bluetooth connection sockets
Qt Extended includes implementations of the following Bluetooth services.
For documentation on creating additional Bluetooth services, refer to Creating a custom Bluetooth service.
Qt Extended requires Linux kernel and additional third party software to support Bluetooth. Bluetooth Kernel Configuration describes the necessary Linux kernel configuration. Optional Linux Configuration lists the required third party packages.
Qt Extended uses network plug-ins to enable new types of network bearer. At present the following network types are supported:
network type | related plug-in |
---|---|
Local Area Network (LAN) | QPEDIR/src/plugins/network/lan |
Wireless Local Area Network (WLAN) | QPEDIR/src/plugins/network/lan |
Dial-up via analog modem, GPRS or UMTS | QPEDIR/src/plugins/network/dialing |
Bluetooth Dial-up Networking (DUN) | QPEDIR/src/plugins/network/bluetooth |
Bluetooth Personal Area Networking (PAN) | planned for future relases of Qt Extended |
In general each plug-in provides three components. The GUI component allows the user to configure each network connection via the Settings -> Internet application or any other application that wants to do so. The second component initiates and publishes state changes such as the starting/stopping of the physical network device and the change of routes. The third part is a network script that abstracts the OS/distribution specific network interface configuration from Qt Extended. This is done via shell scripts.
Due to the different types of supported network interfaces, the script interfaces are different for each plug-in. It is required to implement these scripts as part of the integration process. To ease the initial development process all plug-in's ship with sample scripts demonstrating the expected functionality. The (W)LAN plug-in for example provides a SuSE 9.3 and a busybox implementation. They may be used as a starting point for the integration process. The exact script parameters and configuration file formats are described in the Network Services documentation.
If it is necessary to support a network bearer that is not yet supported by Qt Extended, new plug-ins can be added by implementing the abstract QtopiaNetworkPlugin and QtopiaNetworkInterface interfaces. An overview of network related classes and how they interact with each other can be found in the QNetworkDevice class documentation.
Qt Extended does not provide any specific USB host functionality. Outlined below is information that may be helpful in supporting hotplugged USB devices.
Depending on the connected peripheral device you will may need to provide addition configuration. For example
Qt Extended includes support for selecting the class of USB peripheral device your device appears as when connected to a PC. If your device will only ever operate as a single USB device class you will not need to enable USB Peripheral support in Qt Extended. This support is based on the standard USB Gadget subsystem in Linux 2.6. You may override this functionality to support a 3rd party USB Gadget stack by creating custom USB gadget provider classes. See QUsbGadget, QUsbEthernetGadget, QUsbSerialGadget, QUsbStorageGadget, QUsbManager. If support for additional device classes is added, UsbGadgetTask server task should be extended as well.
For an example implementation of a 3rd party USB Gadget stack see Supporting alternative USB Gadget Stacks.
There is no standard way of querying the connection status of the USB cable. The system integrator should ensure that the Value Space key /Hardware/UsbGadget/cableConnected is set to true when the USB cable is connected to the device and false otherwise. See QValueSpaceObject for details on how to add entries to the Value Space.
Configuration settings for the USB gadget framework is in the Usb.conf configuration file. The default configuration file is set up to use the dummy_hcd virtual USB peripheral controller. The dummy_hcd peripheral controller can be used for testing USB peripheral functionality when real peripheral hardware is not available. To configure Qt Extended to work with your device you will need to
Qt Extended does not provide any specific USB On-the-Go (OTG) functionality. Outlined below is information that may be helpful in integrating USB OTG support with Qt Extended.
OTG functionality is handled within the Linux kernel. During Host Negotiation Protocol (HNP) the Linux kernel will check the connected device against a whitelist specified in linux/drivers/usb/core/otg_whitelist.h. The whitelist in this file should be modified to include only the devices that have been tested with your device.
If your device assumes A-role (host) you may need to implement some of the suggestions outlined in the USB Host section above.
If your device assumes B-role (peripheral) the USB Peripheral configuration is used.
Qt Extended has support for dynamically changing the display orientation, and can be rotated in 90, 180, 270 degrees.
To use dynamic rotation, an integrator must:
-extra-qtopiacore-config -qt-gfx-transformed
* as plugin driver, update the devices/<device>/configure file:
-extra-qtopiacore-config -plugin-gfx-transformed
-dynamic-rotation
argument to the devices/<device>/configure file to enable rotation and build the RotationManager and rotation settings application.
Further documentation can be found in Rotation
Qt Extended has a robust Document and Content system to enable the user to easily find documents and content.
Documents in Qt Extended are usually stored in the user's $HOME directory under the Documents directory, in a tree as such: /<file type>/<mine type>/<file name>.
For example, if a user creates a voice note, the resulting file gets stored in $HOME/Documents/audio/x-wav/June_5_2007_333_AM.wav
The content system categorizes the file and stores its location in the database. The user can then access their files from the Documents menu in the launcher.
A Storage.conf file can be supplied detailing alternate locations for documents.
Section | Key | Description |
---|---|---|
MountTable |
|
|
Packages |
|
|
HOME |
|
|
MountPoint0 |
|
|
Qt Extended is able to handle Digital Rights Management. See Document System: DRM for general details on how the document system handles DRM protected files and refer to DRM Agent Integration if more information on integrating a particular drm agent is required.
Qt Extended performs adequately with 64 MB of RAM. However the best value may depend on the actual device and most importantly the size of the display. A significant proportion of memory is used for the shared pixmap cache. More details on how to influence the size of the pixmap cache can be found in the Managing Memory Usage documentation.
If it is necessary to debug various memory related problems, profiling tools like valgrind and gprof should be used to determine potential bottlenecks. The Qt Extended documentation provides a quick introduction (using valgrind as an example) to how memory related performance issues might be detected.
Qtopia 4.3 introduces the concept of an Out-Of-Memory (OOM) management. The Qt Extended management system consists of four parts:
Together these four components are responsible for the avoidance of OOM situation and if it should become necessary for the detection of immanent problems and the subsequent handling of these situations. The Memory Monitor and the Low Memory Handler can be customized by subclassing/replacing certain Qt Extended Server interface/tasks. The various management classes are part of the Qt Extended Server.
Devices such as Mobile Phones often have indication lights, for things such as charging status, or new email indicators. The QDeviceIndicators class may be used to control an arbitrary number of LED's on the device.
The Qt Extended Hardware Abstraction is used to access hardware devices from Qt Extended applications. A hardware abstraction provides a standard method of querying available devices and a standard interface for accessing those devices. Currently the Qt Extended Hardware Abstraction defines hardware interfaces for the following devices
The system integrator adds device-specific code for their device by creating a new abstraction class that inherits from one of the abstraction provider classes and overrides the member functions with device-specific implementations. Alternatively the abstraction provider classes can be instantiated directly, connecting the appropriate signals and slots to provide the necessary device-specific functionality.
Hardware interfaces are made available to the system when an abstraction provider object is instantiated. Typically this is done during system startup from a server task.
Boot source abstractions are used to query the event that triggered the last boot sequence. Typically a device has only a single boot source abstraction. For documentation on how to implement a boot source abstraction see QBootSourceAccessoryProvider. For documentation on how to use boot source abstraction from a Qt Extended application see QBootSourceAccessory.
Keypad light abstractions are used to control the state of the keypad light on the device. Typically a device has only a single keypad light abstraction. For documentation on how to implement a keypad light abstraction see QKeypadLightAccessoryProvider. For documentation on how to use the keypad light abstraction from a Qt Extended application see QKeypadLightAccessory.
Power sources are used to query information about the available power sources. Power sources describe both batteries and wall power sources. For documentation on how to implement a power source see QPowerSourceProvider. Qt Extended provides two methods of accessing power source information. The first method uses the standard Qt Extended Hardware Abstraction API, for details refer to QPowerSource. The second method is a simplified interface provided by QPowerStatus.
Qt Extended supports multiple power sources on a single device. See QPowerSource for details on how to specify a default power sources.
Signal source abstractions are used to query information about the available signal sources. For documentation on how to implement a signal source see QSignalSourceProvider. For documentation on how to use signal sources from a Qt Extended application see QSignalSource.
Qt Extended supports multiple signal sources on a single device. See QSignalSource for details on how to specify a default signal source.
Vibration abstractions are used to alert the user. Typically a device has only a single vibration abstraction. For documentation on how to implement a vibration abstraction see QVibrateAccessoryProvider. For documentation on how to use a vibration abstraction from a Qt Extended application see QVibrateAccessory.
Qt Extended uses the vibrate abstraction to alert the user to a variety of conditions.
The defaultbuttons.conf file provides integrators a way to map the devices keypad to certain actions, map out characters to be generated and specify details for the UI. The relevant sections:
Section | Details | Possible settings. |
---|---|---|
[Translation] |
| |
[Menu] | Specifies details for the main 'grid' |
|
[SoftKeys] | Provides assignments for Qt Extended softkeys at the botton of the screen |
|
[SystemButtons] | Provides Qt keycode assignments for physical buttons. |
|
[TextButtons] | Maps physical buttons to hold and tab actions. |
|
[LocaleTextButtons] |
| |
[PhoneTextButtons] |
| |
[Device] | Provides device information. | PrimaryInput=(Keypad|Touchscreen) - Tells Qt Extended to use keypad or touchscreen. |
[Button] | Tells Qt Extended number of physical buttons to provide mapping for. | Count=<number> |
[ButtonX] | Specifies a physical button and mapping its actions. X being a number starting at 0 to the number specified in [Button]/Count. |
|
[Environment] | Specifies environmental configuration. | QWS_DISPLAY=<gfx driver><:driver specific options><:display number> |
[InputMethods] | Specifies default InputMethod to be used | DefaultIM=<string:Identifier> |
Qt Extended includes support for managing a device's power states. This feature can be used to decrease the power consumption of a device, and extend battery life, when the user is not interacting with it. The system supports multiple levels of power saving, transitioning between each power saving level after a period of user inactivity.
Within the Qt Extended Server QtopiaPowerManager defines the generic power management interface. This interface must be implemented if power management functionality is required. Qt Extended includes a default implementation that supports three power saving levels:
See PhonePowerManager for details.
Additional power saving levels can be defined by subclassing either PhonePowerManager or QtopiaPowerManager.
Applications can influence the minimum power saving level that the system will enter with the QtopiaApplication::setPowerConstraint() function. For example a video player would use this function to temporarily disable all power management settings. An audio player would use this function to temporarily disable suspending the device, but still allowing the display to be turned off.
Finer control of the Qt Extended power manager is provided by the QtopiaPowerManager service.
The suspend state is typically the lowest power state that a device can enter while still being on. Transitioning into and out of the suspended state generally requires additional set up and restore tasks. These are implemented as server tasks that implement the SystemSuspendHandler interface. The SystemSuspend server task coordinates suspending and resuming the system to and from its lowest power saving state.
Qt Extended input method handling consists of two parts. The IM backend is provided by the Qt Extended Server which is responsible for the loading of input method plug-ins and input/output related Qt Extended classes. These classes build the framework for input method plug-ins.
The front-end implementation for IM support is provided via plug-ins (see Input Methods: Class Overview for more details). By default Qt Extended provides a few reference implementations which demonstrate certain IM capabilities:
Input method | source | Description |
---|---|---|
Phone keys | $QPEDIR/src/3rdparty/plugins/inputmethods/pkim | The Phone key input method is intended for use with keypad buttons with the common 0-9, # and * buttons. It uses a dictionary lookup system to guess the most likely input, as well as a multitap system. |
FullScreen Handwriting | $QPEDIR/src/3rdparty/plugins/inputmethods/pkim and $QPEDIR/src/libraries/handwriting | This IM can be used when using a pointing device such as a touchscreen or mouse. It composes characters out of multiple strokes. It uses the same dictionary as the Phone keys |
Keyboard | $QPEDIR/src/plugins/inputmethods/keyboard | The Keyboard input method demonstrates widget based pop up text input. |
Docked Keyboard | $QPEDIR/src/plugins/inputmethods/dockedkeyboard | The Docked Keyboard provides widget based input methods not unlike the Keyboard. However the difference is the presentation of the input widget. Using the same popup widget as the normal keyboard, this input method docks itself along side other widgets on the display (instead of on top of them), reducing the available display space for normal widgets. |
As stated earlier, the Qt Extended input methods are reference implementations. Their purpose is to demonstrate and test certain capabilities of the Qt Extended back-end implementation as well as providing sample code for new plug-in development. The input method tutorial describes the steps required for plug-in development.
Qt Extended can be translated into several languages. By default, Qt Extended only provides an English user interface. However user interfaces have been designed and tested with a variety of European and Asian languages to ensure that Qt Extended can handle the various layout and space issues caused by most languages.
The Qt Extended Internationalization guide explains the fundamental details of the Qt Extended i18n support, such as how the build system can support the process and how to generate translations for new (not yet) supported languages. The build system documentation has some additional documentation which covers Non-code Translatable (translations required for settings and xml files) related information:
It is possible to purchase translations for selected languages. For more details please contact [email protected].
The number of supported languages is limited by Qt. Please consult the Internationalization with Qt guide to obtain an overview.
The Qt Extended media system is an engines/plug-in based client server architecture which allows the implementation of user frontend's without particular knownledge of the backend. The Qt Extended Multimedia overview provide an introduction into the frameworks architecture and demonstrates common integration tasks by means of tutorials.
Audio functionality can change depending on the context. For example when a headset is plugged in. QAudioStatePlugin provides the ability to override the defaults for a particular device.
Qt Extended provides Messaging functionality that enables Qt Extended devices to support SMS, MMS and electronic mail messaging. The Messaging Documention provides the main entry page into the messaging parts of Qt Extended.
Qt Extended includes MMS functionality in the Messages client but does not include a WAP stack implementation that would be needed to send or receive such messages.
Qt Extended includes a SMIL 2.0 parser/viewer in directory: $QPEDIR/src/libraries/qtopiasmil/.
This SMIL viewer is intended for use with an MMS viewer and is currently only used by the Messages application.
The SMIL viewer:
Qt Extended does not include a WAP stack with the MMS client. Instead, an interface is provided which allows any WAP stack to be integrated. The MmsComms class must be subclassed and the virtual functions implemented and signals emitted as appropriate.
The MmsCommsHttp class provides a sample implementation using HTTP over TCP/IP.
Refer to: $QPEDIR/src/applications/qtmail/mmscomms_http.cpp and $QPEDIR/src/applications/qtmail/mmscomms_http.h.
To choose an alternate WAP stack connection method:
The AMR encoder included with Qt Extended is a reference implementation only. It is recommended that an encoder optimized for the target platform be installed. The media recorder plug-in interface provides a convenient method of integrating the codec.
Qt Extended sandbox based security mechanism called the Safe Execution Environment (SXE) Safe Execution Environment, which supports the download and secure execution of 3rd party native applications.
The SXE consists of several major components working together in tandem.
Qt Extended provides Telephony support that enables Qt Extended devices to use GSM and Voice over IP (VoIP) functionality. The Telephony Documentation provides the main entry page into the telephony components of Qt Extended.
Qt Extendedsupports vendor-specific modem commands through the use of plug-ins to the Qt Extended Phone Modem Library. The process of implementing a vendor-specific phone-vendor plug-in and multiplexer plug-in is covered in GSM Modem Integration and Tutorial: Writing a Multiplexer Plug-in respectively. Before starting it may be necessary to configure the Linux kernel to support the modem device. See AT Modem for details on what is required for modems connected via a serial interface.
The QTOPIA_PHONE_DEVICE macro in custom.h is used to specify the modem device. QTOPIA_PHONE_DEVICE can also be set as an environment variable. The format of QTOPIA_PHONE_DEVICE is
<device>:<baud rate>
For example to specify /dev/ttyS0 as the modem device with a baud rate of 115200, add the following preprocessor define to custom.h
#define QTOPIA_PHONE_DEVICE "/dev/ttyS0:115200"
or alternatively the QTOPIA_PHONE_DEVICE environment variable could be set. For Bourne compatible shells
export QTOPIA_PHONE_DEVICE="/dev/ttyS0:115200"
The main Qt Extended telephony components are based on GSM/UMTS networks. However many other communication bearers require similar if not even identicial infrastructure support. Therefore new bearers can easily be integrated into the Qt Extended telephony API. In fact the higher API layers are almost agnostic in regards to the actual communication protocol.
One additional communication bearer that is directly supported by Qt Extended is Voice over IP (VoIP). The VoIP Integration describes the main VoIP components used by the Qt Extended reference implementation and demonstrates how they interact with the Qt Extended phone user interface. The reference implementation uses the open source library libdissipate2 which provides simple SIP functionality.
Note: Currently due to licensing inconsistencies libdissipate2 cannot be shipped with Qt Extended.
If the hardware platform already features its own SIP implementation the Qt Extended VoIP implementation can easily be replaced as described by the Qt Extended general VoIP Integration guide. It describes the necessary steps to integrate new SIP clients as well as new telephony services in general.
Any web browser integrated with Qt Extended should respond to the WebAccess service. The web browser should invoke Qt Extended services to fullfil external application needs, including:
The QSettings value "Trolltech/WebAccess/Locations/Home" is the user's globally set Home page.
Step | Description |
---|---|
Device-specific code | Qt Extended expects device-specific code to be implemented by the system integrator. See <custom.h> for the required and available functions/macros. |
Setting time on a device | Qt Extended requires /sbin/hwclock to update the system time and zone information for time conversion purposes. |
Removable Media and Devices | Qt Extended must be notified when a removable media or a PCMCIA card is connected to the device. Note that the StabMonitor server task can provide such notifications for PCMCIA cards (for details refer to the class documentation). |
Qt Extended uses various environmental variables to facilitate various settings, which are documented in:
In addition to Qt for Embedded Linux's environment variables Qt Extended uses the following variables to further specify its behavior:
Variable | Description |
---|---|
QTOPIA_PHONE_DEVICE | Specifies the phone device and speed. Qt Extended will use a default device if this variable is not set. The default value is set in custom.h. See also Modem Integration and Using a phone device |
QTOPIA_PHONE_DUMMY | If this Variable is set to 1 Qt Extended uses a telephony dummy implementation which does not require a real serial device. However its capabilities are limited as well. |
QTOPIA_PHONE_MUX | If this variable is set to no disables multiplexing in Qt Extended. See also GSM Modem Integration |
QTOPIA_PHONE_VENDOR | Specifies the multiplexer plug-in that Qt Extended uses. See also Multiplexer plug-in tutorial |
After the first startup, the "First Use" tool is launched. It presents a user interface allowing the user to set initial settings for Qt Extended. The following settings can be set:
Depending on the devices capabilities some of the above settings may not be necessary. In order to accommodate for such cases the tool can be customized by modifying the [Startup] group in the file $QPEDIR/etc/default/Trolltech/qpe.conf The following fields can be edited:
Qt Extended uses the Qt Style framework to define the look and feel of the common widgets used by Qt Extended applications. Qt Extended provides a default style, Qt Extended, which is implemented in QPhoneStyle and QtopiaStyle. The look and feel of Qt Extended applications can be changed by implementing new styles. New styles are created by deriving new classes from QStyle. Refer to Creating a custom style and Styles Example documentation on creating custom styles. Custom styles are loaded using the plug-in system. For details on creating a style plug-in and registering the custom style with the QStyleFactory refer to Writing Qt Extensions.
If your device will be used with both left-to-right and right-to-left layouts you should consider the implications this has when designing custom styles.
When creating custom widgets it is important to make them style-aware, doing so will allow you to maintain a consistent look and feel.
In Qt Extended, styles are linked to themes, which the user can select in the Appearance Settings application. The following segment of $QPEDIR/etc/themes/qtopia.conf demonstrates how a widget style is associated with a given theme. In this example the Qt Extended style is used when the user selects the Qt Extended theme.
[Theme] Name[] = Qtopia Style = Qtopia ...
In addition the Qt Extended applications follow a style guide which describes the guide lines for user interfaces. The focus is on consistency.
Integrators can extend the Qt Extended look and feel by customizing the theme. Several themes are shipped with Qt Extended (see QPEDIR/etc/themes for details) and may serve as examples.
The Server widget concept is the user interface customization with the most flexibility. It enables the replacement of widget components via abstract widget classes which define how the various main user interface components interact with each other. The following UML diagram shows a selection of server widgets and how they are connected to each other.
The following table describes the purpose of the various abstract server widget:
Abstract widget | Description |
---|---|
QAbstractMessageBox | This abstract server widget provides an interface for message boxes. This allows the easy replacement of message boxes. The PhoneMessageBox class implements the Qt Extended default message box. |
QAbstractServerInterface | This is the main UI widget instantiated by the Qt Extended Server that is common to all Qt Extended editions. The PhoneLauncher class implements this interface for the Qt Extended. The remaining abstract server widgets are based on the PhoneLauncher as it is the PhoneLauncher class that creates and connects the remaining server widgets. |
QAbstractBrowserScreen | This abstract server widget is Qt Extended specific and provides the main application browser. Users use it to navigate through and launch applications. The PhoneBrowserScreen class implements the default behaviour. |
QAbstractCallHistory | This abstract server widget is Qt Extended specific and provides the main call history view. It shows outgoing, incoming and missed calls and their details. In addition it provides shortcuts to store new contact details, send messages or call a number. The default call history is implemented by PhoneCallHistory. |
QAbstractCallScreen | This abstract server widget is Qt Extended specific and provides the main call screen. The call screen is shown during calls. It displays all active active calls, enables call management features such as merging and holding of calls and informs the user about call parameter such as length or contact details. |
QAbstractContextLabel | This abstract server widget provides the interface for the soft key menubar. It is docked to the bottom of the screen and shows the menu and current key shortcuts. Applications cannot access or display anything in this area. The BaseContextLabel extends the widget interface by adding button related behaviour. This may be of interest if the default context label (ThemdedContextLabel) UI is already too specific. |
QAbstractDialerScreen | This abstract server widget is Qt Extendedspecific and provides the dialer screen. Qt Extended provides two implementation for this server widget (PhoneQuickDialerScreen and PhoneTouchDialerScreen). The decision which class is instanciated depends on whether Qt Extended is used on a touchscreen (PhoneTouchDialerScreen) or a keypad phone (PhoneQuickDialerScreen) . |
QAbstractHeader | This abstract server widget provides the interface for the title bar. The title bar is docked to the top of the screen. Applications cannot access or display anthing in this area. The default implementation is provided by PhoneHeader. |
QAbstractHomeScreen | This abstract server widget provides the main idle screen interface. It is the first widget shown to the user. It can displays status information such as the number of missed calls or the name of the current network. |
QAbstractSecondaryDisplay | This abstract server widget provides the secondary screen display. A secondary display is used by e.g., Clamshell phones which provide a small status display on the outside. The ThemedSecondaryDisplay class implements the default widget for Qt Extended. |
QAbstractTaskManager | This abstract server widget provides the interface for the task manager. The task manager shows the list of running applications, enables multitasking and allows the user to kill an application if that should be required. |
The main benefits of server widgets are their flexibility and configurability. Large UI parts can be exchanged against alternative implementations by changing a confguration file. However unlike themes the Qt Extended server must be restarted in order to update the user interface. Besides the default implementations Qt Extended ships with a couple of sample server widgets which demonstrate the possibilities. The server widget settings application (see $QPEDIR/src/settings/serverwidgets) is a reference application that allows the user to change the server appearance using server widgets.
The Running Qt Extended reference documentation describes how to run Qt Extended on desktop machines as well as running Qt Extended on a target device (directly flashed onto the device or via NFS).
In order to test Qt Extended functionality Qt Extended provides a Phone simulator (see $QTOPIA_DEPOT_PATH/src/tools/phonesim) which simulates a significant subset of the GSM 27.007 AT command set. This may be used if a real modem is not available for testing purposes.
The Qt for Embedded Linux documentation also contains a Running Qt for Embedded Linux Applications help which shows the qws command line supported by Qt for Embedded Linux.
In addition to standard Qt Extended applications and libraries which are already incorporated into the build system it may be necessary to add more (including 3rdparty) applications to a Qt Extended build. For this purpose the Qt Extended build system provides qbuild which allows development from outside of the main build tree. Please refer to the following documents for further information:
Debugging Qt Extended applications is an important part of the development process. The Debugging Qt Extended Applications guide provides a basic introduction showing how to use gdb and the Qt Extended internal logging mechanisms.
In some situation it may be necessary to debug Qt Extended running on a remote device because a particular bug may only happen on the target device but not on a desktop machine. This imposes further restriction upon the debugging process because the target device may not have sufficient memory to hold a complete debug build of Qt Extended. This situation can be solved by using gdb's remote debugging facilities. The Qt Extended Remote Debugging guide provides a quick demonstration how Qt Extended may be remotely debugged.
See also QDeviceIndicators and QValueSpaceItem.
Copyright © 2009 Nokia | Trademarks | Qt Extended 4.4.3 |