Last change
on this file since 8e674ccf was
14ec91c5,
checked in by Piotr Rozyczko <rozyczko@…>, 7 years ago
|
More code review related fixes
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Rev | Line | |
---|
[eae226b] | 1 | class Constraint(object): |
---|
| 2 | """ |
---|
| 3 | Internal representation of a single parameter constraint |
---|
[14ec91c5] | 4 | Currently just a data structure, might get expaned with more functionality, |
---|
| 5 | hence made into a class. |
---|
[eae226b] | 6 | """ |
---|
| 7 | def __init__(self, parent=None, param=None, value=0.0, min=None, max=None, func=None): |
---|
| 8 | self._value = value |
---|
| 9 | self._param = param |
---|
| 10 | self._func = func |
---|
[ba01ad1] | 11 | self.active = True |
---|
[eae226b] | 12 | self._min = min |
---|
| 13 | self._max = max |
---|
| 14 | |
---|
| 15 | @property |
---|
| 16 | def value(self): |
---|
| 17 | return self._value |
---|
| 18 | |
---|
| 19 | @value.setter |
---|
| 20 | def value(self, val): |
---|
| 21 | self._value = val |
---|
| 22 | |
---|
| 23 | @property |
---|
| 24 | def param(self): |
---|
| 25 | return self._param |
---|
| 26 | |
---|
| 27 | @param.setter |
---|
| 28 | def param(self, val): |
---|
| 29 | self._param = val |
---|
| 30 | |
---|
| 31 | @property |
---|
| 32 | def func(self): |
---|
| 33 | return self._func |
---|
| 34 | |
---|
| 35 | @func.setter |
---|
| 36 | def func(self, val): |
---|
| 37 | self._func = val |
---|
| 38 | |
---|
| 39 | @property |
---|
| 40 | def min(self): |
---|
| 41 | return self._min |
---|
| 42 | |
---|
| 43 | @min.setter |
---|
| 44 | def min(self, val): |
---|
| 45 | self._min = val |
---|
| 46 | |
---|
| 47 | @property |
---|
| 48 | def max(self): |
---|
| 49 | return self._max |
---|
| 50 | |
---|
| 51 | @max.setter |
---|
| 52 | def max(self, val): |
---|
| 53 | self._max = val |
---|
| 54 | |
---|
Note: See
TracBrowser
for help on using the repository browser.