コード例 #1
0
ファイル: imagingTemplate.py プロジェクト: ablot/acq4
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(368, 416)
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.scannerComboBox = InterfaceCombo(Form)
        self.scannerComboBox.setObjectName(_fromUtf8("scannerComboBox"))
        self.gridLayout.addWidget(self.scannerComboBox, 0, 1, 1, 1)
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout.addWidget(self.label_3, 0, 2, 1, 1)
        self.downSampling = QtGui.QSpinBox(Form)
        self.downSampling.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.downSampling.setMinimum(1)
        self.downSampling.setMaximum(1000)
        self.downSampling.setProperty("value", 1)
        self.downSampling.setObjectName(_fromUtf8("downSampling"))
        self.gridLayout.addWidget(self.downSampling, 0, 3, 1, 1)
        spacerItem = QtGui.QSpacerItem(68, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 0, 4, 1, 1)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.detectorComboBox = InterfaceCombo(Form)
        self.detectorComboBox.setObjectName(_fromUtf8("detectorComboBox"))
        self.gridLayout.addWidget(self.detectorComboBox, 1, 1, 1, 1)
        self.label_4 = QtGui.QLabel(Form)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout.addWidget(self.label_4, 1, 2, 1, 1)
        self.alphaSlider = QtGui.QSlider(Form)
        self.alphaSlider.setMaximum(100)
        self.alphaSlider.setSingleStep(2)
        self.alphaSlider.setProperty("value", 0)
        self.alphaSlider.setOrientation(QtCore.Qt.Horizontal)
        self.alphaSlider.setInvertedAppearance(False)
        self.alphaSlider.setInvertedControls(True)
        self.alphaSlider.setTickPosition(QtGui.QSlider.TicksBelow)
        self.alphaSlider.setObjectName(_fromUtf8("alphaSlider"))
        self.gridLayout.addWidget(self.alphaSlider, 1, 3, 1, 1)
        spacerItem1 = QtGui.QSpacerItem(85, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem1, 1, 4, 1, 1)
        self.plotWidget = ImageView(Form)
        self.plotWidget.setObjectName(_fromUtf8("plotWidget"))
        self.gridLayout.addWidget(self.plotWidget, 2, 0, 1, 5)

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

    def retranslateUi(self, Form):
        Form.setWindowTitle(_translate("Form", "Form", None))
        self.label.setText(_translate("Form", "Scanner", None))
        self.label_3.setText(_translate("Form", "Downsampling", None))
        self.label_2.setText(_translate("Form", "Detector", None))
        self.label_4.setText(_translate("Form", "ROI alpha", None))
