Пример #1
0
    def __init__(self, entrada=None, parent=None):
        """entrada: Parametro opcional de clase corriente que indica la corriente de entrada en kla tubería"""
        super(UI_equipment, self).__init__(Filter, entrada=False, parent=parent)
        self.entrada=entrada

        #Pestaña entrada
        self.Entrada= UI_corriente.Ui_corriente(entrada)
        self.Entrada.Changed.connect(self.cambiar_entrada)
        self.tabWidget.insertTab(0, self.Entrada, QtWidgets.QApplication.translate("equipment", "Entrada", None))

        #Pestaña calculo
        gridLayout_Calculo = QtWidgets.QGridLayout(self.tabCalculo)

        #Pestaña costos
        gridLayout_Costos = QtWidgets.QGridLayout(self.tabCostos)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Tipo:", None)), 1, 0, 1, 1)
        self.tipo=QtWidgets.QComboBox()
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Rotary vacuum belt discharge", None))
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Rotary vacuum drum scraper discharge", None))
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Rotary vacuum disk", None))
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Horizontal vacuum belt", None))
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Pressure leaf", None))
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Plate and frame", None))
        self.tipo.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.tipo, 1, 1, 1, 3)
        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(10,10,QtWidgets.QSizePolicy.Fixed,QtWidgets.QSizePolicy.Fixed),2,0,1,2)

        self.Costos=costIndex.CostData(1.3, 2)
        self.Costos.valueChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.Costos,4,0,2,5)

        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(20,20,QtWidgets.QSizePolicy.Expanding,QtWidgets.QSizePolicy.Expanding),6,0,1,6)
        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(20,20,QtWidgets.QSizePolicy.Expanding,QtWidgets.QSizePolicy.Expanding),10,0,1,6)
        self.groupBox_Costos = QtWidgets.QGroupBox(QtWidgets.QApplication.translate("equipment", "Costos calculados", None))
        gridLayout_Costos.addWidget(self.groupBox_Costos,7,0,1,4)
        gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_Costos)
        gridLayout_5.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Coste Adquisición:", None)),1,1)
        self.C_adq=Entrada_con_unidades(unidades.Currency, retornar=False, readOnly=True)
        gridLayout_5.addWidget(self.C_adq,1,2)
        gridLayout_5.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Coste Instalación:", None)),2,1)
        self.C_inst=Entrada_con_unidades(unidades.Currency, retornar=False, readOnly=True)
        gridLayout_5.addWidget(self.C_inst,2,2)


        #Pestaña salida
        self.SalidaGas= UI_corriente.Ui_corriente(readOnly=True)
        self.SalidaSolido= UI_corriente.Ui_corriente(readOnly=True)
        self.Salida.addTab(self.SalidaGas,QtWidgets.QApplication.translate("equipment", "Gas filtrado", None))
        self.Salida.addTab(self.SalidaSolido,QtWidgets.QApplication.translate("equipment", "Sólidos recogidos", None))

        self.tabWidget.setCurrentIndex(0)
