def connect_or_disconnect_signals(self, isConnect):
        """
        Connect or disconnect widget signals sent to their slot methods.
        This can be overridden in subclasses. By default it does nothing.
        @param isConnect: If True the widget will send the signals to the slot
                          method.
        @type  isConnect: boolean
        """
        if isConnect:
            change_connect = self.win.connect
        else:
            change_connect = self.win.disconnect

        MotorPropertyManager.connect_or_disconnect_signals(self, isConnect)

        change_connect(self.directionPushButton,
                     SIGNAL("clicked()"),
                     self.reverse_direction)
        change_connect(self.motorLengthDblSpinBox,
                     SIGNAL("valueChanged(double)"),
                     self.change_motor_size)
        change_connect(self.motorWidthDblSpinBox,
                     SIGNAL("valueChanged(double)"),
                     self.change_motor_size)
        change_connect(self.spokeRadiusDblSpinBox,
                     SIGNAL("valueChanged(double)"),
                     self.change_motor_size)
        change_connect(self.motorColorComboBox,
                       SIGNAL("editingFinished()"),
                       self.change_jig_color)
        return
示例#2
0
    def connect_or_disconnect_signals(self, isConnect):
        """
        Connect or disconnect widget signals sent to their slot methods.
        This can be overridden in subclasses. By default it does nothing.
        @param isConnect: If True the widget will send the signals to the slot
                          method.
        @type  isConnect: boolean
        """
        if isConnect:
            change_connect = self.win.connect
        else:
            change_connect = self.win.disconnect

        MotorPropertyManager.connect_or_disconnect_signals(self, isConnect)

        change_connect(self.directionPushButton, SIGNAL("clicked()"),
                       self.reverse_direction)
        change_connect(self.motorLengthDblSpinBox,
                       SIGNAL("valueChanged(double)"), self.change_motor_size)
        change_connect(self.motorWidthDblSpinBox,
                       SIGNAL("valueChanged(double)"), self.change_motor_size)
        change_connect(self.spokeRadiusDblSpinBox,
                       SIGNAL("valueChanged(double)"), self.change_motor_size)
        change_connect(self.motorColorComboBox, SIGNAL("editingFinished()"),
                       self.change_jig_color)
        return
示例#3
0
    def __init__(self, win, motorEditCommand):
        """
        Construct the Linear Motor Property Manager.
        """

        MotorPropertyManager.__init__(self, win, motorEditCommand)
        return
 def __init__(self, win, motorEditCommand):
     """
     Construct the Rotary Motor Property Manager.    
     """
             
     MotorPropertyManager.__init__( self, 
                                    win,
                                    motorEditCommand) 
     return