QDesktopServices Class Reference
|
Constant | Value | Description |
---|---|---|
QDesktopServices::DesktopLocation | 0 | Returns the users desktop. |
QDesktopServices::DocumentsLocation | 1 | Returns the users document. |
QDesktopServices::FontsLocation | 2 | Returns the users fonts. |
QDesktopServices::ApplicationsLocation | 3 | Returns the users applications. |
QDesktopServices::MusicLocation | 4 | Returns the users music. |
QDesktopServices::MoviesLocation | 5 | Returns the users movies. |
QDesktopServices::PicturesLocation | 6 | Returns the users pictures. |
QDesktopServices::TempLocation | 7 | Returns the system's temporary directory. |
QDesktopServices::HomeLocation | 8 | Returns the user's home directory. |
QDesktopServices::DataLocation | 9 | Returns a directory location where persistent application data can be stored. QCoreApplication::applicationName and QCoreApplication::organizationName should be set to work on all platforms. |
This enum was introduced in Qt 4.4.
See also storageLocation() and displayName().
Returns a localized display name for the given location type or an empty QString if no relevant location can be found.
Opens the given url in the appropriate Web browser for the user's desktop environment, and returns true if successful; otherwise returns false.
If the URL is a reference to a local file (i.e., the URL scheme is "file") then it will be opened with a suitable application instead of a Web browser.
If a mailto URL is specified, the user's e-mail client will be used to open a composer window containing the options specified in the URL, similar to the way mailto links are handled by a Web browser.
For example, the following URL contains a recipient (user@foo.com), a subject (Test), and a message body (Just a test):
mailto:user@foo.com?subject=Test&body=Just a test
Warning: Although many e-mail clients can send attachments and are Unicode-aware, the user may have configured their client without these features. Also, certain e-mail clients (e.g., Lotus Notes) have problems with long URLs.
See also setUrlHandler().
Sets the handler for the given scheme to be the handler method provided by the receiver object.
This function provides a way to customize the behavior of openUrl(). If openUrl() is called with a URL with the specified scheme then the given method on the receiver object is called instead of QDesktopServices launching an external application.
The provided method must be implemented as a slot that only accepts a single QUrl argument.
If setUrlHandler() is used to set a new handler for a scheme which already has a handler, the existing handler is simply replaced with the new one. Since QDesktopServices does not take ownership of handlers, no objects are deleted when a handler is replaced.
Note that the handler will always be called from within the same thread that calls QDesktopServices::openUrl().
See also openUrl() and unsetUrlHandler().
Returns the default system directory where files of type belong, or an empty string if the location cannot be determined.
Note: The storage location returned can be a directory that does not exist; i.e., it may need to be created by the system or the user.
This function was introduced in Qt 4.4.
Removes a previously set URL handler for the specified scheme.
See also setUrlHandler().
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 ! |
Copyright © 2000-2012 - www.developpez.com