示例#1
0
 def __on_config_change(self, widget, data = None):
     if data == 0:
         def_ = self.__file_default.read('list', 'cameras', 'config')
         self.__adjustment_ker.set_value(def_[0])
         self.__adjustment_sig.set_value(def_[1])
         self.__combo_type.set_active(def_[2])
         self.__adjustment_mor.set_value(def_[3]) 
         self.__combo_contour.set_active(def_[4])
         self.__adjustment_ord.set_value(def_[5]) 
         self.__adjustment_fre.set_value(def_[6]) 
         self.__adjustment_min.set_value(def_[7])
         self.__actual_config = def_
         self.__update = [True, True, True]
         for check in self.__checks_region:
             check.set_active(False)
         return
     elif data == 1:
         temp = self.__spin_blur.get_value_as_int()
     elif data == 2:
         temp = int(self.__range_sigma.get_value())
     elif data == 3:
         temp = self.__combo_type.get_active()
     elif data == 4:
         temp = self.__spin_morph.get_value_as_int()
     elif data == 5:
         temp = self.__combo_contour.get_active()
     elif data == 6:
         temp = self.__spin_order.get_value_as_int()
     elif data == 7:
         temp = self.__range_freq.get_value()
     elif data == 8:
         temp = self.__spin_minim.get_value_as_int()
     self.__update = [(data < 4), ((data < 6) & (data >= 4)), (data >= 6)]
     self.__actual_config[data-1] = temp
     return
示例#2
0
 def reset(self):
     self.__on_config_change(None, 0)
     for check, button in zip(self.__checks_region, self.__buttons_region):
         check.set_active(False)
         button.set_active(False)
     self.__request_draw = [False, 0]
     self.__set_icon('all', False)
     self.event_rubberArea.reset()
     return