Example #1
0
	def __init__(self, parent, val=0.0, val_range=(-360.0, 360.0),
				 onchange=None, onenter=None, check_focus=False):
		self.angle_value = val
		self.ucallback = onchange
		FloatSpin.__init__(self, parent, val, val_range, step=1.0, width=5,
						onchange=self.update_angle_value, onenter=onenter,
						check_focus=check_focus, spin_overlay=config.spin_overlay)
Example #2
0
 def __init__(self,
              app,
              parent,
              val=0.0,
              step=1.0,
              onchange=None,
              onenter=None,
              can_be_negative=False):
     self.app = app
     self.insp = app.insp
     self.point_value = val
     self.ucallback = onchange
     if can_be_negative: self.point_range = (-100000.0, 100000.0)
     if self.insp.is_doc(): self.units = app.current_doc.model.doc_units
     val = self.point_value * point_dict[self.units]
     FloatSpin.__init__(self,
                        parent,
                        val,
                        self.point_range,
                        step=step,
                        width=5,
                        onchange=self.update_point_value,
                        onenter=onenter,
                        spin_overlay=config.spin_overlay)
     self._set_digits(unit_accuracy[self.units])
     self.set_value(self.point_value * point_dict[self.units])
Example #3
0
	def __init__(self, app, parent, val=0.0, step=1.0,
				 onchange=None, onenter=None, can_be_negative=False):
		self.app = app
		self.insp = app.insp
		self.point_value = val
		self.ucallback = onchange
		if can_be_negative:self.point_range = (-100000.0, 100000.0)
		if self.insp.is_doc(): self.units = app.current_doc.model.doc_units
		val = self.point_value * point_dict[self.units]
		FloatSpin.__init__(self, parent, val, self.point_range,
						step=step, width=5,
						onchange=self.update_point_value, onenter=onenter,
						spin_overlay=config.spin_overlay)
		self._set_digits(unit_accuracy[self.units])
		self.set_value(self.point_value * point_dict[self.units])
Example #4
0
 def __init__(self,
              parent,
              val=0.0,
              val_range=(-360.0, 360.0),
              onchange=None,
              onenter=None,
              check_focus=False):
     self.angle_value = val
     self.ucallback = onchange
     FloatSpin.__init__(self,
                        parent,
                        val,
                        val_range,
                        step=1.0,
                        width=5,
                        onchange=self.update_angle_value,
                        onenter=onenter,
                        check_focus=check_focus)