1 import pyforms.Utils.tools as tools
2 from PyQt4 import uic, QtGui,QtCore
3 from pyforms.web.Controls.ControlBase import ControlBase
7
8 _min = 0
9 _max = 100
10
11 - def __init__(self, label = "", defaultValue=(0,100) , min = 0, max = 100, horizontal=False, **kwargs):
16
17
19 return "controls.push(new ControlBoundingSlider('{0}', '{1}', [{2}, {3}], {4}, {5}, '{6}','{7}'));".format(
20 self._label, self._name, self.value[0], self.value[1],
21 self._min, self._max , self._horizontal, self.help)
22
23
24 - def _update(self, minval, maxval): self.value = minval, maxval
25
27
28 - def load(self, data):
29 if 'value' in data: self.value = data['value']
30
31 - def save(self, data):
33
34
35
36 @property
38
39 @min.setter
41
42 @property
44
45 @max.setter
47