Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

<custom.h> - Device Specific Qt Extended Declarations

The custom.h file is used to customize Qt Extended for a specific hardware platform. More...

Functions

Macros

The custom.h and custom.cpp files are implemented by the system integrator.

Since these files are tied to a device it is useful to have them in the device profile. If these files are not present configure will look in the traditional location, <source>/src/libraries/qtopia/custom-<xplatform>.(h|cpp). For reference implementations of these files, the existing files found in <source>/devices/<device>/custom.* and <source>/src/libraries/qtopiabase/custom-<xplatform>.* may be of assistance.

A number of macros can be defined in custom.h to customize Qt Extended for the specific hardware. The associated custom.cpp file will be compiled and linked to provide any custom functions that are required.


Function Documentation

void qpe_setBrightness ( int bright )

Sets the brightness of the device's LCD backlight/frontlight to bright.

bright represents the LCD backlight/frontlight brightness as an integer between 0 and qpe_sysBrightnessSteps(). A value of 0 means that the LCD display should be turned off. Values between 1 and qpe_sysBrightnessSteps() are interpreted as varying brightness levels with 1 representing the dimmest level and qpe_sysBrightnessSteps() the brightest.

int qpe_sysBrightnessSteps ()

Returns the number of graduations supported by the device's LCD backlight/frontlight.

This function is called by Qt Extended to query the number of graduations the device's LCD backlight/frontlight has.


Macro Documentation

NO_WIRELESS_LAN

Setting this define removes all wireless LAN related parts from Qt Extended. This reduces Qt Extended footprint and increases its performance.

QDSYNC_DEFAULT_PORTS

Set the ports that Synchronization uses by default.

If present, this macro sets the default ports that Synchronization uses. Synchronization currently supports "tcp" and "serial". The settings file overrides this default.

Note that this macro must evaluate to a string list.

If this macro is not present the default value is:

    #ifndef QDSYNC_DEFAULT_PORTS
    #define QDSYNC_DEFAULT_PORTS QStringList() << "tcp"
    #endif

QDSYNC_DEFAULT_SERIAL_PORT

Set the serial port that Synchronization uses by default.

If present, this macro sets the default serial port that Synchronization uses. The settings file overrides this default.

If this macro is not present the default value is:

    #ifndef QDSYNC_DEFAULT_SERIAL_PORT
    #define QDSYNC_DEFAULT_SERIAL_PORT "/dev/ttyS0"
    #endif

QDSYNC_DEFAULT_TCP_PORT

Set the TCP port that Synchronization uses by default.

If present, this macro sets the default TCP port that Synchronization uses. Note that the display number is added to the port so that multiple instances can run on the same machine. The default display number is 0. The settings file overrides this default.

If this macro is not present the default value is:

    #ifndef QDSYNC_DEFAULT_TCP_PORT
    #define QDSYNC_DEFAULT_TCP_PORT 4245
    #endif

QDSYNC_MODEL

Set the model that Synchronization reports.

If present, this macro sets the model that Synchronization uses. This is a string that is shown to the user.

If this macro is not present the default value is:

    #ifndef QDSYNC_MODEL
    #define QDSYNC_MODEL Qtopia::architecture()
    #endif

See also Qtopia::architecture().

QDSYNC_STARTUP_DELAY

Set the delay for the initial Synchronization launch.

If present, this macro sets the initial delay for Synchronization launch (in milliseconds). A freshly-booted system does not typically require synchronization capability immediately and delaying the launch of Synchronization can improve startup time.

If this macro is not present the default is to have no delay. Note that an algorithm attempts to detect when the device is busy and automatically delays launching of Synchronization so leaving this undefined is not guaranteed to make Synchronization launch immediately.

QDSYNC_SYSTEM

Set the system that Synchronization reports.

If present, this macro sets the system that Synchronization uses. Qt Extended Sync Agent plugins may handle specific systems.

If this macro is not present the default value is:

    #ifndef QDSYNC_SYSTEM
    #define QDSYNC_SYSTEM "Qtopia"
    #endif

QGLOBAL_PIXMAP_CACHE_LIMIT

This constant is provided to aid memory management for systems with large, high bit per pixel(bpp) screens. If this macro is not present the default value is:

    #ifndef QGLOBAL_PIXMAP_CACHE_LIMIT
    #define QGLOBAL_PIXMAP_CACHE_LIMIT 1048576     // 1 Mb
    #endif

See also Shared Memory Cache and QGlobalPixmapCache.

QPE_ARCHITECTURE

This macro sets the value returned by the Qtopia::architecture() function.

QPE_NEED_CALIBRATION

If you have a touch screen that requires calibration you should set this define.

QPE_USE_MALLOC_FOR_NEW

Setting this define causes memory to be allocated using malloc() instead of the default C++ new implementation. This is faster in some cases.

When Qt Extended is built with this define it implements C++ operator new functions that call malloc. You should link with gcc instead of g++ to avoid clashes with the stdc++lib versions of the C++ operator new functions.

QTOPIA_COMPATIBLE_DEVICES

Set this macro to specify the devices whose packages are known to be compatible with this device. It is a comma delimited string and by convention the first device listed is this device.

This macro is used by packagemanager as a guide to filter out packages not suitable for the device.

If this macro is not present the default value is:

    #ifndef QTOPIA_COMPATIBLE_DEVICES
    #define QTOPIA_COMPATIBLE_DEVICES "Unknown"
    #endif

QTOPIA_ENABLE_EXPORTED_BACKGROUNDS

Set this macro to have a background image used as the background for the launcher.

QTOPIA_ENABLE_GLOBAL_BACKGROUNDS

Set this macro to have a background image used as the background for all applications. This has no effect unless used with QTOPIA_ENABLE_EXPORTED_BACKGROUNDS.

QTOPIA_PHONE_DEVICE

Set this macro to specify the default modem device to use. For example, the first physical COM port would be specified with "/dev/ttyS0". The QTOPIA_PHONE_DEVICE environment variable can override this value.

See also GSM Modem Integration.

QTOPIA_PHONE_MUX

Set this macro to the string no to disable multiplexing. The QTOPIA_PHONE_MUX environment variable can override this value.

This setting is typically used for testing phone vendor plug-ins before development of the multiplexer plug-in has been finished, or to determine if a modem problem is due to problems in the multiplexer plug-in.

See also GSM Modem Integration and Tutorial: Writing a Multiplexer Plug-in.

QTOPIA_PHONE_VENDOR

Set this macro to specify the default phone vendor and multiplexer plug-ins to use. The QTOPIA_PHONE_VENDOR environment variable can override this value.

See also GSM Modem Integration.

QTOPIA_ZONEINFO_PATH

Set this macro to specify an alternate location to the zoneinfo database. You should set this if your zoneinfo database is not in the usual location of /usr/share/zoneinfo.

See also Time on an Embedded Device.

V4L_VIDEO_DEVICE

Set this macro to specify the Video4Linux device to use. If this macro is not present the default value is:

    #ifndef V4L_VIDEO_DEVICE
    #define V4L_VIDEO_DEVICE "/dev/video"
    #endif


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3