示例#1
0
 def mostrar_ventana_hijo(self):
     """Show child window with selected unit converter"""
     indice = self.lista.currentRow()
     if unidades._all[indice].__name__ == "Currency":
         dialog = moneda()
     else:
         dialog = UI_conversorUnidades(unidades._all[indice])
     dialog.exec_()
示例#2
0
 def unidades_clicked(self):
     if self.magnitud == "Currency":
         dialog = moneda(self.value)
     else:
         dialog = UI_conversorUnidades(self.unidad, self.value)
     if dialog.exec_() and self.retornar:
         self.entrada.setText(representacion(dialog.value.config(self.UIconfig)) + self.suffix)
         oldvalue = self.value
         self.value = dialog.value
         if oldvalue != self.value:
             self.valueChanged.emit(self.value)
示例#3
0
 def unidades_clicked(self):
     if self.magnitud == "Currency":
         dialog = moneda(self.value)
     else:
         dialog = UI_conversorUnidades(self.unidad, self.value)
     if dialog.exec_() and self.retornar:
         self.entrada.setText(
             representacion(dialog.value.config(self.UIconfig)) +
             self.suffix)
         oldvalue = self.value
         self.value = dialog.value
         if oldvalue != self.value:
             self.valueChanged.emit(self.value)