Пример #2
0
    def __init__(self, entrada=None, parent=None):
        """entrada: Parametro opcional de clase corriente que indica la corriente de entrada en kla tubería"""
        super(UI_equipment, self).__init__(Tank, entrada=False, salida=False, parent=parent)
        self.entrada=entrada

        #Pestaña entrada
        self.Entrada= UI_corriente.Ui_corriente(entrada)
        self.Entrada.Changed.connect(self.cambiar_entrada)
        self.tabWidget.insertTab(0, self.Entrada,QtWidgets.QApplication.translate("equipment", "Entrada", None))

        #Pestaña calculo
        gridLayout_Calculo = QtWidgets.QGridLayout(self.tabCalculo)


        #Pestaña costos
        gridLayout_Costos = QtWidgets.QGridLayout(self.tabCostos)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Material:", None)), 1, 1, 1, 1)
        self.material=QtWidgets.QComboBox()
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Acero al carbon", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Acero inoxidable 316", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Acero inoxidable 304", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Acero inoxidable 347", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Niquel", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Monel", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Inconel", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Zirconio", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Titanio", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Ladrillo y caucho o ladrillo y acero recubierto de poliester", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Caucho o acero recubierto de plomo", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Poliester reforzado con fiberglass", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Aluminio", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Cobre", None))
        self.material.addItem(QtWidgets.QApplication.translate("equipment", "Hormigón", None))
        self.material.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.material, 1, 2, 1, 4)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Densidad:", None)), 2, 4, 1, 1)
        self.Densidad=Entrada_con_unidades(unidades.Density, "DenLiq")
        gridLayout_Costos.addWidget(self.Densidad,2,5,1,1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Diametro:", None)), 2, 1, 1, 1)
        self.Diametro=Entrada_con_unidades(unidades.Length)
        gridLayout_Costos.addWidget(self.Diametro,2,2,1,1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Longitud:", None)), 3, 1, 1, 1)
        self.Longitud=Entrada_con_unidades(unidades.Length)
        gridLayout_Costos.addWidget(self.Longitud,3,2,1,1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Espesor:", None)), 4, 1, 1, 1)
        self.Espesor=Entrada_con_unidades(unidades.Length, "Thickness")
        gridLayout_Costos.addWidget(self.Espesor,4,2,1,1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Cabeza:", None)), 5, 1, 1, 1)
        self.Cabeza=QtWidgets.QComboBox()
        self.Cabeza.addItem(QtWidgets.QApplication.translate("equipment", "Elipsoidal", None))
        self.Cabeza.addItem(QtWidgets.QApplication.translate("equipment", "Semiesférico", None))
        self.Cabeza.addItem(QtWidgets.QApplication.translate("equipment", "Bumped", None))
        self.Cabeza.addItem(QtWidgets.QApplication.translate("equipment", "Liso", None))
        self.Cabeza.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.Cabeza, 5, 2, 1, 1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Espesor (cabeza):", None)), 6, 1, 1, 1)
        self.EspesorCabeza=Entrada_con_unidades(unidades.Length, "Thickness")
        gridLayout_Costos.addWidget(self.EspesorCabeza,6,2,1,1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Longitud reborde recto:", None)), 7, 1, 1, 1)
        self.LongitudReborde=Entrada_con_unidades(unidades.Length)
        gridLayout_Costos.addWidget(self.LongitudReborde,7,2,1,1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Volumen:", None)), 6, 4, 1, 1)
        self.Volumen=Entrada_con_unidades(unidades.Volume, "VolLiq", readOnly=True)
        gridLayout_Costos.addWidget(self.Volumen,6,5,1,1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Peso:", None)), 7, 4, 1, 1)
        self.Peso=Entrada_con_unidades(unidades.Mass, readOnly=True)
        gridLayout_Costos.addWidget(self.Peso,7,5,1,1)
        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(10,10,QtWidgets.QSizePolicy.Fixed,QtWidgets.QSizePolicy.Fixed),2,3,6,1)
        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(20,20,QtWidgets.QSizePolicy.Expanding,QtWidgets.QSizePolicy.Expanding),8,0,1,6)

        self.Costos=costIndex.CostData(1.7, 3)
        self.Costos.valueChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.Costos,9,1,2,5)

        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(20,20,QtWidgets.QSizePolicy.Expanding,QtWidgets.QSizePolicy.Expanding),11,0,1,6)
        self.groupBox_Costos = QtWidgets.QGroupBox(QtWidgets.QApplication.translate("equipment", "Costos calculados", None))
        gridLayout_Costos.addWidget(self.groupBox_Costos,12,1,1,5)
        gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_Costos)
        gridLayout_5.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Coste Adquisición:", None)),0,1,1,1)
        self.C_adq=Entrada_con_unidades(unidades.Currency, retornar=False, readOnly=True, tolerancia=8, decimales=2)
        gridLayout_5.addWidget(self.C_adq,0,2,1,1)
        gridLayout_5.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Coste Instalación:", None)),1,1,1,1)
        self.C_inst=Entrada_con_unidades(unidades.Currency, retornar=False, readOnly=True, tolerancia=8, decimales=2)
        gridLayout_5.addWidget(self.C_inst,1,2,1,1)
        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(20,20,QtWidgets.QSizePolicy.Expanding,QtWidgets.QSizePolicy.Expanding),13,0,1,6)

        #Pestaña salida
        self.Salida= UI_corriente.Ui_corriente(readOnly=True)
        self.tabWidget.insertTab(2, self.Salida,QtWidgets.QApplication.translate("equipment", "Salida", None))

        self.tabWidget.setCurrentIndex(0)
Пример #3
0
    def __init__(self, entrada=None, parent=None):
        """entrada: Parametro opcional de clase corriente que indica la corriente de entrada en el equipo"""
        super(UI_equipment, self).__init__(Crystallizer, entrada=False, parent=parent)
        self.entrada=entrada

        #Pestaña entrada
        self.Entrada= UI_corriente.Ui_corriente(entrada)
        self.Entrada.Changed.connect(self.cambiar_entrada)
        self.tabWidget.insertTab(0, self.Entrada,QtWidgets.QApplication.translate("equipment", "Entrada", None))

        #Pestaña calculo
        gridLayout_Calculo = QtWidgets.QGridLayout(self.tabCalculo)

        #Pestaña costos
        gridLayout_Costos = QtWidgets.QGridLayout(self.tabCostos)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Tipo:", None)), 1, 1)
        self.tipo=QtWidgets.QComboBox()
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Recirculación externa forzada", None))
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Internos de tubo forzado", None))
        self.tipo.addItem(QtWidgets.QApplication.translate("equipment", "Discontinuos a vacío", None))
        self.tipo.currentIndexChanged.connect(self.mostrarSubclasificacion)
        self.tipo.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.tipo, 1, 2, 1, 3)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Material:", None)), 2, 1)
        self.materialvacio=QtWidgets.QComboBox()
        self.materialvacio.addItem(QtWidgets.QApplication.translate("equipment", "Acero dulce", None))
        self.materialvacio.addItem(QtWidgets.QApplication.translate("equipment", "Acero recubierto de caucho", None))
        self.materialvacio.addItem(QtWidgets.QApplication.translate("equipment", "Acero inoxidable 304", None))
        self.materialvacio.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.materialvacio, 2, 2, 1, 3)
        self.materialotros=QtWidgets.QComboBox()
        self.materialotros.addItem(QtWidgets.QApplication.translate("equipment", "Acero dulce", None))
        self.materialotros.addItem(QtWidgets.QApplication.translate("equipment", "Acero inoxidable 304", None))
        self.materialotros.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.materialotros, 2, 2, 1, 3)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Volumen:", None)), 4, 4)
        self.Volumen=Entrada_con_unidades(unidades.Volume, "VolLiq", width=80)
        gridLayout_Costos.addWidget(self.Volumen,4,5,1,1)
        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(10,10,QtWidgets.QSizePolicy.Fixed,QtWidgets.QSizePolicy.Fixed),3,0,1,6)
        self.label4=QtWidgets.QLabel()
        self.label4.setText(QtWidgets.QApplication.translate("equipment", "Caudal calculado:", None))
        gridLayout_Costos.addWidget(self.label4, 4, 1, 1, 1)
        self.caudalcalculado=Entrada_con_unidades(unidades.MassFlow, readOnly=True, retornar=False)
        gridLayout_Costos.addWidget(self.caudalcalculado,4,2,1,1)
        gridLayout_Costos.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Caudal de diseño:", None)), 5, 1)
        self.caudaldiseno=Entrada_con_unidades(unidades.MassFlow)
        gridLayout_Costos.addWidget(self.caudaldiseno,5,2,1,1)
        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(10,10,QtWidgets.QSizePolicy.Fixed,QtWidgets.QSizePolicy.Fixed),6,0,1,6)

        self.Costos=costIndex.CostData(1.9, 2)
        self.Costos.valueChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.Costos,7,1,2,5)

        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(20,20,QtWidgets.QSizePolicy.Expanding,QtWidgets.QSizePolicy.Expanding),11,0,1,6)
        gridLayout_Costos.addItem(QtWidgets.QSpacerItem(20,20,QtWidgets.QSizePolicy.Expanding,QtWidgets.QSizePolicy.Expanding),9,0,1,6)
        self.groupBox_Costos = QtWidgets.QGroupBox(QtWidgets.QApplication.translate("equipment", "Costos calculados", None))
        gridLayout_Costos.addWidget(self.groupBox_Costos,10,1,1,5)
        gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_Costos)
        gridLayout_5.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Coste Adquisición:", None)),0,1,1,1)
        self.C_adq=Entrada_con_unidades(unidades.Currency, retornar=False, readOnly=True)
        gridLayout_5.addWidget(self.C_adq,0,2,1,1)
        gridLayout_5.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate("equipment", "Coste Instalación:", None)),1,1,1,1)
        self.C_inst=Entrada_con_unidades(unidades.Currency, retornar=False, readOnly=True)
        gridLayout_5.addWidget(self.C_inst,1,2,1,1)

        self.tabWidget.setCurrentIndex(0)
        self.mostrarSubclasificacion(0)
