The ValueSpacePublisher element represents a path in the value space where keys can be published. More...
This element was introduced in Mobility 1.2.
ValueSpacePublishers are constructed with a set path which cannot be changed. If you need to publish within multiple different paths, you will need multiple ValueSpacePublishers.
For the keys within the path chosen, if the key names to be published are alphanumeric, they may be accessed through dynamic properties by setting the keys list.
Example:
ValueSpacePublisher { id: battery path: "/power/battery" keys: ["charge", "charging"] } MouseArea { onClicked: { battery.charge = 50 battery.charging = true } }
Alternatively, for key names that can't be mapped to properties, or for key names shadowed by existing properties (like "value" or "path"), you can also access the value property of the Publisher itself.
ValueSpacePublisher { id: nonalpha path: "/something/with a space/value" } MouseArea { onClicked: { nonalpha.value = "example" } }
The ValueSpacePublisher element is part of the QtMobility.publishsubscribe 1.2 module.
See also QValueSpacePublisher.
read-onlyhasSubscribers : bool |
This property is true if there are subscribers currently subscribed to the ValueSpace path being published by this Publisher.
This property is read only.
This property group was introduced in Mobility 1.2.
keys : QStringList |
Setting this property creates a set of dynamic properties allowing easy access to set the values of keys under this Publisher's path.
This property group was introduced in Mobility 1.2.
path : string |
This property holds the base path of the publisher. This property is write-once -- after the first write, subsequent writes will be ignored and produce a warning.
This property group was introduced in Mobility 1.2.
server : bool |
This property can be used to force the Publisher to start the ValueSpace server (if one is appropriate on the platform) before the path property has been set.
This property is write only.
This property group was introduced in Mobility 1.2.
value : QVariant |
This property publishes a new value to the ValueSpace at the path given through the path property. This property is write only.
This property group was introduced in Mobility 1.2.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.