Ejemplo n.º 1
0
class PIDWidgetController(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self)

        self.ui = Ui_PIDWidget()
        self.ui.setupUi(self)

        self.p_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.p_line)
        self.i_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.i_line)
        self.d_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.d_line)

        self.set_edit_box_enabled(False)

    def show_i_line(self):
        self.i_line.show()

    def hide_i_line(self):
        self.i_line.hide()

    def show_d_line(self):
        self.d_line.show()

    def hide_d_line(self):
        self.d_line.hide()

    def set_edit_box_enabled(self, enabled):
        self.p_line.ui.edit_box.setEnabled(enabled)
        self.i_line.ui.edit_box.setEnabled(enabled)
        self.d_line.ui.edit_box.setEnabled(enabled)
Ejemplo n.º 2
0
 def __init__(self):
     QtGui.QWidget.__init__(self)
     
     self.ui = Ui_PIDWidget()
     self.ui.setupUi(self)
     
     self._line = ConfigSingleLineWidgetController()
     self.ui.main_layout.addWidget(self._line)
Ejemplo n.º 3
0
    def __init__(self):
        QtGui.QWidget.__init__(self)

        self.ui = Ui_PIDWidget()
        self.ui.setupUi(self)

        self.p_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.p_line)
        self.i_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.i_line)
        self.d_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.d_line)

        self.set_edit_box_enabled(False)
    def __init__(self):
        QtGui.QWidget.__init__(self)

        self.ui = Ui_PIDWidget()
        self.ui.setupUi(self)

        self._line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self._line)
Ejemplo n.º 5
0
class ConfigSingleLinePanelController(QtGui.QWidget):

    def __init__(self):
        QtGui.QWidget.__init__(self)
        
        self.ui = Ui_PIDWidget()
        self.ui.setupUi(self)
        
        self._line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self._line)
        
    def set_different(self):
        self._line.set_different()
         
    def set_same(self):
        self._line.set_same()
        
    def set_value(self, value):
        self._line.set_value(value)
        
    def set_title(self, title):
        self.ui.title_label.setText(title)

    def set_line_description(self, description):
        self._line.set_title(description)
                
    def set_bounds(self,min_value, max_value):
        self._line.set_bounds(min_value, max_value)
        
    def set_default(self, default):
        self._line.set_default(default)
        
    def get_value(self):
        return self._line.get_value()
    
    def set_edit_box_enabled(self,enabled):
        self._line.set_edit_box_enabled(enabled)
        
    def reset_default(self):
        self._line.reset_default()
class ConfigSingleLinePanelController(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self)

        self.ui = Ui_PIDWidget()
        self.ui.setupUi(self)

        self._line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self._line)

    def set_different(self):
        self._line.set_different()

    def set_same(self):
        self._line.set_same()

    def set_value(self, value):
        self._line.set_value(value)

    def set_title(self, title):
        self.ui.title_label.setText(title)

    def set_line_description(self, description):
        self._line.set_title(description)

    def set_bounds(self, min_value, max_value):
        self._line.set_bounds(min_value, max_value)

    def set_default(self, default):
        self._line.set_default(default)

    def get_value(self):
        return self._line.get_value()

    def set_edit_box_enabled(self, enabled):
        self._line.set_edit_box_enabled(enabled)

    def reset_default(self):
        self._line.reset_default()
class PIDWidgetController(QtGui.QWidget):


    def __init__(self):
        QtGui.QWidget.__init__(self)
        
        self.ui = Ui_PIDWidget()
        self.ui.setupUi(self)
        
        self.p_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.p_line)
        self.i_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.i_line)
        self.d_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.d_line)
        
        self.set_edit_box_enabled(False)
        
        
    def show_i_line(self):
        self.i_line.show()
        
    def hide_i_line(self):
        self.i_line.hide()
        
    def show_d_line(self):
        self.d_line.show()
        
    def hide_d_line(self):
        self.d_line.hide()
        
    def set_edit_box_enabled(self,enabled):
        self.p_line.ui.edit_box.setEnabled(enabled)
        self.i_line.ui.edit_box.setEnabled(enabled)
        self.d_line.ui.edit_box.setEnabled(enabled)
        
        
        
 def __init__(self):
     QtGui.QWidget.__init__(self)
     
     self.ui = Ui_PIDWidget()
     self.ui.setupUi(self)
     
     self.p_line = ConfigSingleLineWidgetController()
     self.ui.main_layout.addWidget(self.p_line)
     self.i_line = ConfigSingleLineWidgetController()
     self.ui.main_layout.addWidget(self.i_line)
     self.d_line = ConfigSingleLineWidgetController()
     self.ui.main_layout.addWidget(self.d_line)
     
     self.set_edit_box_enabled(False)