Пример #4
0
    def __init__(self, entrada=None, parent=None):
        """entrada: Parametro opcional de clase corriente que indica la corriente de entrada en kla tubería"""
        super(UI_equipment, self).__init__(Centrifuge,
                                           entrada=False,
                                           parent=parent)
        self.entrada = entrada

        #Pestaña entrada
        self.Entrada = UI_corriente.Ui_corriente(entrada)
        self.Entrada.Changed.connect(self.cambiar_entrada)
        self.tabWidget.insertTab(
            0, self.Entrada,
            QtWidgets.QApplication.translate("equipment", "Entrada", None))

        #Pestaña calculo
        gridLayout_Calculo = QtWidgets.QGridLayout(self.tabCalculo)

        #Pestaña costos
        gridLayout_Costos = QtWidgets.QGridLayout(self.tabCostos)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Tipo:", None)),
            1, 1, 1, 1)
        self.tipo = QtWidgets.QComboBox()
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "Proceso inorgánico",
                                             None))
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "Proceso orgánico",
                                             None))
        self.tipo.currentIndexChanged.connect(self.mostrarSubclasificacion)
        self.tipo.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.tipo, 1, 2, 1, 1)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Material:",
                                                 None)), 2, 1, 1, 1)
        self.materialInorganico = QtWidgets.QComboBox()
        self.materialInorganico.addItem(
            QtWidgets.QApplication.translate("equipment", "Acero al carbón",
                                             None))
        self.materialInorganico.addItem(
            QtWidgets.QApplication.translate("equipment",
                                             "Acero inoxidable 316", None))
        self.materialInorganico.addItem(
            QtWidgets.QApplication.translate("equipment", "Monel", None))
        self.materialInorganico.addItem(
            QtWidgets.QApplication.translate("equipment", "Níquel", None))
        self.materialInorganico.currentIndexChanged.connect(
            self.calcularCostos)
        gridLayout_Costos.addWidget(self.materialInorganico, 2, 2, 1, 1)
        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Fixed,
                                  QtWidgets.QSizePolicy.Fixed), 3, 0, 1, 2)
        self.materialOrganico = QtWidgets.QComboBox()
        self.materialOrganico.addItem(
            QtWidgets.QApplication.translate("equipment", "Acero al carbón",
                                             None))
        self.materialOrganico.addItem(
            QtWidgets.QApplication.translate("equipment",
                                             "Acero inoxidable 316", None))
        self.materialOrganico.addItem(
            QtWidgets.QApplication.translate("equipment", "Monel", None))
        self.materialOrganico.addItem(
            QtWidgets.QApplication.translate("equipment", "Níquel", None))
        self.materialOrganico.addItem(
            QtWidgets.QApplication.translate("equipment", "Hastelloy", None))
        self.materialOrganico.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.materialOrganico, 2, 2, 1, 1)
        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Fixed,
                                  QtWidgets.QSizePolicy.Fixed), 3, 0, 1, 6)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Caudal calculado:", None)),
            4, 1, 1, 1)
        self.caudalcalculado = Entrada_con_unidades(unidades.MassFlow,
                                                    readOnly=True,
                                                    retornar=False)
        gridLayout_Costos.addWidget(self.caudalcalculado, 4, 2, 1, 1)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Caudal de diseño:", None)),
            5, 1, 1, 1)
        self.caudaldiseno = Entrada_con_unidades(unidades.MassFlow)
        gridLayout_Costos.addWidget(self.caudaldiseno, 5, 2, 1, 1)
        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Fixed,
                                  QtWidgets.QSizePolicy.Fixed), 6, 0, 1, 6)

        self.Costos = costIndex.CostData(1.3, 2)
        self.Costos.valueChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.Costos, 7, 1, 2, 2)

        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Expanding), 9, 0, 1, 6)
        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Expanding), 11, 0, 1,
            6)
        self.groupBox_Costos = QtWidgets.QGroupBox(
            QtWidgets.QApplication.translate("equipment", "Costos calculados",
                                             None))
        gridLayout_Costos.addWidget(self.groupBox_Costos, 10, 0, 1, 6)
        gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_Costos)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Coste Adquisición:", None)),
            0, 1, 1, 1)
        self.C_adq = Entrada_con_unidades(unidades.Currency,
                                          retornar=False,
                                          readOnly=True)
        gridLayout_5.addWidget(self.C_adq, 0, 2, 1, 1)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Coste Instalación:", None)),
            1, 1, 1, 1)
        self.C_inst = Entrada_con_unidades(unidades.Currency,
                                           retornar=False,
                                           readOnly=True)
        gridLayout_5.addWidget(self.C_inst, 1, 2, 1, 1)

        self.tabWidget.setCurrentIndex(0)
        self.mostrarSubclasificacion(0)