コード例 #2
0
ファイル: TaskTemplate.py プロジェクト: ablot/acq4
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(209, 134)
        self.horizontalLayout = QtGui.QHBoxLayout(Form)
        self.horizontalLayout.setSpacing(0)
        self.horizontalLayout.setMargin(0)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.horizSplitter = QtGui.QSplitter(Form)
        self.horizSplitter.setOrientation(QtCore.Qt.Horizontal)
        self.horizSplitter.setObjectName(_fromUtf8("horizSplitter"))
        self.ctrlSplitter = QtGui.QSplitter(self.horizSplitter)
        self.ctrlSplitter.setOrientation(QtCore.Qt.Vertical)
        self.ctrlSplitter.setObjectName(_fromUtf8("ctrlSplitter"))
        self.cameraGroupBox = QtGui.QGroupBox(self.ctrlSplitter)
        font = QtGui.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.cameraGroupBox.setFont(font)
        self.cameraGroupBox.setObjectName(_fromUtf8("cameraGroupBox"))
        self.gridLayout = QtGui.QGridLayout(self.cameraGroupBox)
        self.gridLayout.setMargin(0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.recordCheck = QtGui.QCheckBox(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.recordCheck.setFont(font)
        self.recordCheck.setChecked(True)
        self.recordCheck.setObjectName(_fromUtf8("recordCheck"))
        self.gridLayout.addWidget(self.recordCheck, 0, 0, 1, 1)
        self.displayCheck = QtGui.QCheckBox(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.displayCheck.setFont(font)
        self.displayCheck.setChecked(True)
        self.displayCheck.setObjectName(_fromUtf8("displayCheck"))
        self.gridLayout.addWidget(self.displayCheck, 0, 1, 1, 1)
        self.triggerModeCombo = QtGui.QComboBox(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.triggerModeCombo.setFont(font)
        self.triggerModeCombo.setObjectName(_fromUtf8("triggerModeCombo"))
        self.gridLayout.addWidget(self.triggerModeCombo, 1, 0, 1, 2)
        self.triggerCheck = QtGui.QCheckBox(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.triggerCheck.setFont(font)
        self.triggerCheck.setObjectName(_fromUtf8("triggerCheck"))
        self.gridLayout.addWidget(self.triggerCheck, 2, 0, 1, 2)
        self.releaseBetweenRadio = QtGui.QRadioButton(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.releaseBetweenRadio.setFont(font)
        self.releaseBetweenRadio.setObjectName(_fromUtf8("releaseBetweenRadio"))
        self.gridLayout.addWidget(self.releaseBetweenRadio, 3, 0, 1, 2)
        self.releaseAfterRadio = QtGui.QRadioButton(self.cameraGroupBox)
        font = QtGui.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.releaseAfterRadio.setFont(font)
        self.releaseAfterRadio.setChecked(True)
        self.releaseAfterRadio.setObjectName(_fromUtf8("releaseAfterRadio"))
        self.gridLayout.addWidget(self.releaseAfterRadio, 4, 0, 1, 2)
        self.plotSplitter = QtGui.QSplitter(self.horizSplitter)
        self.plotSplitter.setOrientation(QtCore.Qt.Vertical)
        self.plotSplitter.setObjectName(_fromUtf8("plotSplitter"))
        self.imageView = ImageView(self.plotSplitter)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.imageView.sizePolicy().hasHeightForWidth())
        self.imageView.setSizePolicy(sizePolicy)
        self.imageView.setObjectName(_fromUtf8("imageView"))
        self.horizontalLayout.addWidget(self.horizSplitter)

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

    def retranslateUi(self, Form):
        Form.setWindowTitle(_translate("Form", "Form", None))
        self.cameraGroupBox.setTitle(_translate("Form", "Camera", None))
        self.recordCheck.setText(_translate("Form", "Record", None))
        self.displayCheck.setText(_translate("Form", "Display", None))
        self.triggerCheck.setToolTip(_translate("Form", "<!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:\'Sans Serif\'; font-size:7pt; 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;\">Checking this forces the camera to start <span style=\" font-style:italic;\">after</span> all</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">other devices in the task have started so that it</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">can correctly act as a starting trigger.</p></body></html>", None))
        self.triggerCheck.setText(_translate("Form", "Camera triggers task", None))
        self.releaseBetweenRadio.setText(_translate("Form", "Release between tasks", None))
        self.releaseAfterRadio.setText(_translate("Form", "Release after sequence", None))
コード例 #3
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(368, 416)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtWidgets.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.scannerComboBox = InterfaceCombo(Form)
        self.scannerComboBox.setObjectName("scannerComboBox")
        self.gridLayout.addWidget(self.scannerComboBox, 0, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(Form)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 0, 2, 1, 1)
        self.downSampling = QtWidgets.QSpinBox(Form)
        self.downSampling.setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignTrailing
                                       | Qt.Qt.AlignVCenter)
        self.downSampling.setMinimum(1)
        self.downSampling.setMaximum(1000)
        self.downSampling.setProperty("value", 1)
        self.downSampling.setObjectName("downSampling")
        self.gridLayout.addWidget(self.downSampling, 0, 3, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(68, 20,
                                           QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem, 0, 4, 1, 1)
        self.label_2 = QtWidgets.QLabel(Form)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.detectorComboBox = InterfaceCombo(Form)
        self.detectorComboBox.setObjectName("detectorComboBox")
        self.gridLayout.addWidget(self.detectorComboBox, 1, 1, 1, 1)
        self.label_4 = QtWidgets.QLabel(Form)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 1, 2, 1, 1)
        self.alphaSlider = QtWidgets.QSlider(Form)
        self.alphaSlider.setMaximum(100)
        self.alphaSlider.setSingleStep(2)
        self.alphaSlider.setProperty("value", 0)
        self.alphaSlider.setOrientation(Qt.Qt.Horizontal)
        self.alphaSlider.setInvertedAppearance(False)
        self.alphaSlider.setInvertedControls(True)
        self.alphaSlider.setTickPosition(QtWidgets.QSlider.TicksBelow)
        self.alphaSlider.setObjectName("alphaSlider")
        self.gridLayout.addWidget(self.alphaSlider, 1, 3, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(85, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.gridLayout.addItem(spacerItem1, 1, 4, 1, 1)
        self.plotWidget = ImageView(Form)
        self.plotWidget.setObjectName("plotWidget")
        self.gridLayout.addWidget(self.plotWidget, 2, 0, 1, 5)

        self.retranslateUi(Form)
        Qt.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = Qt.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.label.setText(_translate("Form", "Scanner"))
        self.label_3.setText(_translate("Form", "Downsampling"))
        self.label_2.setText(_translate("Form", "Detector"))
        self.label_4.setText(_translate("Form", "ROI alpha"))
コード例 #4
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(209, 134)
        self.horizontalLayout = QtWidgets.QHBoxLayout(Form)
        self.horizontalLayout.setContentsMargins(0, 0, 0, 0)
        self.horizontalLayout.setSpacing(0)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.horizSplitter = QtWidgets.QSplitter(Form)
        self.horizSplitter.setOrientation(Qt.Qt.Horizontal)
        self.horizSplitter.setObjectName("horizSplitter")
        self.ctrlSplitter = QtWidgets.QSplitter(self.horizSplitter)
        self.ctrlSplitter.setOrientation(Qt.Qt.Vertical)
        self.ctrlSplitter.setObjectName("ctrlSplitter")
        self.cameraGroupBox = QtWidgets.QGroupBox(self.ctrlSplitter)
        font = Qt.QFont()
        font.setBold(True)
        font.setWeight(75)
        self.cameraGroupBox.setFont(font)
        self.cameraGroupBox.setObjectName("cameraGroupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.cameraGroupBox)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.recordCheck = QtWidgets.QCheckBox(self.cameraGroupBox)
        font = Qt.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.recordCheck.setFont(font)
        self.recordCheck.setChecked(True)
        self.recordCheck.setObjectName("recordCheck")
        self.gridLayout.addWidget(self.recordCheck, 0, 0, 1, 1)
        self.displayCheck = QtWidgets.QCheckBox(self.cameraGroupBox)
        font = Qt.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.displayCheck.setFont(font)
        self.displayCheck.setChecked(True)
        self.displayCheck.setObjectName("displayCheck")
        self.gridLayout.addWidget(self.displayCheck, 0, 1, 1, 1)
        self.triggerModeCombo = QtWidgets.QComboBox(self.cameraGroupBox)
        font = Qt.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.triggerModeCombo.setFont(font)
        self.triggerModeCombo.setObjectName("triggerModeCombo")
        self.gridLayout.addWidget(self.triggerModeCombo, 1, 0, 1, 2)
        self.triggerCheck = QtWidgets.QCheckBox(self.cameraGroupBox)
        font = Qt.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.triggerCheck.setFont(font)
        self.triggerCheck.setObjectName("triggerCheck")
        self.gridLayout.addWidget(self.triggerCheck, 2, 0, 1, 2)
        self.releaseBetweenRadio = QtWidgets.QRadioButton(self.cameraGroupBox)
        font = Qt.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.releaseBetweenRadio.setFont(font)
        self.releaseBetweenRadio.setObjectName("releaseBetweenRadio")
        self.gridLayout.addWidget(self.releaseBetweenRadio, 3, 0, 1, 2)
        self.releaseAfterRadio = QtWidgets.QRadioButton(self.cameraGroupBox)
        font = Qt.QFont()
        font.setBold(False)
        font.setWeight(50)
        self.releaseAfterRadio.setFont(font)
        self.releaseAfterRadio.setChecked(True)
        self.releaseAfterRadio.setObjectName("releaseAfterRadio")
        self.gridLayout.addWidget(self.releaseAfterRadio, 4, 0, 1, 2)
        self.plotSplitter = QtWidgets.QSplitter(self.horizSplitter)
        self.plotSplitter.setOrientation(Qt.Qt.Vertical)
        self.plotSplitter.setObjectName("plotSplitter")
        self.imageView = ImageView(self.plotSplitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding,
                                           QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.imageView.sizePolicy().hasHeightForWidth())
        self.imageView.setSizePolicy(sizePolicy)
        self.imageView.setObjectName("imageView")
        self.horizontalLayout.addWidget(self.horizSplitter)

        self.retranslateUi(Form)
        Qt.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = Qt.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.cameraGroupBox.setTitle(_translate("Form", "Camera"))
        self.recordCheck.setText(_translate("Form", "Record"))
        self.displayCheck.setText(_translate("Form", "Display"))
        self.triggerCheck.setToolTip(
            _translate(
                "Form",
                "<!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:\'Sans Serif\'; font-size:7pt; 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;\">Checking this forces the camera to start <span style=\" font-style:italic;\">after</span> all</p>\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">other devices in the task have started so that it</p>\n"
                "<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">can correctly act as a starting trigger.</p></body></html>"
            ))
        self.triggerCheck.setText(_translate("Form", "Camera triggers task"))
        self.releaseBetweenRadio.setText(
            _translate("Form", "Release between tasks"))
        self.releaseAfterRadio.setText(
            _translate("Form", "Release after sequence"))
コード例 #5
0
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(587, 333)
        self.gridLayout = QtWidgets.QGridLayout(Form)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.splitter = QtWidgets.QSplitter(Form)
        self.splitter.setOrientation(Qt.Qt.Horizontal)
        self.splitter.setObjectName("splitter")
        self.layoutWidget = QtWidgets.QWidget(self.splitter)
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.calibrationList = QtWidgets.QTreeWidget(self.layoutWidget)
        self.calibrationList.setRootIsDecorated(False)
        self.calibrationList.setItemsExpandable(False)
        self.calibrationList.setObjectName("calibrationList")
        self.calibrationList.header().setStretchLastSection(True)
        self.verticalLayout.addWidget(self.calibrationList)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.calibrateBtn = QtWidgets.QPushButton(self.layoutWidget)
        self.calibrateBtn.setObjectName("calibrateBtn")
        self.horizontalLayout_2.addWidget(self.calibrateBtn)
        self.deleteBtn = QtWidgets.QPushButton(self.layoutWidget)
        self.deleteBtn.setObjectName("deleteBtn")
        self.horizontalLayout_2.addWidget(self.deleteBtn)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.groupBox = QtWidgets.QGroupBox(self.layoutWidget)
        self.groupBox.setAlignment(Qt.Qt.AlignCenter)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout_3 = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout_3.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_3.setSpacing(0)
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.gridLayout_2 = QtWidgets.QGridLayout()
        self.gridLayout_2.setVerticalSpacing(0)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.label = QtWidgets.QLabel(self.groupBox)
        self.label.setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignTrailing
                                | Qt.Qt.AlignVCenter)
        self.label.setObjectName("label")
        self.gridLayout_2.addWidget(self.label, 4, 0, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.groupBox)
        self.label_4.setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignTrailing
                                  | Qt.Qt.AlignVCenter)
        self.label_4.setObjectName("label_4")
        self.gridLayout_2.addWidget(self.label_4, 5, 0, 1, 1)
        self.label_5 = QtWidgets.QLabel(self.groupBox)
        self.label_5.setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignTrailing
                                  | Qt.Qt.AlignVCenter)
        self.label_5.setObjectName("label_5")
        self.gridLayout_2.addWidget(self.label_5, 4, 2, 1, 1)
        self.label_6 = QtWidgets.QLabel(self.groupBox)
        self.label_6.setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignTrailing
                                  | Qt.Qt.AlignVCenter)
        self.label_6.setObjectName("label_6")
        self.gridLayout_2.addWidget(self.label_6, 5, 2, 1, 1)
        self.yMaxSpin = QtWidgets.QDoubleSpinBox(self.groupBox)
        self.yMaxSpin.setMinimum(-10.0)
        self.yMaxSpin.setMaximum(10.0)
        self.yMaxSpin.setSingleStep(0.1)
        self.yMaxSpin.setProperty("value", 2.0)
        self.yMaxSpin.setObjectName("yMaxSpin")
        self.gridLayout_2.addWidget(self.yMaxSpin, 5, 3, 1, 1)
        self.scanDurationSpin = QtWidgets.QDoubleSpinBox(self.groupBox)
        self.scanDurationSpin.setMinimum(0.01)
        self.scanDurationSpin.setMaximum(100.0)
        self.scanDurationSpin.setProperty("value", 5.0)
        self.scanDurationSpin.setObjectName("scanDurationSpin")
        self.gridLayout_2.addWidget(self.scanDurationSpin, 2, 3, 1, 1)
        self.xMinSpin = QtWidgets.QDoubleSpinBox(self.groupBox)
        self.xMinSpin.setMinimum(-10.0)
        self.xMinSpin.setMaximum(10.0)
        self.xMinSpin.setSingleStep(0.1)
        self.xMinSpin.setProperty("value", -2.0)
        self.xMinSpin.setObjectName("xMinSpin")
        self.gridLayout_2.addWidget(self.xMinSpin, 4, 1, 1, 1)
        self.scanLabel = QtWidgets.QLabel(self.groupBox)
        self.scanLabel.setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignTrailing
                                    | Qt.Qt.AlignVCenter)
        self.scanLabel.setObjectName("scanLabel")
        self.gridLayout_2.addWidget(self.scanLabel, 2, 2, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.groupBox)
        self.label_2.setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignTrailing
                                  | Qt.Qt.AlignVCenter)
        self.label_2.setObjectName("label_2")
        self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1)
        self.cameraCombo = InterfaceCombo(self.groupBox)
        self.cameraCombo.setObjectName("cameraCombo")
        self.gridLayout_2.addWidget(self.cameraCombo, 1, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.groupBox)
        self.label_3.setAlignment(Qt.Qt.AlignRight | Qt.Qt.AlignTrailing
                                  | Qt.Qt.AlignVCenter)
        self.label_3.setObjectName("label_3")
        self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
        self.laserCombo = InterfaceCombo(self.groupBox)
        self.laserCombo.setObjectName("laserCombo")
        self.gridLayout_2.addWidget(self.laserCombo, 2, 1, 1, 1)
        self.storeCamConfBtn = QtWidgets.QPushButton(self.groupBox)
        self.storeCamConfBtn.setObjectName("storeCamConfBtn")
        self.gridLayout_2.addWidget(self.storeCamConfBtn, 1, 2, 1, 2)
        spacerItem = QtWidgets.QSpacerItem(20, 10,
                                           QtWidgets.QSizePolicy.Minimum,
                                           QtWidgets.QSizePolicy.Preferred)
        self.gridLayout_2.addItem(spacerItem, 3, 1, 1, 1)
        self.yMinSpin = QtWidgets.QDoubleSpinBox(self.groupBox)
        self.yMinSpin.setMinimum(-10.0)
        self.yMinSpin.setMaximum(10.0)
        self.yMinSpin.setSingleStep(0.1)
        self.yMinSpin.setProperty("value", -2.0)
        self.yMinSpin.setObjectName("yMinSpin")
        self.gridLayout_2.addWidget(self.yMinSpin, 4, 3, 1, 1)
        self.xMaxSpin = QtWidgets.QDoubleSpinBox(self.groupBox)
        self.xMaxSpin.setMinimum(-10.0)
        self.xMaxSpin.setMaximum(10.0)
        self.xMaxSpin.setSingleStep(0.1)
        self.xMaxSpin.setProperty("value", 2.0)
        self.xMaxSpin.setObjectName("xMaxSpin")
        self.gridLayout_2.addWidget(self.xMaxSpin, 5, 1, 1, 1)
        self.gridLayout_3.addLayout(self.gridLayout_2, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.groupBox)
        self.shutterGroup = QtWidgets.QGroupBox(self.layoutWidget)
        self.shutterGroup.setAlignment(Qt.Qt.AlignCenter)
        self.shutterGroup.setObjectName("shutterGroup")
        self.gridLayout_4 = QtWidgets.QGridLayout(self.shutterGroup)
        self.gridLayout_4.setContentsMargins(0, 0, 0, 0)
        self.gridLayout_4.setHorizontalSpacing(5)
        self.gridLayout_4.setVerticalSpacing(0)
        self.gridLayout_4.setObjectName("gridLayout_4")
        self.shutterBtn = QtWidgets.QPushButton(self.shutterGroup)
        self.shutterBtn.setObjectName("shutterBtn")
        self.gridLayout_4.addWidget(self.shutterBtn, 0, 5, 1, 1)
        self.label_7 = QtWidgets.QLabel(self.shutterGroup)
        self.label_7.setObjectName("label_7")
        self.gridLayout_4.addWidget(self.label_7, 0, 0, 1, 1)
        self.shutterXSpin = QtWidgets.QDoubleSpinBox(self.shutterGroup)
        self.shutterXSpin.setEnabled(False)
        self.shutterXSpin.setDecimals(3)
        self.shutterXSpin.setMinimum(-10.0)
        self.shutterXSpin.setMaximum(10.0)
        self.shutterXSpin.setObjectName("shutterXSpin")
        self.gridLayout_4.addWidget(self.shutterXSpin, 0, 1, 1, 1)
        self.label_8 = QtWidgets.QLabel(self.shutterGroup)
        self.label_8.setObjectName("label_8")
        self.gridLayout_4.addWidget(self.label_8, 0, 2, 1, 1)
        self.shutterYSpin = QtWidgets.QDoubleSpinBox(self.shutterGroup)
        self.shutterYSpin.setEnabled(False)
        self.shutterYSpin.setDecimals(3)
        self.shutterYSpin.setMinimum(-10.0)
        self.shutterYSpin.setMaximum(10.0)
        self.shutterYSpin.setObjectName("shutterYSpin")
        self.gridLayout_4.addWidget(self.shutterYSpin, 0, 3, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20,
                                            QtWidgets.QSizePolicy.Expanding,
                                            QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_4.addItem(spacerItem1, 0, 4, 1, 1)
        self.verticalLayout.addWidget(self.shutterGroup)
        self.view = ImageView(self.splitter)
        self.view.setObjectName("view")
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)

        self.retranslateUi(Form)
        Qt.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        _translate = Qt.QCoreApplication.translate
        Form.setWindowTitle(_translate("Form", "Form"))
        self.calibrationList.headerItem().setText(0,
                                                  _translate("Form", "Optics"))
        self.calibrationList.headerItem().setText(1,
                                                  _translate("Form", "Laser"))
        self.calibrationList.headerItem().setText(2,
                                                  _translate("Form", "Spot"))
        self.calibrationList.headerItem().setText(3,
                                                  _translate("Form", "Date"))
        self.calibrateBtn.setText(_translate("Form", "Calibrate"))
        self.deleteBtn.setText(_translate("Form", "Delete"))
        self.groupBox.setTitle(_translate("Form", "Calibration Parameters"))
        self.label.setText(_translate("Form", "X min"))
        self.label_4.setText(_translate("Form", "X max"))
        self.label_5.setText(_translate("Form", "Y min"))
        self.label_6.setText(_translate("Form", "Y max"))
        self.yMaxSpin.setSuffix(_translate("Form", " V"))
        self.scanDurationSpin.setSuffix(_translate("Form", " s"))
        self.xMinSpin.setSuffix(_translate("Form", " V"))
        self.scanLabel.setText(_translate("Form", "Scan duration:"))
        self.label_2.setText(_translate("Form", "Camera:"))
        self.label_3.setText(_translate("Form", "Laser:"))
        self.storeCamConfBtn.setToolTip(
            _translate(
                "Form",
                "Remember the current camera configuration (including exposure time, ROI, etc) to use whenever calibrating against this camera."
            ))
        self.storeCamConfBtn.setText(_translate("Form", "Store Camera Config"))
        self.yMinSpin.setSuffix(_translate("Form", " V"))
        self.xMaxSpin.setSuffix(_translate("Form", " V"))
        self.shutterGroup.setTitle(_translate("Form", "Virtual Shutter"))
        self.shutterBtn.setText(_translate("Form", "Close Shutter"))
        self.label_7.setText(_translate("Form", "X"))
        self.label_8.setText(_translate("Form", "Y"))
