Exemple #1
0
 def click_agregar(self):
     id = self.ui.id_lineEdit.text()
     origen_x = self.ui.origenx_spinBox.value()
     origen_y = self.ui.origeny_spinBox.value()
     destino_x = self.ui.destinox_spinBox.value()
     destino_y = self.ui.destinoy_spinBox.value()
     velocidad = self.ui.spinBox.value()
     red = self.ui.red_spinBox.value()
     green = self.ui.green_spinBox.value()
     blue = self.ui.blue_spinBox.value()
     distancia = self.ui.distancia_doubleSpinBox
     particula = Particula(id , origen_x , origen_y , destino_x , destino_y , velocidad , red , green , blue , distancia )
     self.administrar.agregar_final(particula)
 def click_agregar_inicio(self):
     id = int(self.ui.id_lineEdit.text())
     origen_x = int(self.ui.origenx_spinBox.value())
     origen_y = self.ui.origeny_spinBox.value()
     destino_x = self.ui.destinox_spinBox.value()
     destino_y = self.ui.destinoy_spinBox.value()
     velocidad = self.ui.spinBox.value()
     red = self.ui.red_spinBox.value()
     green = self.ui.green_spinBox.value()
     blue = self.ui.blue_spinBox.value()
     particula = Particula(id, origen_x, origen_y, destino_x, destino_y,
                           velocidad, red, green, blue)
     self.administrar.agregar_inicio(particula)