Пример #5
0
    def __init__(self, entrada=None, parent=None):
        """entrada: Parametro opcional de clase corriente que indica la corriente de entrada en kla tubería"""
        super(UI_equipment, self).__init__(Tower, parent=parent)
        self.entrada = entrada

        #        #Pestaña entrada
        #        self.Entrada= UI_corriente.Ui_corriente(entrada)
        #        self.Entrada.Changed.connect(self.cambiar_entrada)
        #        self.tabWidget.addTab(self.Entrada, QtGui.QApplication.translate("equipment", "Entrada", None, QtGui.QApplication.UnicodeUTF8))

        #Pestaña calculo
        gridLayout_Calculo = QtWidgets.QGridLayout(self.tabCalculo)

        #Pestaña costos
        gridLayout_Costos = QtWidgets.QGridLayout(self.tabCostos)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Proceso:",
                                                 None)), 1, 1, 1, 1)
        self.proceso = QtWidgets.QComboBox()
        self.proceso.addItem(
            QtWidgets.QApplication.translate("equipment", "Destilación", None))
        self.proceso.addItem(
            QtWidgets.QApplication.translate("equipment", "Absorción", None))
        self.proceso.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.proceso, 1, 2, 1, 1)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Tipo de columna:", None)), 2,
            1, 1, 1)
        self.tipo = QtWidgets.QComboBox()
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "De pisos", None))
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "De relleno", None))
        self.tipo.currentIndexChanged.connect(self.mostrarSubclasificacion)
        self.tipo.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.tipo, 2, 2, 1, 1)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Material:",
                                                 None)), 3, 1, 1, 1)
        self.material = QtWidgets.QComboBox()
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment", "Acero al carbon",
                                             None))
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment",
                                             "Acero inoxidable 304", None))
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment",
                                             "Acero inoxidable 316", None))
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment", "Carpenter 20CB-3",
                                             None))
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment", "Niquel 200", None))
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment", "Monel 400", None))
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment", "Inconel 600", None))
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment", "Incoloy 825", None))
        self.material.addItem(
            QtWidgets.QApplication.translate("equipment", "Titanio", None))
        self.material.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.material, 3, 2, 1, 1)

        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(30, 30, QtWidgets.QSizePolicy.Fixed,
                                  QtWidgets.QSizePolicy.Fixed), 1, 3, 5, 1)

        self.groupBox_Pisos = QtWidgets.QGroupBox(
            QtWidgets.QApplication.translate("equipment", "Torre de pisos",
                                             None))
        gridLayout_Costos.addWidget(self.groupBox_Pisos, 1, 4, 4, 2)
        gridLayout_1 = QtWidgets.QGridLayout(self.groupBox_Pisos)
        gridLayout_1.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Tipo:", None)),
            1, 1, 1, 1)
        self.tipoPisos = QtWidgets.QComboBox()
        self.tipoPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "De válvula", None))
        self.tipoPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "De rejilla", None))
        self.tipoPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "De borboteo", None))
        self.tipoPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "De tamiz", None))
        self.tipoPisos.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_1.addWidget(self.tipoPisos, 1, 2, 1, 1)
        gridLayout_1.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Material:",
                                                 None)), 2, 1, 1, 1)
        self.materialPisos = QtWidgets.QComboBox()
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "Acero al carbon",
                                             None))
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment",
                                             "Acero inoxidable 304", None))
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment",
                                             "Acero inoxidable 316", None))
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "Carpenter 20CB-3",
                                             None))
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "Niquel 200", None))
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "Monel 400", None))
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "Inconel 600", None))
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "Incoloy 825", None))
        self.materialPisos.addItem(
            QtWidgets.QApplication.translate("equipment", "Titanio", None))
        self.materialPisos.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_1.addWidget(self.materialPisos, 2, 2, 1, 1)
        gridLayout_1.addItem(
            QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Fixed,
                                  QtWidgets.QSizePolicy.Fixed), 3, 1, 1, 2)
        gridLayout_1.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Diametro:",
                                                 None)), 4, 1, 1, 1)
        self.diametroPisos = Entrada_con_unidades(unidades.Length)
        gridLayout_1.addWidget(self.diametroPisos, 4, 2, 1, 1)
        gridLayout_1.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Número:",
                                                 None)), 5, 1, 1, 1)
        self.NumeroPisos = Entrada_con_unidades(int,
                                                spinbox=True,
                                                min=1,
                                                step=1,
                                                width=50)
        gridLayout_1.addWidget(self.NumeroPisos, 5, 2, 1, 1)
        gridLayout_1.addItem(
            QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Fixed,
                                  QtWidgets.QSizePolicy.Fixed), 6, 1, 1, 2)

        self.groupBox_relleno = QtWidgets.QGroupBox(
            QtWidgets.QApplication.translate("equipment", "Torre de relleno",
                                             None))
        gridLayout_Costos.addWidget(self.groupBox_relleno, 1, 4, 4, 2)
        gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_relleno)
        gridLayout_2.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Volumen:",
                                                 None)), 1, 1, 1, 1)
        self.VolumenRelleno = Entrada_con_unidades(unidades.Volume, "VolLiq")
        gridLayout_2.addWidget(self.VolumenRelleno, 1, 2, 1, 1)
        gridLayout_2.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Coste unitario:", None)), 2,
            1, 1, 1)
        self.C_unit_relleno = Entrada_con_unidades(
            unidades.Currency,
            retornar=False,
            textounidad="%s / %s" % (unidades.Currency(None).text(),
                                     unidades.Volume(None).text("VolLiq")))
        gridLayout_2.addWidget(self.C_unit_relleno, 2, 2, 1, 1)
        gridLayout_2.addItem(
            QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Fixed,
                                  QtWidgets.QSizePolicy.Fixed), 3, 1, 1, 2)

        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Diametro:",
                                                 None)), 5, 1, 1, 1)
        self.Dc = Entrada_con_unidades(unidades.Length)
        gridLayout_Costos.addWidget(self.Dc, 5, 2, 1, 2)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Altura:",
                                                 None)), 6, 1, 1, 1)
        self.Hc = Entrada_con_unidades(unidades.Length)
        gridLayout_Costos.addWidget(self.Hc, 6, 2, 1, 2)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Espesor (Tapa):", None)), 7,
            1, 1, 1)
        self.EspesorSuperior = Entrada_con_unidades(unidades.Length,
                                                    "Thickness")
        gridLayout_Costos.addWidget(self.EspesorSuperior, 7, 2, 1, 2)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Espesor (Fondo):", None)), 8,
            1, 1, 1)
        self.EspesorInferior = Entrada_con_unidades(unidades.Length,
                                                    "Thickness")
        gridLayout_Costos.addWidget(self.EspesorInferior, 8, 2, 1, 2)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Densidad:",
                                                 None)), 9, 1, 1, 1)
        self.EspesorInferior = Entrada_con_unidades(unidades.Density, "DenLiq")
        gridLayout_Costos.addWidget(self.EspesorInferior, 9, 2, 1, 2)

        self.Costos = costIndex.CostData(3, 3)
        self.Costos.valueChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.Costos, 10, 1, 2, 4)

        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Expanding), 12, 1, 1,
            6)

        self.groupBox_Costos = QtWidgets.QGroupBox(
            QtWidgets.QApplication.translate("equipment", "Costos calculados",
                                             None))
        gridLayout_Costos.addWidget(self.groupBox_Costos, 13, 1, 1, 5)
        gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_Costos)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Coste Pisos:",
                                                 None)), 0, 1, 1, 1)
        self.C_pisos = Entrada_con_unidades(unidades.Currency,
                                            retornar=False,
                                            readOnly=True)
        gridLayout_5.addWidget(self.C_pisos, 0, 2, 1, 1)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Coste Carcasa:",
                                                 None)), 1, 1, 1, 1)
        self.C_carcasa = Entrada_con_unidades(unidades.Currency,
                                              retornar=False,
                                              readOnly=True)
        gridLayout_5.addWidget(self.C_carcasa, 1, 2, 1, 1)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Coste Accesorios:", None)),
            2, 1, 1, 1)
        self.C_accesorios = Entrada_con_unidades(unidades.Currency,
                                                 retornar=False,
                                                 readOnly=True)
        gridLayout_5.addWidget(self.C_accesorios, 2, 2, 1, 1)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Coste Columna:",
                                                 None)), 0, 4, 1, 1)
        self.C_columna = Entrada_con_unidades(unidades.Currency,
                                              retornar=False,
                                              readOnly=True)
        gridLayout_5.addWidget(self.C_columna, 0, 5, 1, 1)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Coste Adquisición:", None)),
            1, 4, 1, 1)
        self.C_adq = Entrada_con_unidades(unidades.Currency,
                                          retornar=False,
                                          readOnly=True)
        gridLayout_5.addWidget(self.C_adq, 1, 5, 1, 1)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Coste Instalación:", None)),
            2, 4, 1, 1)
        self.C_inst = Entrada_con_unidades(unidades.Currency,
                                           retornar=False,
                                           readOnly=True)
        gridLayout_5.addWidget(self.C_inst, 2, 5, 1, 1)

        #        #Pestaña salida
        #        self.pSalida = QtGui.QTabWidget()
        #        self.tabWidget.addTab(self.pSalida,QtGui.QApplication.translate("equipment", "Salida", None, QtGui.QApplication.UnicodeUTF8))

        self.mostrarSubclasificacion(0)