コード例 #6
0
ファイル: DeviceTemplate.py プロジェクト: ablot/acq4
class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(587, 333)
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setMargin(0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.splitter = QtGui.QSplitter(Form)
        self.splitter.setOrientation(QtCore.Qt.Horizontal)
        self.splitter.setObjectName(_fromUtf8("splitter"))
        self.layoutWidget = QtGui.QWidget(self.splitter)
        self.layoutWidget.setObjectName(_fromUtf8("layoutWidget"))
        self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setMargin(0)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.calibrationList = QtGui.QTreeWidget(self.layoutWidget)
        self.calibrationList.setRootIsDecorated(False)
        self.calibrationList.setItemsExpandable(False)
        self.calibrationList.setObjectName(_fromUtf8("calibrationList"))
        self.calibrationList.header().setStretchLastSection(True)
        self.verticalLayout.addWidget(self.calibrationList)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.calibrateBtn = QtGui.QPushButton(self.layoutWidget)
        self.calibrateBtn.setObjectName(_fromUtf8("calibrateBtn"))
        self.horizontalLayout_2.addWidget(self.calibrateBtn)
        self.deleteBtn = QtGui.QPushButton(self.layoutWidget)
        self.deleteBtn.setObjectName(_fromUtf8("deleteBtn"))
        self.horizontalLayout_2.addWidget(self.deleteBtn)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.groupBox = QtGui.QGroupBox(self.layoutWidget)
        self.groupBox.setAlignment(QtCore.Qt.AlignCenter)
        self.groupBox.setObjectName(_fromUtf8("groupBox"))
        self.gridLayout_3 = QtGui.QGridLayout(self.groupBox)
        self.gridLayout_3.setMargin(0)
        self.gridLayout_3.setSpacing(0)
        self.gridLayout_3.setObjectName(_fromUtf8("gridLayout_3"))
        self.gridLayout_2 = QtGui.QGridLayout()
        self.gridLayout_2.setVerticalSpacing(0)
        self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
        self.label = QtGui.QLabel(self.groupBox)
        self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout_2.addWidget(self.label, 4, 0, 1, 1)
        self.label_4 = QtGui.QLabel(self.groupBox)
        self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridLayout_2.addWidget(self.label_4, 5, 0, 1, 1)
        self.label_5 = QtGui.QLabel(self.groupBox)
        self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_5.setObjectName(_fromUtf8("label_5"))
        self.gridLayout_2.addWidget(self.label_5, 4, 2, 1, 1)
        self.label_6 = QtGui.QLabel(self.groupBox)
        self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_6.setObjectName(_fromUtf8("label_6"))
        self.gridLayout_2.addWidget(self.label_6, 5, 2, 1, 1)
        self.yMaxSpin = QtGui.QDoubleSpinBox(self.groupBox)
        self.yMaxSpin.setMinimum(-10.0)
        self.yMaxSpin.setMaximum(10.0)
        self.yMaxSpin.setSingleStep(0.1)
        self.yMaxSpin.setProperty("value", 2.0)
        self.yMaxSpin.setObjectName(_fromUtf8("yMaxSpin"))
        self.gridLayout_2.addWidget(self.yMaxSpin, 5, 3, 1, 1)
        self.scanDurationSpin = QtGui.QDoubleSpinBox(self.groupBox)
        self.scanDurationSpin.setMinimum(0.01)
        self.scanDurationSpin.setMaximum(100.0)
        self.scanDurationSpin.setProperty("value", 5.0)
        self.scanDurationSpin.setObjectName(_fromUtf8("scanDurationSpin"))
        self.gridLayout_2.addWidget(self.scanDurationSpin, 2, 3, 1, 1)
        self.xMinSpin = QtGui.QDoubleSpinBox(self.groupBox)
        self.xMinSpin.setMinimum(-10.0)
        self.xMinSpin.setMaximum(10.0)
        self.xMinSpin.setSingleStep(0.1)
        self.xMinSpin.setProperty("value", -2.0)
        self.xMinSpin.setObjectName(_fromUtf8("xMinSpin"))
        self.gridLayout_2.addWidget(self.xMinSpin, 4, 1, 1, 1)
        self.scanLabel = QtGui.QLabel(self.groupBox)
        self.scanLabel.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.scanLabel.setObjectName(_fromUtf8("scanLabel"))
        self.gridLayout_2.addWidget(self.scanLabel, 2, 2, 1, 1)
        self.label_2 = QtGui.QLabel(self.groupBox)
        self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout_2.addWidget(self.label_2, 1, 0, 1, 1)
        self.cameraCombo = InterfaceCombo(self.groupBox)
        self.cameraCombo.setObjectName(_fromUtf8("cameraCombo"))
        self.gridLayout_2.addWidget(self.cameraCombo, 1, 1, 1, 1)
        self.label_3 = QtGui.QLabel(self.groupBox)
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout_2.addWidget(self.label_3, 2, 0, 1, 1)
        self.laserCombo = InterfaceCombo(self.groupBox)
        self.laserCombo.setObjectName(_fromUtf8("laserCombo"))
        self.gridLayout_2.addWidget(self.laserCombo, 2, 1, 1, 1)
        self.storeCamConfBtn = QtGui.QPushButton(self.groupBox)
        self.storeCamConfBtn.setObjectName(_fromUtf8("storeCamConfBtn"))
        self.gridLayout_2.addWidget(self.storeCamConfBtn, 1, 2, 1, 2)
        spacerItem = QtGui.QSpacerItem(20, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Preferred)
        self.gridLayout_2.addItem(spacerItem, 3, 1, 1, 1)
        self.yMinSpin = QtGui.QDoubleSpinBox(self.groupBox)
        self.yMinSpin.setMinimum(-10.0)
        self.yMinSpin.setMaximum(10.0)
        self.yMinSpin.setSingleStep(0.1)
        self.yMinSpin.setProperty("value", -2.0)
        self.yMinSpin.setObjectName(_fromUtf8("yMinSpin"))
        self.gridLayout_2.addWidget(self.yMinSpin, 4, 3, 1, 1)
        self.xMaxSpin = QtGui.QDoubleSpinBox(self.groupBox)
        self.xMaxSpin.setMinimum(-10.0)
        self.xMaxSpin.setMaximum(10.0)
        self.xMaxSpin.setSingleStep(0.1)
        self.xMaxSpin.setProperty("value", 2.0)
        self.xMaxSpin.setObjectName(_fromUtf8("xMaxSpin"))
        self.gridLayout_2.addWidget(self.xMaxSpin, 5, 1, 1, 1)
        self.gridLayout_3.addLayout(self.gridLayout_2, 0, 0, 1, 1)
        self.verticalLayout.addWidget(self.groupBox)
        self.shutterGroup = QtGui.QGroupBox(self.layoutWidget)
        self.shutterGroup.setAlignment(QtCore.Qt.AlignCenter)
        self.shutterGroup.setObjectName(_fromUtf8("shutterGroup"))
        self.gridLayout_4 = QtGui.QGridLayout(self.shutterGroup)
        self.gridLayout_4.setMargin(0)
        self.gridLayout_4.setHorizontalSpacing(5)
        self.gridLayout_4.setVerticalSpacing(0)
        self.gridLayout_4.setObjectName(_fromUtf8("gridLayout_4"))
        self.shutterBtn = QtGui.QPushButton(self.shutterGroup)
        self.shutterBtn.setObjectName(_fromUtf8("shutterBtn"))
        self.gridLayout_4.addWidget(self.shutterBtn, 0, 5, 1, 1)
        self.label_7 = QtGui.QLabel(self.shutterGroup)
        self.label_7.setObjectName(_fromUtf8("label_7"))
        self.gridLayout_4.addWidget(self.label_7, 0, 0, 1, 1)
        self.shutterXSpin = QtGui.QDoubleSpinBox(self.shutterGroup)
        self.shutterXSpin.setEnabled(False)
        self.shutterXSpin.setDecimals(3)
        self.shutterXSpin.setMinimum(-10.0)
        self.shutterXSpin.setMaximum(10.0)
        self.shutterXSpin.setObjectName(_fromUtf8("shutterXSpin"))
        self.gridLayout_4.addWidget(self.shutterXSpin, 0, 1, 1, 1)
        self.label_8 = QtGui.QLabel(self.shutterGroup)
        self.label_8.setObjectName(_fromUtf8("label_8"))
        self.gridLayout_4.addWidget(self.label_8, 0, 2, 1, 1)
        self.shutterYSpin = QtGui.QDoubleSpinBox(self.shutterGroup)
        self.shutterYSpin.setEnabled(False)
        self.shutterYSpin.setDecimals(3)
        self.shutterYSpin.setMinimum(-10.0)
        self.shutterYSpin.setMaximum(10.0)
        self.shutterYSpin.setObjectName(_fromUtf8("shutterYSpin"))
        self.gridLayout_4.addWidget(self.shutterYSpin, 0, 3, 1, 1)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.gridLayout_4.addItem(spacerItem1, 0, 4, 1, 1)
        self.verticalLayout.addWidget(self.shutterGroup)
        self.view = ImageView(self.splitter)
        self.view.setObjectName(_fromUtf8("view"))
        self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)

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

    def retranslateUi(self, Form):
        Form.setWindowTitle(_translate("Form", "Form", None))
        self.calibrationList.headerItem().setText(0, _translate("Form", "Optics", None))
        self.calibrationList.headerItem().setText(1, _translate("Form", "Laser", None))
        self.calibrationList.headerItem().setText(2, _translate("Form", "Spot", None))
        self.calibrationList.headerItem().setText(3, _translate("Form", "Date", None))
        self.calibrateBtn.setText(_translate("Form", "Calibrate", None))
        self.deleteBtn.setText(_translate("Form", "Delete", None))
        self.groupBox.setTitle(_translate("Form", "Calibration Parameters", None))
        self.label.setText(_translate("Form", "X min", None))
        self.label_4.setText(_translate("Form", "X max", None))
        self.label_5.setText(_translate("Form", "Y min", None))
        self.label_6.setText(_translate("Form", "Y max", None))
        self.yMaxSpin.setSuffix(_translate("Form", " V", None))
        self.scanDurationSpin.setSuffix(_translate("Form", " s", None))
        self.xMinSpin.setSuffix(_translate("Form", " V", None))
        self.scanLabel.setText(_translate("Form", "Scan duration:", None))
        self.label_2.setText(_translate("Form", "Camera:", None))
        self.label_3.setText(_translate("Form", "Laser:", None))
        self.storeCamConfBtn.setToolTip(_translate("Form", "Remember the current camera configuration (including exposure time, ROI, etc) to use whenever calibrating against this camera.", None))
        self.storeCamConfBtn.setText(_translate("Form", "Store Camera Config", None))
        self.yMinSpin.setSuffix(_translate("Form", " V", None))
        self.xMaxSpin.setSuffix(_translate("Form", " V", None))
        self.shutterGroup.setTitle(_translate("Form", "Virtual Shutter", None))
        self.shutterBtn.setText(_translate("Form", "Close Shutter", None))
        self.label_7.setText(_translate("Form", "X", None))
        self.label_8.setText(_translate("Form", "Y", None))