Esempio n. 1
0
    def setupUi(self, LineProfile):
        LineProfile.setObjectName("LineProfile")
        LineProfile.resize(728, 687)
        self.gridLayout_3 = QtGui.QGridLayout(LineProfile)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.imgView = BlankCanvasWithToolbar(LineProfile)
        self.imgView.setMinimumSize(QtCore.QSize(200, 200))
        self.imgView.setObjectName("imgView")
        self.verticalLayout_2.addWidget(self.imgView)
        self.toolbar = NavigationToolbar2QT(self.imgView, LineProfile)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolbar.sizePolicy().hasHeightForWidth())
        self.toolbar.setSizePolicy(sizePolicy)
        self.toolbar.setMinimumSize(QtCore.QSize(150, 25))
        self.toolbar.setObjectName("toolbar")
        self.verticalLayout_2.addWidget(self.toolbar)
        self.gridLayout_3.addLayout(self.verticalLayout_2, 0, 0, 1, 1)
        self.computeProfile = QtGui.QPushButton(LineProfile)
        self.computeProfile.setMinimumSize(QtCore.QSize(151, 41))
        self.computeProfile.setObjectName("computeProfile")
        self.gridLayout_3.addWidget(self.computeProfile, 0, 1, 1, 1)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox_2 = QtGui.QGroupBox(LineProfile)
        self.groupBox_2.setMinimumSize(QtCore.QSize(200, 111))
        self.groupBox_2.setObjectName("groupBox_2")
        self.setCoM = QtGui.QPushButton(self.groupBox_2)
        self.setCoM.setGeometry(QtCore.QRect(11, 48, 100, 26))
        self.setCoM.setObjectName("setCoM")
        self.widget = QtGui.QWidget(self.groupBox_2)
        self.widget.setGeometry(QtCore.QRect(116, 30, 79, 60))
        self.widget.setObjectName("widget")
        self.gridLayout_2 = QtGui.QGridLayout(self.widget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.ylabel = QtGui.QLabel(self.widget)
        self.ylabel.setObjectName("ylabel")
        self.gridLayout_2.addWidget(self.ylabel, 0, 0, 1, 1)
        self.center_y = QtGui.QSpinBox(self.widget)
        self.center_y.setMaximum(5000)
        self.center_y.setObjectName("center_y")
        self.gridLayout_2.addWidget(self.center_y, 0, 1, 1, 1)
        self.xlabel = QtGui.QLabel(self.widget)
        self.xlabel.setObjectName("xlabel")
        self.gridLayout_2.addWidget(self.xlabel, 1, 0, 1, 1)
        self.center_x = QtGui.QSpinBox(self.widget)
        self.center_x.setMaximum(5000)
        self.center_x.setObjectName("center_x")
        self.gridLayout_2.addWidget(self.center_x, 1, 1, 1, 1)
        self.verticalLayout.addWidget(self.groupBox_2)
        self.groupBox_3 = QtGui.QGroupBox(LineProfile)
        self.groupBox_3.setMinimumSize(QtCore.QSize(200, 141))
        self.groupBox_3.setObjectName("groupBox_3")
        self.layoutWidget = QtGui.QWidget(self.groupBox_3)
        self.layoutWidget.setGeometry(QtCore.QRect(11, 30, 182, 113))
        self.layoutWidget.setObjectName("layoutWidget")
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.setAngles = QtGui.QPushButton(self.layoutWidget)
        self.setAngles.setObjectName("setAngles")
        self.horizontalLayout_2.addWidget(self.setAngles)
        self.anglesList = QtGui.QTextEdit(self.layoutWidget)
        self.anglesList.setMinimumSize(QtCore.QSize(51, 111))
        self.anglesList.setMaximumSize(QtCore.QSize(51, 111))
        self.anglesList.setObjectName("anglesList")
        self.horizontalLayout_2.addWidget(self.anglesList)
        self.verticalLayout.addWidget(self.groupBox_3)
        self.groupBox = QtGui.QGroupBox(LineProfile)
        self.groupBox.setMinimumSize(QtCore.QSize(200, 100))
        self.groupBox.setObjectName("groupBox")
        self.layoutWidget1 = QtGui.QWidget(self.groupBox)
        self.layoutWidget1.setGeometry(QtCore.QRect(20, 31, 159, 59))
        self.layoutWidget1.setObjectName("layoutWidget1")
        self.gridLayout = QtGui.QGridLayout(self.layoutWidget1)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(self.layoutWidget1)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.smoothType = QtGui.QComboBox(self.layoutWidget1)
        self.smoothType.setObjectName("smoothType")
        self.smoothType.addItem(QtCore.QString())
        self.smoothType.addItem(QtCore.QString())
        self.smoothType.addItem(QtCore.QString())
        self.smoothType.addItem(QtCore.QString())
        self.smoothType.addItem(QtCore.QString())
        self.gridLayout.addWidget(self.smoothType, 0, 1, 1, 2)
        self.label_2 = QtGui.QLabel(self.layoutWidget1)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 2)
        self.smoothWindowlength = QtGui.QSpinBox(self.layoutWidget1)
        self.smoothWindowlength.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.smoothWindowlength.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.smoothWindowlength.setProperty("value", QtCore.QVariant(10))
        self.smoothWindowlength.setObjectName("smoothWindowlength")
        self.gridLayout.addWidget(self.smoothWindowlength, 1, 2, 1, 1)
        self.verticalLayout.addWidget(self.groupBox)
        self.groupBox_4 = QtGui.QGroupBox(LineProfile)
        self.groupBox_4.setMinimumSize(QtCore.QSize(200, 80))
        self.groupBox_4.setObjectName("groupBox_4")
        self.linewidth = QtGui.QSpinBox(self.groupBox_4)
        self.linewidth.setGeometry(QtCore.QRect(70, 30, 62, 27))
        self.linewidth.setMaximum(200)
        self.linewidth.setObjectName("linewidth")
        self.verticalLayout.addWidget(self.groupBox_4)
        self.gridLayout_3.addLayout(self.verticalLayout, 0, 2, 2, 1)
        self.verticalLayout_3 = QtGui.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.lineprofileView = BlankCanvasWithToolbar(LineProfile)
        self.lineprofileView.setMinimumSize(QtCore.QSize(477, 413))
        self.lineprofileView.setObjectName("lineprofileView")
        self.verticalLayout_3.addWidget(self.lineprofileView)
        self.toolbar_2 = NavigationToolbar2QT(self.lineprofileView, LineProfile)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolbar_2.sizePolicy().hasHeightForWidth())
        self.toolbar_2.setSizePolicy(sizePolicy)
        self.toolbar_2.setMinimumSize(QtCore.QSize(150, 25))
        self.toolbar_2.setObjectName("toolbar_2")
        self.verticalLayout_3.addWidget(self.toolbar_2)
        self.gridLayout_3.addLayout(self.verticalLayout_3, 1, 0, 1, 2)
        self.xlabel.setBuddy(self.center_x)

        self.retranslateUi(LineProfile)
        QtCore.QMetaObject.connectSlotsByName(LineProfile)