Ejemplo n.º 9
0
class PIDWidgetController(QtGui.QWidget):
    def __init__(self):
        QtGui.QWidget.__init__(self)

        self.ui = Ui_PIDWidget()
        self.ui.setupUi(self)

        self.p_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.p_line)
        self.i_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.i_line)
        self.d_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.d_line)

        self.p_line.ui.edit_box.setSingleStep(0.01)
        self.i_line.ui.edit_box.setSingleStep(0.01)
        self.d_line.ui.edit_box.setSingleStep(0.01)

        self.set_edit_box_enabled(False)

    def show_i_line(self):
        self.i_line.show()

    def hide_i_line(self):
        self.i_line.hide()

    def show_d_line(self):
        self.d_line.show()

    def hide_d_line(self):
        self.d_line.hide()

    def set_edit_box_enabled(self, enabled):
        self.p_line.set_edit_box_enabled(enabled)
        self.i_line.set_edit_box_enabled(enabled)
        self.d_line.set_edit_box_enabled(enabled)

    def set_title(self, title):
        self.ui.title_label.setText(title)

    def set_p_title(self, title):
        self.p_line.set_title(title)

    def set_i_title(self, title):
        self.i_line.set_title(title)

    def set_d_title(self, title):
        self.d_line.set_title(title)

    def set_default(self, pid_data):
        self.p_line.set_default(pid_data.get_p())
        self.i_line.set_default(pid_data.get_i())
        self.d_line.set_default(pid_data.get_d())

    def set_current_pid(self, pid_data):
        self.p_line.set_value(pid_data.get_p())
        self.i_line.set_value(pid_data.get_i())
        self.d_line.set_value(pid_data.get_d())

    def get_current_pid(self):
        return PIDData(self.p_line.get_value(), self.i_line.get_value(),
                       self.d_line.get_value())

    def set_p_different(self):
        self.p_line.set_different()

    def set_i_different(self):
        self.i_line.set_different()

    def set_d_different(self):
        self.d_line.set_different()

    def set_p_bounds(self, min_value, max_value):
        self.p_line.set_bounds(min_value, max_value)

    def set_i_bounds(self, min_value, max_value):
        self.i_line.set_bounds(min_value, max_value)

    def set_d_bounds(self, min_value, max_value):
        self.d_line.set_bounds(min_value, max_value)

    def reset_default(self):
        self.p_line.reset_default()
        self.i_line.reset_default()
        self.d_line.reset_default()
class PIDWidgetController(QtGui.QWidget):

    def __init__(self):
        QtGui.QWidget.__init__(self)
        
        self.ui = Ui_PIDWidget()
        self.ui.setupUi(self)
        
        self.p_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.p_line)
        self.i_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.i_line)
        self.d_line = ConfigSingleLineWidgetController()
        self.ui.main_layout.addWidget(self.d_line)
        
        self.p_line.ui.edit_box.setSingleStep(0.01)
        self.i_line.ui.edit_box.setSingleStep(0.01)
        self.d_line.ui.edit_box.setSingleStep(0.01)
        
        self.set_edit_box_enabled(False)
        
    def show_i_line(self):
        self.i_line.show()
        
    def hide_i_line(self):
        self.i_line.hide()
        
    def show_d_line(self):
        self.d_line.show()
        
    def hide_d_line(self):
        self.d_line.hide()
        
    def set_edit_box_enabled(self,enabled):
        self.p_line.set_edit_box_enabled(enabled)
        self.i_line.set_edit_box_enabled(enabled)
        self.d_line.set_edit_box_enabled(enabled)
        
    def set_title(self, title):
        self.ui.title_label.setText(title)
        
    def set_p_title(self, title):
        self.p_line.set_title(title)
        
    def set_i_title(self, title):
        self.i_line.set_title(title)

    def set_d_title(self, title):
        self.d_line.set_title(title)

    def set_default(self, pid_data):
        self.p_line.set_default(pid_data.get_p())
        self.i_line.set_default(pid_data.get_i())
        self.d_line.set_default(pid_data.get_d())
        
    def set_current_pid(self, pid_data):
        self.p_line.set_value(pid_data.get_p())
        self.i_line.set_value(pid_data.get_i())
        self.d_line.set_value(pid_data.get_d())
    
    def get_current_pid(self):
        return PIDData(self.p_line.get_value(), self.i_line.get_value(), self.d_line.get_value())
        
    def set_p_different(self):
        self.p_line.set_different()
        
    def set_i_different(self):
        self.i_line.set_different()

    def set_d_different(self):
        self.d_line.set_different()
        
    def set_p_bounds(self, min_value, max_value):
        self.p_line.set_bounds(min_value,max_value)
        
    def set_i_bounds(self, min_value, max_value):
        self.i_line.set_bounds(min_value,max_value)
        
    def set_d_bounds(self, min_value, max_value):
        self.d_line.set_bounds(min_value,max_value)
        
    def reset_default(self):
        self.p_line.reset_default()
        self.i_line.reset_default()
        self.d_line.reset_default()