AccessEngine :: AEState :: Setting :: RelNumericSetting :: Class RelNumericSetting
[hide private]
[frames] | no frames]

Class RelNumericSetting

source code

object --+        
         |        
   Setting --+    
             |    
NumericSetting --+
                 |
                RelNumericSetting

Defines a numeric setting that specifies a value relative to another one. If the parent style is None, acts just like a regular AEState.Setting.NumericSetting.

The relative value is persisted to disk for settings that have an equivalent in the parent style. The absolute value is persisted otherwise.

Instance Methods [hide private]
 
__init__(self, style, name, default, label, description, persist, min, max, precision)
Initializes all instance variables.
source code
 
update(self, setting)
Updates the relative min and max in addition to everything done in the parent class method.
source code
numeric
_getValue(self)
Gets the current absolute value.
source code
 
_setValue(self, val)
Stores the given absolute value as an integer or float with the given precision.
source code
RelRawRangeView
getView(self)
Gets a relative range view that returns the proper min and max values depending on if the value is relative or not.
source code

Inherited from NumericSetting (private): _fixBounds

Inherited from Setting: addObserver, clearObservers, copy, removeObserver, restore, save, serialize, unserialize

Inherited from Setting (private): _notify

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  value = property(_getValue, _setValue)
Instance Variables [hide private]
AEOutput.Style parent
Parent style of the stored style, None if no parent
numeric rel_max
Relative maximum bassed off of the true max - min
numeric rel_min
Relative minimum based off of the true -(max - min)

Inherited from NumericSetting: max, min, precision

Inherited from Setting: default, description, label, name, persist, state

Inherited from Setting (private): _cached, _observers, _value

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, style, name, default, label, description, persist, min, max, precision)
(Constructor)

source code 
Initializes all instance variables.
Overrides: NumericSetting.__init__

update(self, setting)

source code 
Updates the relative min and max in addition to everything done in the parent class method.
Parameters:
Overrides: NumericSetting.update

_getValue(self)

source code 
Gets the current absolute value.
Returns: numeric
Relative value
Overrides: Setting._getValue

_setValue(self, val)

source code 
Stores the given absolute value as an integer or float with the given precision. Uses round to store floats and int to store integers.
Parameters:
  • val (numeric) - New absolute value to store
Raises:
  • TypeError - When the value is not a numeric
Overrides: NumericSetting._setValue

getView(self)

source code 
Gets a relative range view that returns the proper min and max values depending on if the value is relative or not.
Returns: RelRawRangeView
A relative view of this range
Overrides: NumericSetting.getView