Bases: PyQt4.QtCore.QObject
An object containing one piece of data which is intended to be shared. The data will be identified by its UID (a unique identifier known to objects that intend to access the data)
In general, you are not supposed to instantiate objects of this class directly. Instead, you should interact via the SharedDataManager, which uses SharedDataManager.__getDataModel() to ensure that the DataModels are singletons.
Registers the given slot method to receive notifications whenever the data is changed.
Parameters: |
|
---|
See also
Registers the given writer object as a writer of the data. The writer is then expected to emit a QtCore.SIGNAL(signalname) with the new data as the first parameter.
Parameters: |
|
---|
See also
returns the data unique identifier
Return type: | :class:~`str` |
---|---|
Returns: |
unregister a reader
Parameters: | slot (:class:~`callable`) – the slot to which this was connected |
---|
unregister a writer from this data model
Parameters: |
|
---|
See also
Returns the data object.
Return type: | :class:~`object` |
---|---|
Returns: | the data object |
Whether the data has been set at least once or if it is uninitialized
sets the data object and emits a “dataChanged” signal with the data as the parameter
Parameters: | data (:class:~`object`) – the new value for the Model’s data |
---|