Esempio n. 2
0
class Ui_LineProfile(object):
    def setupUi(self, LineProfile):
        LineProfile.setObjectName("LineProfile")
        LineProfile.resize(728, 687)
        self.gridLayout_3 = QtGui.QGridLayout(LineProfile)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.imgView = BlankCanvasWithToolbar(LineProfile)
        self.imgView.setMinimumSize(QtCore.QSize(200, 200))
        self.imgView.setObjectName("imgView")
        self.verticalLayout_2.addWidget(self.imgView)
        self.toolbar = NavigationToolbar2QT(self.imgView, LineProfile)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolbar.sizePolicy().hasHeightForWidth())
        self.toolbar.setSizePolicy(sizePolicy)
        self.toolbar.setMinimumSize(QtCore.QSize(150, 25))
        self.toolbar.setObjectName("toolbar")
        self.verticalLayout_2.addWidget(self.toolbar)
        self.gridLayout_3.addLayout(self.verticalLayout_2, 0, 0, 1, 1)
        self.computeProfile = QtGui.QPushButton(LineProfile)
        self.computeProfile.setMinimumSize(QtCore.QSize(151, 41))
        self.computeProfile.setObjectName("computeProfile")
        self.gridLayout_3.addWidget(self.computeProfile, 0, 1, 1, 1)
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox_2 = QtGui.QGroupBox(LineProfile)
        self.groupBox_2.setMinimumSize(QtCore.QSize(200, 111))
        self.groupBox_2.setObjectName("groupBox_2")
        self.setCoM = QtGui.QPushButton(self.groupBox_2)
        self.setCoM.setGeometry(QtCore.QRect(11, 48, 100, 26))
        self.setCoM.setObjectName("setCoM")
        self.widget = QtGui.QWidget(self.groupBox_2)
        self.widget.setGeometry(QtCore.QRect(116, 30, 79, 60))
        self.widget.setObjectName("widget")
        self.gridLayout_2 = QtGui.QGridLayout(self.widget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.ylabel = QtGui.QLabel(self.widget)
        self.ylabel.setObjectName("ylabel")
        self.gridLayout_2.addWidget(self.ylabel, 0, 0, 1, 1)
        self.center_y = QtGui.QSpinBox(self.widget)
        self.center_y.setMaximum(5000)
        self.center_y.setObjectName("center_y")
        self.gridLayout_2.addWidget(self.center_y, 0, 1, 1, 1)
        self.xlabel = QtGui.QLabel(self.widget)
        self.xlabel.setObjectName("xlabel")
        self.gridLayout_2.addWidget(self.xlabel, 1, 0, 1, 1)
        self.center_x = QtGui.QSpinBox(self.widget)
        self.center_x.setMaximum(5000)
        self.center_x.setObjectName("center_x")
        self.gridLayout_2.addWidget(self.center_x, 1, 1, 1, 1)
        self.verticalLayout.addWidget(self.groupBox_2)
        self.groupBox_3 = QtGui.QGroupBox(LineProfile)
        self.groupBox_3.setMinimumSize(QtCore.QSize(200, 141))
        self.groupBox_3.setObjectName("groupBox_3")
        self.layoutWidget = QtGui.QWidget(self.groupBox_3)
        self.layoutWidget.setGeometry(QtCore.QRect(11, 30, 182, 113))
        self.layoutWidget.setObjectName("layoutWidget")
        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.layoutWidget)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.setAngles = QtGui.QPushButton(self.layoutWidget)
        self.setAngles.setObjectName("setAngles")
        self.horizontalLayout_2.addWidget(self.setAngles)
        self.anglesList = QtGui.QTextEdit(self.layoutWidget)
        self.anglesList.setMinimumSize(QtCore.QSize(51, 111))
        self.anglesList.setMaximumSize(QtCore.QSize(51, 111))
        self.anglesList.setObjectName("anglesList")
        self.horizontalLayout_2.addWidget(self.anglesList)
        self.verticalLayout.addWidget(self.groupBox_3)
        self.groupBox = QtGui.QGroupBox(LineProfile)
        self.groupBox.setMinimumSize(QtCore.QSize(200, 100))
        self.groupBox.setObjectName("groupBox")
        self.layoutWidget1 = QtGui.QWidget(self.groupBox)
        self.layoutWidget1.setGeometry(QtCore.QRect(20, 31, 159, 59))
        self.layoutWidget1.setObjectName("layoutWidget1")
        self.gridLayout = QtGui.QGridLayout(self.layoutWidget1)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(self.layoutWidget1)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.smoothType = QtGui.QComboBox(self.layoutWidget1)
        self.smoothType.setObjectName("smoothType")
        self.smoothType.addItem(QtCore.QString())
        self.smoothType.addItem(QtCore.QString())
        self.smoothType.addItem(QtCore.QString())
        self.smoothType.addItem(QtCore.QString())
        self.smoothType.addItem(QtCore.QString())
        self.gridLayout.addWidget(self.smoothType, 0, 1, 1, 2)
        self.label_2 = QtGui.QLabel(self.layoutWidget1)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 2)
        self.smoothWindowlength = QtGui.QSpinBox(self.layoutWidget1)
        self.smoothWindowlength.setLayoutDirection(QtCore.Qt.LeftToRight)
        self.smoothWindowlength.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.smoothWindowlength.setProperty("value", QtCore.QVariant(10))
        self.smoothWindowlength.setObjectName("smoothWindowlength")
        self.gridLayout.addWidget(self.smoothWindowlength, 1, 2, 1, 1)
        self.verticalLayout.addWidget(self.groupBox)
        self.groupBox_4 = QtGui.QGroupBox(LineProfile)
        self.groupBox_4.setMinimumSize(QtCore.QSize(200, 80))
        self.groupBox_4.setObjectName("groupBox_4")
        self.linewidth = QtGui.QSpinBox(self.groupBox_4)
        self.linewidth.setGeometry(QtCore.QRect(70, 30, 62, 27))
        self.linewidth.setMaximum(200)
        self.linewidth.setObjectName("linewidth")
        self.verticalLayout.addWidget(self.groupBox_4)
        self.gridLayout_3.addLayout(self.verticalLayout, 0, 2, 2, 1)
        self.verticalLayout_3 = QtGui.QVBoxLayout()
        self.verticalLayout_3.setObjectName("verticalLayout_3")
        self.lineprofileView = BlankCanvasWithToolbar(LineProfile)
        self.lineprofileView.setMinimumSize(QtCore.QSize(477, 413))
        self.lineprofileView.setObjectName("lineprofileView")
        self.verticalLayout_3.addWidget(self.lineprofileView)
        self.toolbar_2 = NavigationToolbar2QT(self.lineprofileView, LineProfile)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolbar_2.sizePolicy().hasHeightForWidth())
        self.toolbar_2.setSizePolicy(sizePolicy)
        self.toolbar_2.setMinimumSize(QtCore.QSize(150, 25))
        self.toolbar_2.setObjectName("toolbar_2")
        self.verticalLayout_3.addWidget(self.toolbar_2)
        self.gridLayout_3.addLayout(self.verticalLayout_3, 1, 0, 1, 2)
        self.xlabel.setBuddy(self.center_x)

        self.retranslateUi(LineProfile)
        QtCore.QMetaObject.connectSlotsByName(LineProfile)

    def retranslateUi(self, LineProfile):
        LineProfile.setWindowTitle(QtGui.QApplication.translate("LineProfile", "Line profile", None, QtGui.QApplication.UnicodeUTF8))
        self.computeProfile.setText(QtGui.QApplication.translate("LineProfile", "Compute profile", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox_2.setTitle(QtGui.QApplication.translate("LineProfile", "Center point", None, QtGui.QApplication.UnicodeUTF8))
        self.setCoM.setText(QtGui.QApplication.translate("LineProfile", "Set to CoM", None, QtGui.QApplication.UnicodeUTF8))
        self.ylabel.setText(QtGui.QApplication.translate("LineProfile", "X", None, QtGui.QApplication.UnicodeUTF8))
        self.xlabel.setText(QtGui.QApplication.translate("LineProfile", "Y", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox_3.setTitle(QtGui.QApplication.translate("LineProfile", "Angles", None, QtGui.QApplication.UnicodeUTF8))
        self.setAngles.setText(QtGui.QApplication.translate("LineProfile", "Set to defaults", None, QtGui.QApplication.UnicodeUTF8))
        self.anglesList.setHtml(QtGui.QApplication.translate("LineProfile", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'DejaVu Sans\'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">0</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">45</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">90</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">135</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox.setTitle(QtGui.QApplication.translate("LineProfile", "Smooth", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("LineProfile", "Type", None, QtGui.QApplication.UnicodeUTF8))
        self.smoothType.setItemText(0, QtGui.QApplication.translate("LineProfile", "Hanning", None, QtGui.QApplication.UnicodeUTF8))
        self.smoothType.setItemText(1, QtGui.QApplication.translate("LineProfile", "Hamming", None, QtGui.QApplication.UnicodeUTF8))
        self.smoothType.setItemText(2, QtGui.QApplication.translate("LineProfile", "Blackman", None, QtGui.QApplication.UnicodeUTF8))
        self.smoothType.setItemText(3, QtGui.QApplication.translate("LineProfile", "Bartlett", None, QtGui.QApplication.UnicodeUTF8))
        self.smoothType.setItemText(4, QtGui.QApplication.translate("LineProfile", "flat", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("LineProfile", "Window length", None, QtGui.QApplication.UnicodeUTF8))
        self.groupBox_4.setTitle(QtGui.QApplication.translate("LineProfile", "Line width (averaging)", None, QtGui.QApplication.UnicodeUTF8))