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  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Supporting Derived Projects

Some configuration variables allow you to use QDoc to support Qt-based projects; i.e allow your project to contain links to the online Qt documentation. This means that QDoc will be able to create links to the class reference documentation, without any explicit linking command.

description

The description variable holds a short description of the associated project.

See also project.

indexes

The indexes variable lists the index files that will be used to generate references.

For example. to make a derived Qt project contain links to the Qt Reference documentation, you need to specify the associated index file:

 indexes = $QTDIR/doc/html/qt.index

See also project and url.

project

The project variable provides a name for the project associated with the .qdocconf file.

The project's name is used to form a file name for the associated project's index file.

 project = QtCreator

This will cause an index file called qtcreator.index to be created.

See also description and indexes.

url

The url variable holds the base URL for the reference documentation associated with the current project.

The URL is stored in the generated index file for the project. When we use the index on its own, QDoc will use this as the base URL when constructing links to classes, functions, and other things listed in the index.

 project     = Qt
 description = Qt Reference Documentation
 url         = http://doc.qt.nokia.com/4.7

      ...

This makes sure that whenever qt.index is used to generate references to for example Qt classes, the base URL is http://doc.qt.nokia.com/4.7.

See also indexes.

How to Support Derived Projects

This feature makes use of the comprehensive indexes generated by QDoc when it creates the Qt reference documentation.

For example, qt.qdocconf (the configuration file for Qt) contains the following variable definitions:

     project     = Qt
     description = Qt Reference Documentation
     url         = http://doc.qt.nokia.com/4.7

     ...

The project variable name is used to form a file name for the index file; in this case the qt.index file is created. The url is stored in the index file. Later, when we use the index on its own, QDoc will use this as the base URL when constructing links to classes, functions, and other things listed in the index.

In a mini-project, you can use an index file by defining an indexes configuration variable in your .qdocconf file.

For example, you can create a qtcreator.qdocconf file to help you check the Qt Creator documentation:

     project                 = QtCreator
     description             = Qt Creator Class Documentation
     url                     = http://doc.qt.nokia.com/qtcreator-2.2

     indexes                 = $QTDIR/doc/html/qt.index

     outputdir               = html

     headerdirs              = src
     sourcedirs              = src \
                               examples
     sources.fileextensions  = "*.cpp *.qdoc *.doc"

     exampledirs = examples

The code above requires that you run QDoc from the directory that contains this file.

To resolve the actual links to Qt classes, the mini-project's .qdocconf file needs to assign a value to the indexes variable; $QTDIR/doc/html/qt.index makes sure that you always use the updated index file for the Qt documentation.

The only disadvantages with this approach are the extra file that QDoc has to generate and the time it takes to do so. Reading the index back again later isn't instantaneous either, but it's quicker than processing all the Qt classes each time you need to write a new document.

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 5.0-snapshot
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