Пример #6
0
    def __init__(self, entrada=None, parent=None):
        """entrada: Parametro opcional de clase corriente que indica la corriente de entrada en kla tubería"""
        super(UI_equipment, self).__init__(Grinder,
                                           entrada=False,
                                           salida=False,
                                           parent=parent)
        self.entrada = entrada

        #Pestaña entrada
        self.Entrada = UI_corriente.Ui_corriente(entrada)
        self.Entrada.Changed.connect(self.cambiar_entrada)
        self.tabWidget.insertTab(
            0, self.Entrada,
            QtWidgets.QApplication.translate("equipment", "Entrada", None))

        #Pestaña calculo
        gridLayout_Calculo = QtWidgets.QGridLayout(self.tabCalculo)
        gridLayout_Calculo.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Índice de trabajo de bond:",
                                                 None)), 1, 0, 1, 1)
        self.Material = QtWidgets.QComboBox()
        self.Material.addItem(
            QtWidgets.QApplication.translate("equipment",
                                             "Definido por el usuario", None))
        for key in sorted(BondIndex.keys()):
            self.Material.addItem(key)
        self.Material.currentIndexChanged[str].connect(
            self.cambiarBondWordIndex)
        gridLayout_Calculo.addWidget(self.Material, 1, 1, 1, 1)
        self.BondWorkIndex = Entrada_con_unidades(float)
        gridLayout_Calculo.addWidget(self.BondWorkIndex, 1, 2, 1, 1)
        gridLayout_Calculo.addItem(
            QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Expanding), 10, 0, 1,
            5)

        #Pestaña costos
        gridLayout_Costos = QtWidgets.QGridLayout(self.tabCostos)
        gridLayout_Costos.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment", "Tipo:", None)),
            1, 1, 1, 1)
        self.tipo = QtWidgets.QComboBox()
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "De cono", None))
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "Giratorio", None))
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "Dentado", None))
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "De martillo", None))
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "De bolas", None))
        self.tipo.addItem(
            QtWidgets.QApplication.translate("equipment", "Pulverizador",
                                             None))
        self.tipo.currentIndexChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.tipo, 1, 2, 1, 1)
        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(10, 10, QtWidgets.QSizePolicy.Fixed,
                                  QtWidgets.QSizePolicy.Fixed), 2, 1, 1, 2)

        self.Costos = costIndex.CostData(1.3, 2)
        self.Costos.valueChanged.connect(self.calcularCostos)
        gridLayout_Costos.addWidget(self.Costos, 4, 1, 2, 5)

        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Expanding), 6, 1, 1, 6)
        gridLayout_Costos.addItem(
            QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding,
                                  QtWidgets.QSizePolicy.Expanding), 10, 1, 1,
            6)
        self.groupBox_Costos = QtWidgets.QGroupBox(
            QtWidgets.QApplication.translate("equipment", "Costos calculados",
                                             None))
        gridLayout_Costos.addWidget(self.groupBox_Costos, 7, 1, 1, 6)
        gridLayout_5 = QtWidgets.QGridLayout(self.groupBox_Costos)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Coste Adquisición:", None)),
            0, 1, 1, 1)
        self.C_adq = Entrada_con_unidades(unidades.Currency,
                                          retornar=False,
                                          readOnly=True)
        gridLayout_5.addWidget(self.C_adq, 0, 2, 1, 1)
        gridLayout_5.addWidget(
            QtWidgets.QLabel(
                QtWidgets.QApplication.translate("equipment",
                                                 "Coste Instalación:", None)),
            1, 1, 1, 1)
        self.C_inst = Entrada_con_unidades(unidades.Currency,
                                           retornar=False,
                                           readOnly=True)
        gridLayout_5.addWidget(self.C_inst, 1, 2, 1, 1)

        #Pestaña salida
        self.Salida = UI_corriente.Ui_corriente(readOnly=True)
        self.tabWidget.insertTab(
            3, self.Salida,
            QtWidgets.QApplication.translate("equipment", "Salida", None))

        self.tabWidget.setCurrentIndex(0)