Top |
|
bindWithObject () |
|
bind () |
|
bindProperty () |
|
unbindWithObject () |
|
unbind () |
|
unbindProperty () |
|
unbindAll () |
|
getValue () |
|
setValue () |
|
getDefaultValue () |
|
getOptions () |
|
setOptions () |
|
finalize () |
This object provides methods for binding settings to object properties, connecting to signal change events, and getting and setting values. This class should not be directly, but rather through one of the wrapper classes (AppletSettings
, DeskletSettings
, or ExtensionSettings
)
boolean bindWithObject (object bindObject
,string key
,string applet_prop
,function callback
,user_data
);
Like bind this allows you to bind a setting to a property on an object. But unlike bind
, this function allows you to specify the bindObject to which the property will be bound.
bindObject |
(optional) the object to which the setting will be bound or null to use the bindObject passed to |
|
key |
the id of the setting |
|
applet_prop |
the variable name that is used to hold the setting (eg. |
|
callback |
(optional) the function to call when the setting changes |
|
user_data |
(optional) any extra data/object you wish to pass to the callback |
boolean bind (string key
,string applet_prop
,function callback
,user_data
);
Bind a setting to a property on the bindObject
passed to _init
.
boolean bindProperty (Settings.BindingDirection direction
,string key
,string applet_prop
,function callback
,user_data
);
Bind a setting to a property on the object bindObject
passed to _init
. This function is deprecaed and is now only a wrapper around bind
for backward compatibility. Please use bind
instead.
direction |
the direction of the binding |
|
key |
the id of the setting |
|
applet_prop |
the variable name that is used to hold the setting (eg. |
|
callback |
(optional) the function to call when the setting changes |
|
user_data |
(optional) any extra data/object you wish to pass to the callback |
boolean unbindWithObject (object bindObject
,string key
);
Removes the binding on an object. If you have bound key
to multiple objects, this will only remove the one bound to bindObject
. If you wish to remove all bindings, or you used bind
or bindProperty
to bind the setting, it is recommended that you use unbindPropery
instead.
boolean
unbind (string key
);
Removes the binding on an object that was bound using the bind
function. If you have bound key
to multiple objects using bindWithObject
, you should use unbindWithObject
or unbindAll
instead.
boolean
unbindProperty (string key
);
Removes the binding of a key that was bound using bind
, or bindProperty
. This function is deprecaed and is now only a wrapper around unbind
for backward compatibility. Please use unbind
instead.
boolean
unbindAll (string key
);
Removes all bindings of a key that were bound using bind
, bindWithObject
, or bindProperty
.
setOptions (string key
,options
);
Sets the available options of key
to options
. An error is given if the setting does not support options.