Package AccessEngine :: Package AEDevice :: Package AEOutput :: Module Style :: Class Style
[hide private]
[frames] | no frames]

Class Style

source code

AEState.AEState --+
                  |
                 Style

Extends AEState with new kinds of settings for devices.

Mute (bool): Is all output inhibited? Non-persistent by default.

Instance Methods [hide private]
 
__init__(self, parent_style=None)
Initializes the style object to which to dispatch requests for attributes that are not defined in this object.
source code
 
init(self, device)
Extends the default method signature with a parameter containing a reference the device to which this style belongs.
source code
 
_initDefault(self)
Does nothing by default.
source code
 
_initFlyweight(self)
Copies references to all default settings into this object.
source code
boolean
isDefault(self)
Gets if the current style is the default meaning it does not have a parent.
source code
Style
getDefault(self)
Gets a reference to the default style if it exists or None if it does not.
source code
Style
copy(self)
Makes a copy of this object and its parent.
source code
boolean
isDirty(self)
Gets if values in settings have changed since the last call to makeClean.
source code
 
makeClean(self)
Resets the dirty set to empty.
source code
string
iterDirty(self)
Iterates over all of the names in AEState.dirty starting with the parent and then working through this object.
source code
AEState.NumericSetting
newRelNumeric(self, name, default, label, min, max, precision, description='', persist=True)
Adds a new AEState.Setting.RelNumericSetting to this group.
source code
AEState.RangeSetting
newRelRange(self, name, default, label, min, max, precision, description='', persist=True)
Adds a new AEState.Setting.RelRangeSetting to this group.
source code
AEState.Setting.PercentRangeSetting
newRelPercent(self, name, default, label, min, max, precision, description='', persist=True)
Adds a new AEState.Setting.RelPercentRangeSetting to this group.
source code
Instance Variables [hide private]
Style parent_style
Another style object to which this one should dispatch attribute lookups if attributes are not defined in this object
Method Details [hide private]

__init__(self, parent_style=None)
(Constructor)

source code 
Initializes the style object to which to dispatch requests for attributes that are not defined in this object.
Parameters:
  • parent_style (Style) - Parent style object

init(self, device)

source code 
Extends the default method signature with a parameter containing a reference the device to which this style belongs.
Parameters:
  • device (AEOutput) - Output device reference

_initDefault(self)

source code 
Does nothing by default. Override to initialze settings that should be created on default objects.

_initFlyweight(self)

source code 
Copies references to all default settings into this object. This means the setting are shared between this object and the default.

isDefault(self)

source code 
Gets if the current style is the default meaning it does not have a parent.
Returns: boolean
Is this style the default?

getDefault(self)

source code 
Gets a reference to the default style if it exists or None if it does not.
Returns: Style
parent_style

copy(self)

source code 
Makes a copy of this object and its parent.
Returns: Style
New style object

isDirty(self)

source code 
Gets if values in settings have changed since the last call to makeClean.
Returns: boolean
Dirty or not?

iterDirty(self)

source code 
Iterates over all of the names in AEState.dirty starting with the parent and then working through this object.
Returns: string
Name of a dirty setting

newRelNumeric(self, name, default, label, min, max, precision, description='', persist=True)

source code 
Adds a new AEState.Setting.RelNumericSetting to this group.
Parameters:
  • name (string) - New name of the setting
  • default (float) - Default value of the setting
  • label (string) - Label for the new AEState.Setting
  • min (number) - Minimum value in the range
  • max (number) - Maximum value in the range
  • precision (integer) - Number of decimal places
  • description (string) - Extended description of the AEState.Setting
  • persist (boolean) - Persist the setting value to disk?
Returns: AEState.NumericSetting
New setting object

newRelRange(self, name, default, label, min, max, precision, description='', persist=True)

source code 
Adds a new AEState.Setting.RelRangeSetting to this group.
Parameters:
  • name (string) - New name of the setting
  • default (float) - Default value of the setting
  • label (string) - Label for the new AEState.Setting
  • min (number) - Minimum value in the range
  • max (number) - Maximum value in the range
  • precision (integer) - Number of decimal places
  • description (string) - Extended description of the AEState.Setting
  • persist (boolean) - Persist the setting value to disk?
Returns: AEState.RangeSetting
New setting object

newRelPercent(self, name, default, label, min, max, precision, description='', persist=True)

source code 
Adds a new AEState.Setting.RelPercentRangeSetting to this group.
Parameters:
  • name (string) - New name of the setting
  • default (float) - Default value of the setting
  • label (string) - Label for the new AEState.Setting
  • min (number) - Minimum value in the range to be shown as 0%
  • max (number) - Maximum value in the range to be shown as 100%
  • precision (integer) - Number of decimal places
  • description (string) - Extended description of the AEState.Setting
  • persist (boolean) - Persist the setting value to disk?
Returns: AEState.Setting.PercentRangeSetting
New setting object