当前位置: 首页>>代码示例>>Python>>正文


Python Tabla.setColumnReadOnly方法代码示例

本文整理汇总了Python中UI.widgets.Tabla.setColumnReadOnly方法的典型用法代码示例。如果您正苦于以下问题:Python Tabla.setColumnReadOnly方法的具体用法?Python Tabla.setColumnReadOnly怎么用?Python Tabla.setColumnReadOnly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UI.widgets.Tabla的用法示例。


在下文中一共展示了Tabla.setColumnReadOnly方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: UI_equipment

# 需要导入模块: from UI.widgets import Tabla [as 别名]
# 或者: from UI.widgets.Tabla import setColumnReadOnly [as 别名]
class UI_equipment(UI_equip):
    """Baghouse equipment edition dialog"""
    Equipment = Baghouse()

    def __init__(self, equipment=None, parent=None):
        """
        equipment: Initial equipment instance to model
        """
        super().__init__(Baghouse, entrada=False, parent=parent)

        # Efficiency tab
        title = [QtWidgets.QApplication.translate("pychemqt", "Diameter") +
                 ", " + Length.text("ParticleDiameter"),
                 QtWidgets.QApplication.translate("pychemqt", "Efficiency")]
        self.efic = Tabla(2, horizontalHeader=title, filas=1, stretch=False)
        self.efic.setColumnReadOnly(0, True)
        self.efic.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
        self.efic.editingFinished.connect(self.cambiarRendimientos)
        self.tabWidget.insertTab(
            1, self.efic,
            QtWidgets.QApplication.translate("pychemqt", "Efficiencies"))

        # Calculate tab
        lyt_Calc = QtWidgets.QGridLayout(self.tabCalculo)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Mode")), 1, 1)
        self.metodo = QtWidgets.QComboBox()
        for txt in self.Equipment.TEXT_TIPO:
            self.metodo.addItem(txt)
        self.metodo.currentIndexChanged.connect(self.tipoCalculoCambiado)
        lyt_Calc.addWidget(self.metodo, 1, 2, 1, 3)
        lyt_Calc.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed),
            2, 1, 1, 6)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "No cells")), 3, 1)
        self.num_filtros = Entrada_con_unidades(
            int, spinbox=True, step=1, min=1, width=50, resaltado=True,
            start=1)
        self.num_filtros.valueChanged.connect(
            partial(self.changeParams, "num_filtros"))
        lyt_Calc.addWidget(self.num_filtros, 3, 2)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Time")), 4, 1)
        self.tiempo = Entrada_con_unidades(Time, resaltado=True)
        self.tiempo.valueChanged.connect(partial(self.changeParams, "tiempo"))
        lyt_Calc.addWidget(self.tiempo, 4, 2)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Pressure drop")), 5, 1)
        self.deltaP = Entrada_con_unidades(Pressure, retornar=False)
        self.deltaP.setReadOnly(True)
        self.deltaP.valueChanged.connect(partial(self.changeParams, "deltaP"))
        lyt_Calc.addWidget(self.deltaP, 5, 2)
        lyt_Calc.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed),
            6, 1, 1, 6)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Bags per cell")), 7, 1)
        self.membranasFiltro = Entrada_con_unidades(int, spinbox=True, step=1,
                                                    min=1)
        self.membranasFiltro.valueChanged.connect(
            partial(self.changeParams, "membranasFiltro"))
        lyt_Calc.addWidget(self.membranasFiltro, 7, 2)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Bag diameter")), 8, 1)
        self.diametroMembrana = Entrada_con_unidades(Length)
        self.diametroMembrana.valueChanged.connect(
            partial(self.changeParams, "diametroMembrana"))
        lyt_Calc.addWidget(self.diametroMembrana, 8, 2)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Area per bag")), 9, 1)
        self.areaMembrana = Entrada_con_unidades(Area)
        self.areaMembrana.valueChanged.connect(
            partial(self.changeParams, "areaMembrana"))
        lyt_Calc.addWidget(self.areaMembrana, 9, 2)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Cloth resistence")), 7, 4)
        self.resistenciaFiltro = Entrada_con_unidades(float)
        self.resistenciaFiltro.valueChanged.connect(
            partial(self.changeParams, "resistenciaFiltro"))
        lyt_Calc.addWidget(self.resistenciaFiltro, 7, 5)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Cake resistence")), 8, 4)
        self.resistenciaTorta = Entrada_con_unidades(float)
        self.resistenciaTorta.valueChanged.connect(
            partial(self.changeParams, "resistenciaTorta"))
        lyt_Calc.addWidget(self.resistenciaTorta, 8, 5)
        lyt_Calc.addWidget(QtWidgets.QLabel(QtWidgets.QApplication.translate(
            "pychemqt", "Cells cleaned")), 9, 4)
        self.limpieza = Entrada_con_unidades(int, spinbox=True, step=1, min=0)
        self.limpieza.valueChanged.connect(
            partial(self.changeParams, "limpieza"))
        lyt_Calc.addWidget(self.limpieza, 9, 5)
        lyt_Calc.addItem(QtWidgets.QSpacerItem(
            20, 20, QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding), 10, 1, 1, 6)

        groupbox = QtWidgets.QGroupBox(
            QtWidgets.QApplication.translate("pychemqt", "Results"))
        lyt_Calc.addWidget(groupbox, 11, 1, 1, 5)
#.........这里部分代码省略.........
开发者ID:bkt92,项目名称:pychemqt,代码行数:103,代码来源:UI_baghouse.py


注:本文中的UI.widgets.Tabla.setColumnReadOnly方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。