Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

<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

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 64
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le Qt Developer Network au hasard

Logo

Extension de Qt WebKit

Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web