QAbstractValueSpaceLayer Class ReferenceThe QAbstractValueSpaceLayer class provides support for adding new logical data layers to the Qt Value Space. More... #include <QAbstractValueSpaceLayer> Inherits QObject. Public Types
Public Functions
Signals
Protected Functions
Macros
Additional Inherited Members
Detailed DescriptionThe QAbstractValueSpaceLayer class provides support for adding new logical data layers to the Qt Value Space. To create a new layer in the Value Space subclass this class and reimplement all of the virtual functions. The new layer is installed by either calling QValueSpace::installLayer() or by adding the QVALUESPACE_AUTO_INSTALL_LAYER() macro in your implementation file. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QAbstractValueSpaceLayer::Publish | 0x00000001 | Enable change notification for the handle. When set, the layer should emit QAbstractValueSpaceLayer::handleChanged() signals when appropriate for the handle. |
Value Space layers are initialized in either a "Server" or a "Client" context. There is only a single server in the Value Space architecture, and its layers are always initialized before any clients. This distinction allows layers to implement Client/Server architecture if required. If not, layers are free to treat Server and Client contexts identically.
Constant | Value | Description |
---|---|---|
QAbstractValueSpaceLayer::Server | 0 | The layer is being initialized in the "server" context. |
QAbstractValueSpaceLayer::Client | 1 | The layer is being initialized in the "client" context. |
Registers creator for change notifications to values under handle.
See also removeWatches().
Returns the set of children of handle. For example, in a layer providing the following items:
/Device/Configuration/Applications/FocusedApplication /Device/Configuration/Buttons/PrimaryInput /Device/Configuration/Name
a request for children of "/Device/Configuration" will return { "Applications", "Buttons", "Name" }.
Emits the QValueSpacePublisher::interestChanged() signal on publisher with path and interested.
Emitted whenever the handle's value, or any sub value, changes.
Returns a globally unique identifier for the layer. This id is used to break ordering ties.
Returns a new opaque handle for the requested subPath of parent. If parent is an InvalidHandle, subPath is interpreted as an absolute path.
The caller should call removeHandle() to free resources used by the handle when it is no longer required.
Returns the QValueSpace::LayerOptions describing this layer.
See also QValueSpace::LayerOption.
Returns the name of the Value Space layer. This name is only used for diagnostics purposes.
Registers or unregisters that the caller is interested in handle and any subpaths under it. If interested is true interest in handle is registered; otherwise it is unregistered.
The caller should ensure that all calls to this function with interested set to true have a matching call with interested set to false.
Returns true if the notification was successfully sent; otherwise returns false.
Return the position in the Value Space layer stack that this layer should reside. Higher numbers mean the layer has a higher precedence and its values will "shadow" those below it. If two layers specify the same ordering, the id() value is used to break the tie.
Releases a handle previously returned from QAbstractValueSpaceLayer::item().
Process calls to QValueSpacePublisher::~QValueSpacePublisher() by removing the entire sub tree created by creator under handle.
Returns true on success; otherwise returns false.
Process calls to QValueSpacePublisher::resetValue() by removing the Value Space item identified by handle and subPath and created by creator.
Returns true on success; otherwise returns false.
Removes all registered change notifications for creator under parent.
See also addWatch().
Apply the specified property mask to handle.
Process calls to QValueSpacePublisher::setValue() by setting the value specified by the subPath under handle to value. Ownership of the Value Space item is assigned to creator.
Returns true on success; otherwise returns false.
See also value().
Called by the Value Space system to initialize each layer. The type parameter will be set accordingly, and layer implementors can use this to implement a client/server architecture if desired.
Returns true upon success; otherwise returns false.
Returns true if the layer supports interest notifications; otherwise returns false.
Flushes all pending changes made by calls to setValue(), removeValue() and removeSubTree().
Returns the value for a particular handle. If a value is available, the layer will set data and return true. If no value is available, false is returned.
See also setValue().
Returns the value for a particular subPath of handle. If a value is available, the layer will set data and return true. If no value is available, false is returned.
This macro installs new Value Space layer. className is the name of the class implementing the new layer.
The method className *className::instance() must exist and return a pointer to an instance of the layer to install. This method will only be invoked after QApplication has been constructed, making it safe to use any Qt class in your layer's constructor.
This macro can only be used once for any given class and it should be used where the implementation is written rather than in a header file.
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 qtmobility-1.0-tp | |
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