Source code for sas.qtgui.Calculators.UI.DensityPanel

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file '.\src\sas\qtgui\Calculators\UI\DensityPanel.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets

[docs]class Ui_DensityPanel(object):
[docs] def setupUi(self, DensityPanel): DensityPanel.setObjectName("DensityPanel") DensityPanel.resize(345, 236) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(DensityPanel.sizePolicy().hasHeightForWidth()) DensityPanel.setSizePolicy(sizePolicy) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/res/ball.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) DensityPanel.setWindowIcon(icon) self.gridLayout_2 = QtWidgets.QGridLayout(DensityPanel) self.gridLayout_2.setObjectName("gridLayout_2") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.label_1 = QtWidgets.QLabel(DensityPanel) self.label_1.setObjectName("label_1") self.gridLayout.addWidget(self.label_1, 0, 0, 1, 1) self.editMolecularFormula = QtWidgets.QLineEdit(DensityPanel) self.editMolecularFormula.setMinimumSize(QtCore.QSize(61, 21)) self.editMolecularFormula.setBaseSize(QtCore.QSize(61, 21)) self.editMolecularFormula.setObjectName("editMolecularFormula") self.gridLayout.addWidget(self.editMolecularFormula, 0, 1, 1, 1) self.label_3 = QtWidgets.QLabel(DensityPanel) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 0, 2, 1, 1) self.label_2 = QtWidgets.QLabel(DensityPanel) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) self.editMolarMass = QtWidgets.QLineEdit(DensityPanel) self.editMolarMass.setMinimumSize(QtCore.QSize(61, 21)) self.editMolarMass.setBaseSize(QtCore.QSize(61, 21)) self.editMolarMass.setStyleSheet("") self.editMolarMass.setReadOnly(True) self.editMolarMass.setObjectName("editMolarMass") self.gridLayout.addWidget(self.editMolarMass, 1, 1, 1, 1) self.label_4 = QtWidgets.QLabel(DensityPanel) self.label_4.setObjectName("label_4") self.gridLayout.addWidget(self.label_4, 1, 2, 1, 1) self.frame = QtWidgets.QFrame(DensityPanel) self.frame.setMinimumSize(QtCore.QSize(0, 5)) self.frame.setFrameShape(QtWidgets.QFrame.HLine) self.frame.setFrameShadow(QtWidgets.QFrame.Raised) self.frame.setLineWidth(1) self.frame.setMidLineWidth(0) self.frame.setObjectName("frame") self.gridLayout.addWidget(self.frame, 2, 0, 1, 3) self.label_5 = QtWidgets.QLabel(DensityPanel) self.label_5.setObjectName("label_5") self.gridLayout.addWidget(self.label_5, 3, 0, 1, 1) self.editMolarVolume = QtWidgets.QLineEdit(DensityPanel) self.editMolarVolume.setMinimumSize(QtCore.QSize(61, 21)) self.editMolarVolume.setBaseSize(QtCore.QSize(61, 21)) self.editMolarVolume.setObjectName("editMolarVolume") self.gridLayout.addWidget(self.editMolarVolume, 3, 1, 1, 1) self.label_6 = QtWidgets.QLabel(DensityPanel) self.label_6.setObjectName("label_6") self.gridLayout.addWidget(self.label_6, 3, 2, 1, 1) self.label_7 = QtWidgets.QLabel(DensityPanel) self.label_7.setObjectName("label_7") self.gridLayout.addWidget(self.label_7, 4, 0, 1, 1) self.editMassDensity = QtWidgets.QLineEdit(DensityPanel) self.editMassDensity.setMinimumSize(QtCore.QSize(61, 21)) self.editMassDensity.setBaseSize(QtCore.QSize(61, 21)) self.editMassDensity.setObjectName("editMassDensity") self.gridLayout.addWidget(self.editMassDensity, 4, 1, 1, 1) self.label_8 = QtWidgets.QLabel(DensityPanel) self.label_8.setObjectName("label_8") self.gridLayout.addWidget(self.label_8, 4, 2, 1, 1) self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_2.addItem(spacerItem, 1, 0, 1, 1) self.buttonBox = QtWidgets.QDialogButtonBox(DensityPanel) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.buttonBox.sizePolicy().hasHeightForWidth()) self.buttonBox.setSizePolicy(sizePolicy) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close|QtWidgets.QDialogButtonBox.Help|QtWidgets.QDialogButtonBox.Reset) self.buttonBox.setCenterButtons(True) self.buttonBox.setObjectName("buttonBox") self.gridLayout_2.addWidget(self.buttonBox, 2, 0, 1, 1) self.retranslateUi(DensityPanel) self.buttonBox.accepted.connect(DensityPanel.accept) self.buttonBox.rejected.connect(DensityPanel.reject) QtCore.QMetaObject.connectSlotsByName(DensityPanel) DensityPanel.setTabOrder(self.editMolecularFormula, self.editMolarMass) DensityPanel.setTabOrder(self.editMolarMass, self.editMolarVolume) DensityPanel.setTabOrder(self.editMolarVolume, self.editMassDensity) DensityPanel.setTabOrder(self.editMassDensity, self.buttonBox)
[docs] def retranslateUi(self, DensityPanel): _translate = QtCore.QCoreApplication.translate DensityPanel.setWindowTitle(_translate("DensityPanel", "Density/Volume Calculator")) self.label_1.setText(_translate("DensityPanel", "Molecular Formula")) self.label_3.setText(_translate("DensityPanel", "e.g. H2O")) self.label_2.setText(_translate("DensityPanel", "Molar Mass")) self.label_4.setText(_translate("DensityPanel", "g/mol")) self.label_5.setText(_translate("DensityPanel", "Molar Volume")) self.label_6.setText(_translate("DensityPanel", "cm³/mol")) self.label_7.setText(_translate("DensityPanel", "Mass Density")) self.label_8.setText(_translate("DensityPanel", "g/cm³"))