def __init__(self, mainWindow=None): super(bLineProfileWidget, self).__init__() self.mainWindow = mainWindow # usually bStackWidget self.updateDict = None self.currSlabIdx = None # so we can commit self.currentSlice = None # so we can commit # grab local copies, do not change options self.lineRadius = self.mainWindow.getOptions()['LineProfile']['lineRadius'] #12 # pixels self.lineWidth = self.mainWindow.getOptions()['LineProfile']['lineWidth'] #5 self.medianFilter = self.mainWindow.getOptions()['LineProfile']['medianFilter'] #5 self.halfHeight = self.mainWindow.getOptions()['LineProfile']['halfHeight'] #0.5 self.plusMinusSlidingZ = self.mainWindow.getOptions()['LineProfile']['plusMinusSlidingZ'] #0.5 self.doUpdate = True # set to false to not update on signal/slot self.setMaximumHeight(220) # if adding rows, make this bigger self.myHBoxLayout = QtWidgets.QHBoxLayout(self) # # to hold control panel self.leftGridLayout = QtWidgets.QGridLayout() # abb aics, removed (self) myRow = 0 ''' # nudge up button nudgeUpButton = QtWidgets.QPushButton('Nudge Up') nudgeUpButton.clicked.connect(self.nudgeUp_Callback) self.leftGridLayout.addWidget(nudgeUpButton, myRow, 0) # nudge down button nudgeUpButton = QtWidgets.QPushButton('Nudge Down') nudgeUpButton.clicked.connect(self.nudgeDown_Callback) self.leftGridLayout.addWidget(nudgeUpButton, myRow, 1) myRow += 1 ''' # line radius for intensity profile myLabel = QtWidgets.QLabel('Line Radius (pixels)') lineRadiusSpinBox = QtWidgets.QSpinBox() lineRadiusSpinBox.setMinimum(1) lineRadiusSpinBox.setValue(self.lineRadius) lineRadiusSpinBox.valueChanged.connect(self.lineRadius_Callback) self.leftGridLayout.addWidget(myLabel, myRow, 0) self.leftGridLayout.addWidget(lineRadiusSpinBox, myRow, 1) myRow += 1 # line width for intensity profile myLabel = QtWidgets.QLabel('Line Width (pixels)') lineWidthSpinBox = QtWidgets.QSpinBox() lineWidthSpinBox.setMinimum(1) lineWidthSpinBox.setValue(self.lineWidth) lineWidthSpinBox.valueChanged.connect(self.lineWidth_Callback) self.leftGridLayout.addWidget(myLabel, myRow, 0) self.leftGridLayout.addWidget(lineWidthSpinBox, myRow, 1) myRow += 1 # median filter size (pixels) myLabel = QtWidgets.QLabel('Median Filter (pixels)') medianFilterSpinbox = QtWidgets.QSpinBox() medianFilterSpinbox.setMinimum(0) medianFilterSpinbox.setValue(self.medianFilter) medianFilterSpinbox.valueChanged.connect(self.medianFilter_Callback) self.leftGridLayout.addWidget(myLabel, myRow, 0) self.leftGridLayout.addWidget(medianFilterSpinbox, myRow, 1) myRow += 1 # half height b/w 0.0 and 1.0 myLabel = QtWidgets.QLabel('Half Height') halfHeightSpinbox = QtWidgets.QDoubleSpinBox() halfHeightSpinbox.setMinimum(0.0) halfHeightSpinbox.setMaximum(1.0) halfHeightSpinbox.setSingleStep(0.05) halfHeightSpinbox.setValue(self.halfHeight) halfHeightSpinbox.valueChanged.connect(self.halfHeight_Callback) self.leftGridLayout.addWidget(myLabel, myRow, 0) self.leftGridLayout.addWidget(halfHeightSpinbox, myRow, 1) myRow += 1 # +/- for sliding z myLabel = QtWidgets.QLabel('+/- Sliding Z') slidingZ_Spinbox = QtWidgets.QSpinBox() slidingZ_Spinbox.setMinimum(0) #slidingZ_Spinbox.setMaximum(1.0) slidingZ_Spinbox.setSingleStep(1) slidingZ_Spinbox.setValue(self.plusMinusSlidingZ) slidingZ_Spinbox.valueChanged.connect(self.slidingZ_Callback) self.leftGridLayout.addWidget(myLabel, myRow, 0) self.leftGridLayout.addWidget(slidingZ_Spinbox, myRow, 1) myRow += 1 # # report results self.myMin = QtWidgets.QLabel('Min: None') self.myMax = QtWidgets.QLabel('Max: None') self.mySNR = QtWidgets.QLabel('SNR: None') self.myDiameter = QtWidgets.QLabel('Diam(pixels): None') self.leftGridLayout.addWidget(self.myMin, myRow, 0) self.leftGridLayout.addWidget(self.myMax, myRow, 1) myRow += 1 self.leftGridLayout.addWidget(self.mySNR, myRow, 0) self.leftGridLayout.addWidget(self.myDiameter, myRow, 1) myRow += 1 myCommitButton = QtWidgets.QPushButton('Commit') myCommitButton.setToolTip('Commit z and diameter (for ROIs)') self.myDiameter_um = QtWidgets.QLabel('Diam(um): None') self.leftGridLayout.addWidget(myCommitButton, myRow, 0) self.leftGridLayout.addWidget(self.myDiameter_um, myRow, 1) # add self.myHBoxLayout.addLayout(self.leftGridLayout, stretch=2) # # to hold plot self.figure = Figure(constrained_layout=True) # need size otherwise square image gets squished in y? self.canvas = backend_qt5agg.FigureCanvas(self.figure) #self.axes = self.figure.add_axes([0, 0, 1, 1]) #remove white border self.axes = self.figure.add_subplot(111) self.axes.patch.set_facecolor("black") self.figure.set_facecolor("black") self.myHBoxLayout.addWidget(self.canvas, stretch=8)
def __init__(self, parent_layout, rtaTab, prefs): self.parent_layout = parent_layout self.rta_tab = rtaTab self.preferences = prefs self.rta_controls_layout = FlowLayout() self.rta_controls_layout.setObjectName("rtaControlsLayout") self.rta_view_label = QtWidgets.QLabel(self.rta_tab) self.rta_view_label.setObjectName("rtaViewLabel") self.rta_controls_layout.addWidget(self.rta_view_label) self.rta_view = QtWidgets.QComboBox(self.rta_tab) self.rta_view.setObjectName("rtaView") self.rta_view.addItem("") self.rta_view.addItem("") self.rta_view.addItem("") self.rta_controls_layout.addWidget(self.rta_view) self.hold_time_label = QtWidgets.QLabel(self.rta_tab) self.hold_time_label.setObjectName("holdTimeLabel") self.rta_controls_layout.addWidget(self.hold_time_label) self.hold_secs = QtWidgets.QDoubleSpinBox(self.rta_tab) self.hold_secs.setDecimals(1) self.hold_secs.setMinimum(0.5) self.hold_secs.setMaximum(30.0) self.hold_secs.setSingleStep(0.1) self.hold_secs.setProperty("value", self.preferences.get(RTA_HOLD_SECONDS)) self.hold_secs.setObjectName("holdSecs") self.rta_controls_layout.addWidget(self.hold_secs) self.show_live = QtWidgets.QPushButton(self.rta_tab) self.show_live.setCheckable(True) self.show_live.setChecked(True) self.show_live.setObjectName("showLive") self.rta_controls_layout.addWidget(self.show_live) self.show_peak = QtWidgets.QPushButton(self.rta_tab) self.show_peak.setCheckable(True) self.show_peak.setObjectName("showPeak") self.rta_controls_layout.addWidget(self.show_peak) self.show_average = QtWidgets.QPushButton(self.rta_tab) self.show_average.setCheckable(True) self.show_average.setObjectName("showAverage") self.rta_controls_layout.addWidget(self.show_average) self.show_target = QtWidgets.QPushButton(self.rta_tab) self.show_target.setCheckable(True) self.show_target.setObjectName("showTarget") self.rta_controls_layout.addWidget(self.show_target) self.target_adjust_db = QtWidgets.QDoubleSpinBox(self.rta_tab) self.target_adjust_db.setDecimals(1) self.target_adjust_db.setMinimum(-150.0) self.target_adjust_db.setMaximum(150.0) self.target_adjust_db.setSingleStep(0.1) self.target_adjust_db.setObjectName("targetAdjust") self.rta_controls_layout.addWidget(self.target_adjust_db) self.smooth_rta = QtWidgets.QPushButton(self.rta_tab) self.smooth_rta.setCheckable(True) self.smooth_rta.setObjectName("smoothRta") self.rta_controls_layout.addWidget(self.smooth_rta) self.sg_window_length = QtWidgets.QSpinBox(self.rta_tab) self.sg_window_length.setMinimum(1) self.sg_window_length.setMaximum(201) self.sg_window_length.setSingleStep(2) self.sg_window_length.setProperty( "value", self.preferences.get(RTA_SMOOTH_WINDOW)) self.sg_window_length.setObjectName("sgWindowLength") self.sg_window_length.lineEdit().setReadOnly(True) self.sg_window_length.setToolTip('Higher values = smoother curves') self.rta_controls_layout.addWidget(self.sg_window_length) self.sg_poly_order = QtWidgets.QSpinBox(self.rta_tab) self.sg_poly_order.setMinimum(1) self.sg_poly_order.setMaximum(11) self.sg_poly_order.setProperty("value", self.preferences.get(RTA_SMOOTH_POLY)) self.sg_poly_order.setObjectName("sgPolyOrder") self.sg_poly_order.setToolTip('Lower values = smoother curves') self.rta_controls_layout.addWidget(self.sg_poly_order) spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.rta_controls_layout.addItem(spacerItem5) self.toggle_crosshairs = QtWidgets.QPushButton(self.rta_tab) self.toggle_crosshairs.setCheckable(True) self.toggle_crosshairs.setObjectName("toggleCrosshairs") self.rta_controls_layout.addWidget(self.toggle_crosshairs) self.save_config = QtWidgets.QToolButton(self.rta_tab) self.save_config.setObjectName("saveConfig") self.save_config.clicked.connect(self.__save_config) self.rta_controls_layout.addWidget(self.save_config) self.export_frd = QtWidgets.QToolButton(self.rta_tab) self.export_frd.setObjectName("exportFRD") self.rta_controls_layout.addWidget(self.export_frd) self.parent_layout.addLayout(self.rta_controls_layout, 0, 0, 1, 1) _translate = QtCore.QCoreApplication.translate self.rta_view_label.setText(_translate("MainWindow", "View")) self.rta_view.setItemText(0, _translate("MainWindow", "avg")) self.rta_view.setItemText(1, _translate("MainWindow", "peak")) self.rta_view.setItemText(2, _translate("MainWindow", "psd")) self.hold_time_label.setText(_translate("MainWindow", "Hold Time:")) self.hold_secs.setToolTip( _translate("MainWindow", "Seconds of data to include in peak calculation")) self.hold_secs.setSuffix(_translate("MainWindow", " s")) self.show_live.setText(_translate("MainWindow", "Live")) self.show_peak.setText(_translate("MainWindow", "Peak")) self.show_average.setText(_translate("MainWindow", "Average")) self.show_target.setText(_translate("MainWindow", "Target")) self.target_adjust_db.setSuffix(_translate("MainWindow", " dB")) self.target_adjust_db.setToolTip( 'Adjusts the level of the target curve') self.smooth_rta.setText(_translate("MainWindow", "Smooth")) self.toggle_crosshairs.setText( _translate("MainWindow", "Move Crosshairs")) self.toggle_crosshairs.setShortcut(_translate("MainWindow", "Ctrl+T")) self.toggle_crosshairs.setToolTip('Press CTRL+T to toggle') self.save_config.setIcon(qta.icon('fa5s.save')) self.save_config.setShortcut(_translate("MainWindow", "Ctrl+Shift+S")) self.save_config.setToolTip( 'Press CTRL+SHIFT+S to save the current config') self.export_frd.setText(_translate("MainWindow", "...")) self.export_frd.setIcon(qta.icon('fa5s.file-export'))
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(637, 663) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.main_layout = QtWidgets.QVBoxLayout(Dialog) self.main_layout.setObjectName("main_layout") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.path_label = QtWidgets.QLabel(Dialog) self.path_label.setObjectName("path_label") self.horizontalLayout_2.addWidget(self.path_label) self.path_edit = QtWidgets.QLineEdit(Dialog) self.path_edit.setObjectName("path_edit") self.horizontalLayout_2.addWidget(self.path_edit) self.choose_dir_button = QtWidgets.QToolButton(Dialog) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/loadfile.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.choose_dir_button.setIcon(icon) self.choose_dir_button.setObjectName("choose_dir_button") self.horizontalLayout_2.addWidget(self.choose_dir_button) self.main_layout.addLayout(self.horizontalLayout_2) self.newfolder_option = QtWidgets.QCheckBox(Dialog) self.newfolder_option.setChecked(True) self.newfolder_option.setObjectName("newfolder_option") self.main_layout.addWidget(self.newfolder_option) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.filename_label = QtWidgets.QLabel(Dialog) self.filename_label.setObjectName("filename_label") self.horizontalLayout_3.addWidget(self.filename_label) self.filename_edit = QtWidgets.QLineEdit(Dialog) self.filename_edit.setClearButtonEnabled(True) self.filename_edit.setObjectName("filename_edit") self.horizontalLayout_3.addWidget(self.filename_edit) self.filename_suffix_label = QtWidgets.QLabel(Dialog) self.filename_suffix_label.setObjectName("filename_suffix_label") self.horizontalLayout_3.addWidget(self.filename_suffix_label) self.main_layout.addLayout(self.horizontalLayout_3) self.output_group = QtWidgets.QGroupBox(Dialog) self.output_group.setObjectName("output_group") self.output_layout = QtWidgets.QVBoxLayout(self.output_group) self.output_layout.setObjectName("output_layout") self.assembly_radio = QtWidgets.QRadioButton(self.output_group) self.assembly_radio.setChecked(True) self.assembly_radio.setObjectName("assembly_radio") self.output_layout.addWidget(self.assembly_radio) self.assembly_group = QtWidgets.QWidget(self.output_group) self.assembly_group.setObjectName("assembly_group") self.assembly_layout = QtWidgets.QVBoxLayout(self.assembly_group) self.assembly_layout.setObjectName("assembly_layout") self.assembly_label = QtWidgets.QLabel(self.assembly_group) self.assembly_label.setWordWrap(True) self.assembly_label.setObjectName("assembly_label") self.assembly_layout.addWidget(self.assembly_label) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.link_radius_label = QtWidgets.QLabel(self.assembly_group) self.link_radius_label.setObjectName("link_radius_label") self.horizontalLayout_5.addWidget(self.link_radius_label) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem) self.link_radius = QtWidgets.QDoubleSpinBox(self.assembly_group) self.link_radius.setMinimum(0.01) self.link_radius.setProperty("value", 10.0) self.link_radius.setObjectName("link_radius") self.horizontalLayout_5.addWidget(self.link_radius) self.assembly_layout.addLayout(self.horizontalLayout_5) self.output_layout.addWidget(self.assembly_group) self.frame_radio = QtWidgets.QRadioButton(self.output_group) self.frame_radio.setObjectName("frame_radio") self.output_layout.addWidget(self.frame_radio) self.frame_group = QtWidgets.QWidget(self.output_group) self.frame_group.setEnabled(False) self.frame_group.setObjectName("frame_group") self.verticalLayout = QtWidgets.QVBoxLayout(self.frame_group) self.verticalLayout.setObjectName("verticalLayout") self.frame_label = QtWidgets.QLabel(self.frame_group) self.frame_label.setWordWrap(True) self.frame_label.setObjectName("frame_label") self.verticalLayout.addWidget(self.frame_label) self.output_layout.addWidget(self.frame_group) self.main_layout.addWidget(self.output_group) self.groupBox = QtWidgets.QGroupBox(Dialog) self.groupBox.setObjectName("groupBox") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox) self.verticalLayout_2.setObjectName("verticalLayout_2") self.overwrite_radio = QtWidgets.QRadioButton(self.groupBox) self.overwrite_radio.setChecked(True) self.overwrite_radio.setObjectName("overwrite_radio") self.verticalLayout_2.addWidget(self.overwrite_radio) self.warn_radio = QtWidgets.QRadioButton(self.groupBox) self.warn_radio.setObjectName("warn_radio") self.verticalLayout_2.addWidget(self.warn_radio) self.main_layout.addWidget(self.groupBox) spacerItem1 = QtWidgets.QSpacerItem(20, 158, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.main_layout.addItem(spacerItem1) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem2) self.button_box = QtWidgets.QDialogButtonBox(Dialog) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Save) self.button_box.setObjectName("button_box") self.horizontalLayout.addWidget(self.button_box) self.main_layout.addLayout(self.horizontalLayout) self.retranslateUi(Dialog) self.button_box.rejected.connect(Dialog.reject) self.assembly_radio.toggled['bool'].connect( self.assembly_group.setEnabled) self.frame_radio.toggled['bool'].connect(self.frame_group.setEnabled) QtCore.QMetaObject.connectSlotsByName(Dialog)
from qtpy import QtCore, QtGui, QtWidgets from PyQt5 import sip authorized_classes = [sip._unpickle_type] objects = { "QtWidgets": { "QWidget": QtWidgets.QWidget(), "QCheckBox": QtWidgets.QCheckBox(checked=True), "QDoubleSpinBox": QtWidgets.QDoubleSpinBox(value=10.0), "QLineEdit": QtWidgets.QLineEdit("coucou"), "QPlainTextEdit": QtWidgets.QPlainTextEdit("coucou"), "QSpinBox": QtWidgets.QSpinBox(value=20), "QPushButton": QtWidgets.QPushButton(), }, "PyQt_pickable": { "QByteArray": QtCore.QByteArray(bytes(range(256))), "QColor": QtGui.QColor(10, 20, 30, 40), ## "QChar": # n'a plus l'air d'exister dans PyQt5 "QDate": QtCore.QDate(2020, 10, 31), "QDateTime": QtCore.QDateTime(2020, 10, 31, 20, 30), "QKeySequence": QtGui.QKeySequence(), ## "QLatin1Char": # n'a plus l'air d'exister dans PyQt5 ## "QLatin1String"# n'a plus l'air d'exister dans PyQt5 "QLine": QtCore.QLine(QtCore.QPoint(0, 1), QtCore.QPoint(2, 3)), "QLineF": QtCore.QLineF(QtCore.QPoint(0.0, 1.1), QtCore.QPoint(2.2, 3.3)), "QPen": QtGui.QPen(), "QBrush": QtGui.QBrush(), "QPoint": QtCore.QPoint(0, 1), "QPointF": QtCore.QPointF(0.0, 1.1), "QPolygon": QtGui.QPolygon([QtCore.QPoint(0, 1), QtCore.QPoint(2, 3)]), "QPolygonF": QtGui.QPolygonF([QtCore.QPoint(0.0, 1.1), QtCore.QPoint(2.2, 3.3)]),
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(461, 559) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("icons:synthesis.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout.setObjectName("verticalLayout") self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.max_gen_option = QtWidgets.QRadioButton(Dialog) self.max_gen_option.setChecked(True) self.max_gen_option.setObjectName("max_gen_option") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.max_gen_option) self.max_gen = QtWidgets.QSpinBox(Dialog) self.max_gen.setMinimum(0) self.max_gen.setMaximum(5000) self.max_gen.setSingleStep(100) self.max_gen.setProperty("value", 1000) self.max_gen.setObjectName("max_gen") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.max_gen) self.min_fit_option = QtWidgets.QRadioButton(Dialog) self.min_fit_option.setObjectName("min_fit_option") self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.min_fit_option) self.min_fit = QtWidgets.QDoubleSpinBox(Dialog) self.min_fit.setEnabled(False) self.min_fit.setMaximum(2000.0) self.min_fit.setProperty("value", 25.0) self.min_fit.setObjectName("min_fit") self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.min_fit) self.report_label = QtWidgets.QLabel(Dialog) self.report_label.setObjectName("report_label") self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.report_label) self.report = QtWidgets.QSpinBox(Dialog) self.report.setProperty("value", 10) self.report.setObjectName("report") self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.report) self.max_time_option = QtWidgets.QRadioButton(Dialog) self.max_time_option.setObjectName("max_time_option") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.max_time_option) self.max_time = QtWidgets.QWidget(Dialog) self.max_time.setEnabled(False) self.max_time.setObjectName("max_time") self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.max_time) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.max_time_h = QtWidgets.QSpinBox(self.max_time) self.max_time_h.setObjectName("max_time_h") self.horizontalLayout_2.addWidget(self.max_time_h) self.label_2 = QtWidgets.QLabel(self.max_time) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_2.sizePolicy().hasHeightForWidth()) self.label_2.setSizePolicy(sizePolicy) self.label_2.setObjectName("label_2") self.horizontalLayout_2.addWidget(self.label_2) self.max_time_m = QtWidgets.QSpinBox(self.max_time) self.max_time_m.setMaximum(59) self.max_time_m.setProperty("value", 15) self.max_time_m.setObjectName("max_time_m") self.horizontalLayout_2.addWidget(self.max_time_m) self.label_3 = QtWidgets.QLabel(self.max_time) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.label_3.sizePolicy().hasHeightForWidth()) self.label_3.setSizePolicy(sizePolicy) self.label_3.setObjectName("label_3") self.horizontalLayout_2.addWidget(self.label_3) self.max_time_s = QtWidgets.QSpinBox(self.max_time) self.max_time_s.setMaximum(59) self.max_time_s.setSingleStep(10) self.max_time_s.setObjectName("max_time_s") self.horizontalLayout_2.addWidget(self.max_time_s) self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.max_time) self.label = QtWidgets.QLabel(Dialog) self.label.setObjectName("label") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label) self.pop_size = QtWidgets.QSpinBox(Dialog) self.pop_size.setMinimum(10) self.pop_size.setMaximum(10000) self.pop_size.setSingleStep(10) self.pop_size.setObjectName("pop_size") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.pop_size) self.verticalLayout.addLayout(self.formLayout) self.splitter = QtWidgets.QSplitter(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.splitter.sizePolicy().hasHeightForWidth()) self.splitter.setSizePolicy(sizePolicy) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setObjectName("splitter") self.alg_table = QtWidgets.QTableWidget(self.splitter) self.alg_table.setObjectName("alg_table") self.alg_table.setColumnCount(2) self.alg_table.setRowCount(0) item = QtWidgets.QTableWidgetItem() self.alg_table.setHorizontalHeaderItem(0, item) item = QtWidgets.QTableWidgetItem() self.alg_table.setHorizontalHeaderItem(1, item) self.alg_table.horizontalHeader().setDefaultSectionSize(150) self.alg_table.horizontalHeader().setMinimumSectionSize(150) self.verticalLayout.addWidget(self.splitter) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.reset_button = QtWidgets.QPushButton(Dialog) self.reset_button.setObjectName("reset_button") self.horizontalLayout.addWidget(self.reset_button) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.button_box = QtWidgets.QDialogButtonBox(Dialog) self.button_box.setOrientation(QtCore.Qt.Horizontal) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) self.button_box.setObjectName("button_box") self.horizontalLayout.addWidget(self.button_box) self.verticalLayout.addLayout(self.horizontalLayout) self.retranslateUi(Dialog) self.button_box.accepted.connect(Dialog.accept) self.button_box.rejected.connect(Dialog.reject) self.max_gen_option.toggled['bool'].connect(self.max_gen.setEnabled) self.min_fit_option.toggled['bool'].connect(self.min_fit.setEnabled) self.max_time_option.toggled['bool'].connect(self.max_time.setEnabled) QtCore.QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(430, 763) self.verticalLayout_6 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_6.setObjectName("verticalLayout_6") self.joint_groupBox = QtWidgets.QGroupBox(Form) self.joint_groupBox.setObjectName("joint_groupBox") self.horizontalLayout = QtWidgets.QHBoxLayout(self.joint_groupBox) self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout_13 = QtWidgets.QVBoxLayout() self.verticalLayout_13.setObjectName("verticalLayout_13") self.joint_list_lable = QtWidgets.QLabel(self.joint_groupBox) self.joint_list_lable.setObjectName("joint_list_lable") self.verticalLayout_13.addWidget(self.joint_list_lable) self.joint_list = QtWidgets.QListWidget(self.joint_groupBox) self.joint_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.joint_list.setObjectName("joint_list") self.verticalLayout_13.addWidget(self.joint_list) self.horizontalLayout.addLayout(self.verticalLayout_13) self.inputs_label_right2 = QtWidgets.QLabel(self.joint_groupBox) self.inputs_label_right2.setObjectName("inputs_label_right2") self.horizontalLayout.addWidget(self.inputs_label_right2) self.verticalLayout_16 = QtWidgets.QVBoxLayout() self.verticalLayout_16.setObjectName("verticalLayout_16") self.driver_list_lable = QtWidgets.QLabel(self.joint_groupBox) self.driver_list_lable.setObjectName("driver_list_lable") self.verticalLayout_16.addWidget(self.driver_list_lable) self.driver_list = QtWidgets.QListWidget(self.joint_groupBox) self.driver_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.driver_list.setObjectName("driver_list") self.verticalLayout_16.addWidget(self.driver_list) self.variable_add = QtWidgets.QPushButton(self.joint_groupBox) self.variable_add.setEnabled(False) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/arrow_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_add.setIcon(icon) self.variable_add.setObjectName("variable_add") self.verticalLayout_16.addWidget(self.variable_add) self.horizontalLayout.addLayout(self.verticalLayout_16) self.verticalLayout_6.addWidget(self.joint_groupBox) self.variable_groupBox = QtWidgets.QGroupBox(Form) self.variable_groupBox.setObjectName("variable_groupBox") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.variable_groupBox) self.verticalLayout_4.setObjectName("verticalLayout_4") self.inputs_dial_layout = QtWidgets.QHBoxLayout() self.inputs_dial_layout.setObjectName("inputs_dial_layout") self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setObjectName("verticalLayout_5") self.variable_up = QtWidgets.QPushButton(self.variable_groupBox) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/arrow_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_up.setIcon(icon1) self.variable_up.setObjectName("variable_up") self.verticalLayout_5.addWidget(self.variable_up) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_5.addItem(spacerItem) self.variable_down = QtWidgets.QPushButton(self.variable_groupBox) self.variable_down.setIcon(icon) self.variable_down.setObjectName("variable_down") self.verticalLayout_5.addWidget(self.variable_down) self.variable_remove = QtWidgets.QPushButton(self.variable_groupBox) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_remove.setIcon(icon2) self.variable_remove.setObjectName("variable_remove") self.verticalLayout_5.addWidget(self.variable_remove) self.inputs_dial_layout.addLayout(self.verticalLayout_5) self.variable_list = QtWidgets.QListWidget(self.variable_groupBox) self.variable_list.setEditTriggers( QtWidgets.QAbstractItemView.NoEditTriggers) self.variable_list.setObjectName("variable_list") self.inputs_dial_layout.addWidget(self.variable_list) self.line_5 = QtWidgets.QFrame(self.variable_groupBox) self.line_5.setFrameShape(QtWidgets.QFrame.VLine) self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_5.setObjectName("line_5") self.inputs_dial_layout.addWidget(self.line_5) self.verticalLayout_4.addLayout(self.inputs_dial_layout) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.verticalLayout_18 = QtWidgets.QVBoxLayout() self.verticalLayout_18.setObjectName("verticalLayout_18") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.variable_speed_label = QtWidgets.QLabel(self.variable_groupBox) self.variable_speed_label.setObjectName("variable_speed_label") self.horizontalLayout_4.addWidget(self.variable_speed_label) self.variable_speed = QtWidgets.QSpinBox(self.variable_groupBox) self.variable_speed.setEnabled(False) self.variable_speed.setMinimum(-100) self.variable_speed.setMaximum(100) self.variable_speed.setSingleStep(5) self.variable_speed.setProperty("value", -10) self.variable_speed.setObjectName("variable_speed") self.horizontalLayout_4.addWidget(self.variable_speed) self.verticalLayout_18.addLayout(self.horizontalLayout_4) self.extremeRebound = QtWidgets.QCheckBox(self.variable_groupBox) self.extremeRebound.setChecked(True) self.extremeRebound.setObjectName("extremeRebound") self.verticalLayout_18.addWidget(self.extremeRebound) self.horizontalLayout_3.addLayout(self.verticalLayout_18) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.variable_play = QtWidgets.QPushButton(self.variable_groupBox) self.variable_play.setEnabled(False) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/play.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon3.addPixmap(QtGui.QPixmap(":/icons/pause.png"), QtGui.QIcon.Active, QtGui.QIcon.On) self.variable_play.setIcon(icon3) self.variable_play.setCheckable(True) self.variable_play.setObjectName("variable_play") self.verticalLayout_3.addWidget(self.variable_play) self.variable_stop = QtWidgets.QPushButton(self.variable_groupBox) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/interrupted.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_stop.setIcon(icon4) self.variable_stop.setObjectName("variable_stop") self.verticalLayout_3.addWidget(self.variable_stop) self.horizontalLayout_3.addLayout(self.verticalLayout_3) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.dial_spinbox = QtWidgets.QDoubleSpinBox(self.variable_groupBox) self.dial_spinbox.setEnabled(False) self.dial_spinbox.setMaximum(360.0) self.dial_spinbox.setObjectName("dial_spinbox") self.verticalLayout.addWidget(self.dial_spinbox) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.update_pos_option = QtWidgets.QCheckBox(self.variable_groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.update_pos_option.sizePolicy().hasHeightForWidth()) self.update_pos_option.setSizePolicy(sizePolicy) self.update_pos_option.setObjectName("update_pos_option") self.horizontalLayout_2.addWidget(self.update_pos_option) self.update_pos = QtWidgets.QPushButton(self.variable_groupBox) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/data_update.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.update_pos.setIcon(icon5) self.update_pos.setObjectName("update_pos") self.horizontalLayout_2.addWidget(self.update_pos) self.verticalLayout.addLayout(self.horizontalLayout_2) self.horizontalLayout_3.addLayout(self.verticalLayout) self.verticalLayout_4.addLayout(self.horizontalLayout_3) self.verticalLayout_6.addWidget(self.variable_groupBox) self.record_groupBox = QtWidgets.QGroupBox(Form) self.record_groupBox.setObjectName("record_groupBox") self.verticalLayout_22 = QtWidgets.QVBoxLayout(self.record_groupBox) self.verticalLayout_22.setObjectName("verticalLayout_22") self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.record_show = QtWidgets.QCheckBox(self.record_groupBox) self.record_show.setChecked(True) self.record_show.setObjectName("record_show") self.horizontalLayout_6.addWidget(self.record_show) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem2) self.record_interval_label = QtWidgets.QLabel(self.record_groupBox) self.record_interval_label.setObjectName("record_interval_label") self.horizontalLayout_6.addWidget(self.record_interval_label) self.record_interval = QtWidgets.QDoubleSpinBox(self.record_groupBox) self.record_interval.setDecimals(2) self.record_interval.setMinimum(0.5) self.record_interval.setMaximum(6.0) self.record_interval.setProperty("value", 1.0) self.record_interval.setObjectName("record_interval") self.horizontalLayout_6.addWidget(self.record_interval) self.verticalLayout_22.addLayout(self.horizontalLayout_6) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.record_list = QtWidgets.QListWidget(self.record_groupBox) self.record_list.setContextMenuPolicy(QtCore.Qt.CustomContextMenu) self.record_list.setObjectName("record_list") item = QtWidgets.QListWidgetItem() self.record_list.addItem(item) self.horizontalLayout_8.addWidget(self.record_list) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.update_preview_button = QtWidgets.QPushButton( self.record_groupBox) self.update_preview_button.setIcon(icon5) self.update_preview_button.setObjectName("update_preview_button") self.verticalLayout_2.addWidget(self.update_preview_button) self.record_start = QtWidgets.QPushButton(self.record_groupBox) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/record.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.record_start.setIcon(icon6) self.record_start.setCheckable(True) self.record_start.setObjectName("record_start") self.verticalLayout_2.addWidget(self.record_start) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem3) self.record_remove = QtWidgets.QPushButton(self.record_groupBox) self.record_remove.setIcon(icon2) self.record_remove.setObjectName("record_remove") self.verticalLayout_2.addWidget(self.record_remove) self.horizontalLayout_8.addLayout(self.verticalLayout_2) self.verticalLayout_22.addLayout(self.horizontalLayout_8) self.verticalLayout_6.addWidget(self.record_groupBox) self.retranslateUi(Form) self.record_list.setCurrentRow(0) QtCore.QMetaObject.connectSlotsByName(Form)
def add_item(self, item: Dict[Text, Any]): if item["type"] == "text": field = QtWidgets.QLabel(item["text"]) field.setWordWrap(True) # We don't need to keep track of this text-only field so we'll # add it to the form and skip the other things we usually do. self.addRow(field) return # double: show spinbox (number w/ up/down controls) elif item["type"] == "double": field = QtWidgets.QDoubleSpinBox() min, max = -1000, 1000 if "range" in item.keys(): min, max = list(map(float, item["range"].split(","))) field.setRange(min, max) field.setSingleStep(0.25) decimals = item.get('decimals', 2) field.setDecimals(decimals) field.setValue(item["default"]) field.valueChanged.connect(lambda: self.valueChanged.emit()) # int: show spinbox (number w/ up/down controls) elif item["type"] == "int": field = QtWidgets.QSpinBox() if "range" in item.keys(): min, max = list(map(int, item["range"].split(","))) field.setRange(min, max) elif item["default"] > 100: min, max = 0, item["default"] * 10 field.setRange(min, max) field.setValue(item["default"]) field.valueChanged.connect(lambda: self.valueChanged.emit()) elif item["type"] in ("optional_int", "optional_double", "auto_int"): spin_type = item["type"].split("_")[-1] none_string = "auto" if item["type"].startswith("auto") else "none" none_label = item.get("none_label", None) decimals = item.get('decimals', 2) field = OptionalSpinWidget( type=spin_type, none_string=none_string, none_label=none_label, decimals=decimals ) if "range" in item.keys(): caster = int if spin_type=="int" else float min, max = list(map(caster, item["range"].split(","))) field.setRange(min, max) elif item["default"] is not None and item["default"] > 100: min, max = 0, item["default"] * 10 field.setRange(min, max) field.setValue(item["default"]) if item.get("default_disabled", False): field.setToNone() field.valueChanged.connect(lambda: self.valueChanged.emit()) # bool: show checkbox elif item["type"] == "bool": field = QtWidgets.QCheckBox() field.setChecked(item["default"]) field.stateChanged.connect(lambda: self.valueChanged.emit()) # list: show drop-down menu elif item["type"] in ("list", "optional_list"): type_options = item.get("type-options", "") result_as_optional_idx = False add_blank_option = False if type_options == "optional_index": result_as_optional_idx = True add_blank_option = True if item["type"] == "optional_list": add_blank_option = True field = TextOrListWidget( result_as_idx=result_as_optional_idx, add_blank_option=add_blank_option, ) if item["name"] in self.field_options_lists: field.set_options(self.field_options_lists[item["name"]]) elif "options" in item: field.set_options( item["options"].split(","), select_item=item.get("default", "") ) field.valueChanged.connect(lambda: self.valueChanged.emit()) # button elif item["type"] == "button": field = QtWidgets.QPushButton(item["label"]) self.buttons[item["name"]] = field # string elif item["type"] in ("string", "optional_string"): field = QtWidgets.QLineEdit() val = item.get("default", "") val = "" if val is None else val field.setText(str(val)) elif item["type"] == "string_list": field = StringListWidget() val = item.get("default", "") field.setValue(val) # stacked: show menu and form panel corresponding to menu selection elif item["type"] == "stacked": field = StackBuilderWidget( item, field_options_lists=self.field_options_lists ) field.valueChanged.connect(lambda: self.valueChanged.emit()) # If we don't recognize the type, just show a text box else: field = QtWidgets.QLineEdit() field.setText(str(item.get("default", ""))) if item["type"].split("_")[0] == "file": field.setDisabled(True) # Store name and type on widget field.setObjectName(item["name"]) field.setProperty("field_data_type", item.get("dtype", item["type"])) # Set tooltip for field if "help" in item: field.setToolTip(item["help"]) # Store widget by name self.fields[item["name"]] = field # Add field (and label if appropriate) to form layout if item["type"] in ("stacked"): self.addRow(field) elif item["type"] in ("button"): self.addRow("", field) else: self.addRow(item["label"] + ":", field) # file_[open|dir]: show button to select file/directory if item["type"].split("_")[0] == "file": self.addRow("", self._make_file_button(item, field))
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(366, 468) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/calculator.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setModal(True) self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout.setObjectName("verticalLayout") self.tab_widget = QtWidgets.QTabWidget(Dialog) self.tab_widget.setObjectName("tab_widget") self.plap_tab = QtWidgets.QWidget() self.plap_tab.setObjectName("plap_tab") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.plap_tab) self.verticalLayout_4.setObjectName("verticalLayout_4") self.panel_layout = QtWidgets.QHBoxLayout() self.panel_layout.setObjectName("panel_layout") self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.plap_p1_label = QtWidgets.QLabel(self.plap_tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plap_p1_label.sizePolicy().hasHeightForWidth()) self.plap_p1_label.setSizePolicy(sizePolicy) self.plap_p1_label.setObjectName("plap_p1_label") self.horizontalLayout_2.addWidget(self.plap_p1_label) self.plap_p1_box = QtWidgets.QComboBox(self.plap_tab) self.plap_p1_box.setObjectName("plap_p1_box") self.horizontalLayout_2.addWidget(self.plap_p1_box) self.verticalLayout_3.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.plap_p1x_label = QtWidgets.QLabel(self.plap_tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plap_p1x_label.sizePolicy().hasHeightForWidth()) self.plap_p1x_label.setSizePolicy(sizePolicy) self.plap_p1x_label.setObjectName("plap_p1x_label") self.horizontalLayout.addWidget(self.plap_p1x_label) self.plap_p1x_box = QtWidgets.QDoubleSpinBox(self.plap_tab) self.plap_p1x_box.setDecimals(4) self.plap_p1x_box.setMinimum(-9999.99) self.plap_p1x_box.setMaximum(9999.99) self.plap_p1x_box.setObjectName("plap_p1x_box") self.horizontalLayout.addWidget(self.plap_p1x_box) self.plap_p1y_label = QtWidgets.QLabel(self.plap_tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.plap_p1y_label.sizePolicy().hasHeightForWidth()) self.plap_p1y_label.setSizePolicy(sizePolicy) self.plap_p1y_label.setObjectName("plap_p1y_label") self.horizontalLayout.addWidget(self.plap_p1y_label) self.plap_p1y_box = QtWidgets.QDoubleSpinBox(self.plap_tab) self.plap_p1y_box.setDecimals(4) self.plap_p1y_box.setMinimum(-9999.99) self.plap_p1y_box.setMaximum(9999.99) self.plap_p1y_box.setObjectName("plap_p1y_box") self.horizontalLayout.addWidget(self.plap_p1y_box) self.verticalLayout_3.addLayout(self.horizontalLayout) self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.plap_angle_label = QtWidgets.QLabel(self.plap_tab) self.plap_angle_label.setObjectName("plap_angle_label") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.plap_angle_label) self.plap_angle_box = QtWidgets.QDoubleSpinBox(self.plap_tab) self.plap_angle_box.setDecimals(4) self.plap_angle_box.setMaximum(360.0) self.plap_angle_box.setObjectName("plap_angle_box") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.plap_angle_box) self.plap_distance_label = QtWidgets.QLabel(self.plap_tab) self.plap_distance_label.setObjectName("plap_distance_label") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.plap_distance_label) self.plap_distance_box = QtWidgets.QDoubleSpinBox(self.plap_tab) self.plap_distance_box.setDecimals(4) self.plap_distance_box.setMaximum(9999.99) self.plap_distance_box.setObjectName("plap_distance_box") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.plap_distance_box) self.verticalLayout_3.addLayout(self.formLayout) self.panel_layout.addLayout(self.verticalLayout_3) self.verticalLayout_4.addLayout(self.panel_layout) spacerItem = QtWidgets.QSpacerItem(20, 126, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_4.addItem(spacerItem) self.tab_widget.addTab(self.plap_tab, "") self.pllp_tab = QtWidgets.QWidget() self.pllp_tab.setObjectName("pllp_tab") self.verticalLayout_7 = QtWidgets.QVBoxLayout(self.pllp_tab) self.verticalLayout_7.setObjectName("verticalLayout_7") self.widget = QtWidgets.QWidget(self.pllp_tab) self.widget.setObjectName("widget") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.widget) self.verticalLayout_5.setObjectName("verticalLayout_5") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.pllp_p1_label = QtWidgets.QRadioButton(self.widget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pllp_p1_label.sizePolicy().hasHeightForWidth()) self.pllp_p1_label.setSizePolicy(sizePolicy) self.pllp_p1_label.setChecked(True) self.pllp_p1_label.setObjectName("pllp_p1_label") self.horizontalLayout_4.addWidget(self.pllp_p1_label) self.pllp_p1_box = QtWidgets.QComboBox(self.widget) self.pllp_p1_box.setObjectName("pllp_p1_box") self.horizontalLayout_4.addWidget(self.pllp_p1_box) self.verticalLayout_5.addLayout(self.horizontalLayout_4) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.pllp_p1xy_label = QtWidgets.QRadioButton(self.widget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pllp_p1xy_label.sizePolicy().hasHeightForWidth()) self.pllp_p1xy_label.setSizePolicy(sizePolicy) self.pllp_p1xy_label.setText("") self.pllp_p1xy_label.setObjectName("pllp_p1xy_label") self.horizontalLayout_3.addWidget(self.pllp_p1xy_label) self.pllp_p1x_label = QtWidgets.QLabel(self.widget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pllp_p1x_label.sizePolicy().hasHeightForWidth()) self.pllp_p1x_label.setSizePolicy(sizePolicy) self.pllp_p1x_label.setObjectName("pllp_p1x_label") self.horizontalLayout_3.addWidget(self.pllp_p1x_label) self.pllp_p1x_box = QtWidgets.QDoubleSpinBox(self.widget) self.pllp_p1x_box.setDecimals(4) self.pllp_p1x_box.setMinimum(-9999.99) self.pllp_p1x_box.setMaximum(9999.99) self.pllp_p1x_box.setObjectName("pllp_p1x_box") self.horizontalLayout_3.addWidget(self.pllp_p1x_box) self.pllp_p1y_label = QtWidgets.QLabel(self.widget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pllp_p1y_label.sizePolicy().hasHeightForWidth()) self.pllp_p1y_label.setSizePolicy(sizePolicy) self.pllp_p1y_label.setObjectName("pllp_p1y_label") self.horizontalLayout_3.addWidget(self.pllp_p1y_label) self.pllp_p1y_box = QtWidgets.QDoubleSpinBox(self.widget) self.pllp_p1y_box.setDecimals(4) self.pllp_p1y_box.setMinimum(-9999.99) self.pllp_p1y_box.setMaximum(9999.99) self.pllp_p1y_box.setObjectName("pllp_p1y_box") self.horizontalLayout_3.addWidget(self.pllp_p1y_box) self.verticalLayout_5.addLayout(self.horizontalLayout_3) self.verticalLayout_7.addWidget(self.widget) self.widget1 = QtWidgets.QWidget(self.pllp_tab) self.widget1.setObjectName("widget1") self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.widget1) self.verticalLayout_6.setObjectName("verticalLayout_6") self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.pllp_p2_label = QtWidgets.QRadioButton(self.widget1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pllp_p2_label.sizePolicy().hasHeightForWidth()) self.pllp_p2_label.setSizePolicy(sizePolicy) self.pllp_p2_label.setChecked(True) self.pllp_p2_label.setObjectName("pllp_p2_label") self.horizontalLayout_5.addWidget(self.pllp_p2_label) self.pllp_p2_box = QtWidgets.QComboBox(self.widget1) self.pllp_p2_box.setObjectName("pllp_p2_box") self.horizontalLayout_5.addWidget(self.pllp_p2_box) self.verticalLayout_6.addLayout(self.horizontalLayout_5) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.pllp_p2xy_label = QtWidgets.QRadioButton(self.widget1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pllp_p2xy_label.sizePolicy().hasHeightForWidth()) self.pllp_p2xy_label.setSizePolicy(sizePolicy) self.pllp_p2xy_label.setText("") self.pllp_p2xy_label.setObjectName("pllp_p2xy_label") self.horizontalLayout_6.addWidget(self.pllp_p2xy_label) self.pllp_p2x_label = QtWidgets.QLabel(self.widget1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pllp_p2x_label.sizePolicy().hasHeightForWidth()) self.pllp_p2x_label.setSizePolicy(sizePolicy) self.pllp_p2x_label.setObjectName("pllp_p2x_label") self.horizontalLayout_6.addWidget(self.pllp_p2x_label) self.pllp_p2x_box = QtWidgets.QDoubleSpinBox(self.widget1) self.pllp_p2x_box.setDecimals(4) self.pllp_p2x_box.setMinimum(-9999.99) self.pllp_p2x_box.setMaximum(9999.99) self.pllp_p2x_box.setObjectName("pllp_p2x_box") self.horizontalLayout_6.addWidget(self.pllp_p2x_box) self.pllp_p2y_label = QtWidgets.QLabel(self.widget1) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.pllp_p2y_label.sizePolicy().hasHeightForWidth()) self.pllp_p2y_label.setSizePolicy(sizePolicy) self.pllp_p2y_label.setObjectName("pllp_p2y_label") self.horizontalLayout_6.addWidget(self.pllp_p2y_label) self.pllp_p2y_box = QtWidgets.QDoubleSpinBox(self.widget1) self.pllp_p2y_box.setDecimals(4) self.pllp_p2y_box.setMinimum(-9999.99) self.pllp_p2y_box.setObjectName("pllp_p2y_box") self.horizontalLayout_6.addWidget(self.pllp_p2y_box) self.verticalLayout_6.addLayout(self.horizontalLayout_6) self.verticalLayout_7.addWidget(self.widget1) self.formLayout_2 = QtWidgets.QFormLayout() self.formLayout_2.setObjectName("formLayout_2") self.pllp_distance1_box = QtWidgets.QDoubleSpinBox(self.pllp_tab) self.pllp_distance1_box.setDecimals(4) self.pllp_distance1_box.setMaximum(9999.99) self.pllp_distance1_box.setObjectName("pllp_distance1_box") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.pllp_distance1_box) self.pllp_distance1_label = QtWidgets.QLabel(self.pllp_tab) self.pllp_distance1_label.setObjectName("pllp_distance1_label") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.pllp_distance1_label) self.pllp_distance2_box = QtWidgets.QDoubleSpinBox(self.pllp_tab) self.pllp_distance2_box.setDecimals(4) self.pllp_distance2_box.setMaximum(9999.99) self.pllp_distance2_box.setObjectName("pllp_distance2_box") self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.pllp_distance2_box) self.pllp_distance2_label = QtWidgets.QLabel(self.pllp_tab) self.pllp_distance2_label.setObjectName("pllp_distance2_label") self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.pllp_distance2_label) self.verticalLayout_7.addLayout(self.formLayout_2) self.pllp_inversed_box = QtWidgets.QCheckBox(self.pllp_tab) self.pllp_inversed_box.setObjectName("pllp_inversed_box") self.verticalLayout_7.addWidget(self.pllp_inversed_box) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_7.addItem(spacerItem1) self.tab_widget.addTab(self.pllp_tab, "") self.verticalLayout.addWidget(self.tab_widget) self.preview_label = QtWidgets.QLabel(Dialog) self.preview_label.setObjectName("preview_label") self.verticalLayout.addWidget(self.preview_label) self.button_box = QtWidgets.QDialogButtonBox(Dialog) self.button_box.setOrientation(QtCore.Qt.Horizontal) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) self.button_box.setObjectName("button_box") self.verticalLayout.addWidget(self.button_box) self.retranslateUi(Dialog) self.button_box.rejected.connect(Dialog.reject) self.button_box.accepted.connect(Dialog.accept) QtCore.QMetaObject.connectSlotsByName(Dialog)
def initUi(self): """初始化界面""" self.setWindowTitle(u'交易') # 左边部分 labelAcc = QtWidgets.QLabel(u'资金账号') labelID = QtWidgets.QLabel(u'代码') labelName = QtWidgets.QLabel(u'名称') labelDirection = QtWidgets.QLabel(u'委托类型') labelPrice = QtWidgets.QLabel(u'价格') labelVolume = QtWidgets.QLabel(u'数量') labelPriceType = QtWidgets.QLabel(u'价格类型') self.lineAcc = QtWidgets.QLineEdit() self.lineID = QtWidgets.QLineEdit() self.lineName = QtWidgets.QLineEdit() self.comboDirection = QtWidgets.QComboBox() self.comboDirection.addItems(self.dictDirection.values()) self.spinPrice = QtWidgets.QDoubleSpinBox() self.spinPrice.setDecimals(4) self.spinPrice.setMinimum(0) self.spinPrice.setMaximum(10000) self.spinVolume = QtWidgets.QSpinBox() self.spinVolume.setMinimum(0) self.spinVolume.setMaximum(1000000) self.comboPriceType = QtWidgets.QComboBox() self.comboPriceType.addItems(self.dictPriceType.values()) gridleft = QtWidgets.QGridLayout() gridleft.addWidget(labelAcc, 0, 0) gridleft.addWidget(labelID, 1, 0) gridleft.addWidget(labelName, 2, 0) gridleft.addWidget(labelDirection, 3, 0) gridleft.addWidget(labelPrice, 4, 0) gridleft.addWidget(labelVolume, 5, 0) gridleft.addWidget(labelPriceType, 6, 0) gridleft.addWidget(self.lineAcc, 0, 1) gridleft.addWidget(self.lineID, 1, 1) gridleft.addWidget(self.lineName, 2, 1) gridleft.addWidget(self.comboDirection, 3, 1) gridleft.addWidget(self.spinPrice, 4, 1) gridleft.addWidget(self.spinVolume, 5, 1) gridleft.addWidget(self.comboPriceType, 6, 1) # 右边部分 labelBid1 = QtWidgets.QLabel(u'买一') labelBid2 = QtWidgets.QLabel(u'买二') labelBid3 = QtWidgets.QLabel(u'买三') labelBid4 = QtWidgets.QLabel(u'买四') labelBid5 = QtWidgets.QLabel(u'买五') labelAsk1 = QtWidgets.QLabel(u'卖一') labelAsk2 = QtWidgets.QLabel(u'卖二') labelAsk3 = QtWidgets.QLabel(u'卖三') labelAsk4 = QtWidgets.QLabel(u'卖四') labelAsk5 = QtWidgets.QLabel(u'卖五') self.labelBidPrice1 = QtWidgets.QLabel() self.labelBidPrice2 = QtWidgets.QLabel() self.labelBidPrice3 = QtWidgets.QLabel() self.labelBidPrice4 = QtWidgets.QLabel() self.labelBidPrice5 = QtWidgets.QLabel() self.labelBidVolume1 = QtWidgets.QLabel() self.labelBidVolume2 = QtWidgets.QLabel() self.labelBidVolume3 = QtWidgets.QLabel() self.labelBidVolume4 = QtWidgets.QLabel() self.labelBidVolume5 = QtWidgets.QLabel() self.labelAskPrice1 = QtWidgets.QLabel() self.labelAskPrice2 = QtWidgets.QLabel() self.labelAskPrice3 = QtWidgets.QLabel() self.labelAskPrice4 = QtWidgets.QLabel() self.labelAskPrice5 = QtWidgets.QLabel() self.labelAskVolume1 = QtWidgets.QLabel() self.labelAskVolume2 = QtWidgets.QLabel() self.labelAskVolume3 = QtWidgets.QLabel() self.labelAskVolume4 = QtWidgets.QLabel() self.labelAskVolume5 = QtWidgets.QLabel() labelLast = QtWidgets.QLabel(u'最新') self.labelLastPrice = QtWidgets.QLabel() self.labelReturn = QtWidgets.QLabel() self.labelLastPrice.setMinimumWidth(60) self.labelReturn.setMinimumWidth(60) gridRight = QtWidgets.QGridLayout() gridRight.addWidget(labelAsk5, 0, 0) gridRight.addWidget(labelAsk4, 1, 0) gridRight.addWidget(labelAsk3, 2, 0) gridRight.addWidget(labelAsk2, 3, 0) gridRight.addWidget(labelAsk1, 4, 0) gridRight.addWidget(labelLast, 5, 0) gridRight.addWidget(labelBid1, 6, 0) gridRight.addWidget(labelBid2, 7, 0) gridRight.addWidget(labelBid3, 8, 0) gridRight.addWidget(labelBid4, 9, 0) gridRight.addWidget(labelBid5, 10, 0) gridRight.addWidget(self.labelAskPrice5, 0, 1) gridRight.addWidget(self.labelAskPrice4, 1, 1) gridRight.addWidget(self.labelAskPrice3, 2, 1) gridRight.addWidget(self.labelAskPrice2, 3, 1) gridRight.addWidget(self.labelAskPrice1, 4, 1) gridRight.addWidget(self.labelLastPrice, 5, 1) gridRight.addWidget(self.labelBidPrice1, 6, 1) gridRight.addWidget(self.labelBidPrice2, 7, 1) gridRight.addWidget(self.labelBidPrice3, 8, 1) gridRight.addWidget(self.labelBidPrice4, 9, 1) gridRight.addWidget(self.labelBidPrice5, 10, 1) gridRight.addWidget(self.labelAskVolume5, 0, 2) gridRight.addWidget(self.labelAskVolume4, 1, 2) gridRight.addWidget(self.labelAskVolume3, 2, 2) gridRight.addWidget(self.labelAskVolume2, 3, 2) gridRight.addWidget(self.labelAskVolume1, 4, 2) gridRight.addWidget(self.labelReturn, 5, 2) gridRight.addWidget(self.labelBidVolume1, 6, 2) gridRight.addWidget(self.labelBidVolume2, 7, 2) gridRight.addWidget(self.labelBidVolume3, 8, 2) gridRight.addWidget(self.labelBidVolume4, 9, 2) gridRight.addWidget(self.labelBidVolume5, 10, 2) # 发单按钮 buttonSendOrder = QtWidgets.QPushButton(u'发单') buttonCancelAll = QtWidgets.QPushButton(u'全撤') # 整合布局 hbox = QtWidgets.QHBoxLayout() hbox.addLayout(gridleft) hbox.addLayout(gridRight) vbox = QtWidgets.QVBoxLayout() vbox.addLayout(hbox) vbox.addWidget(buttonSendOrder) vbox.addWidget(buttonCancelAll) self.setLayout(vbox) # 关联更新 buttonSendOrder.clicked.connect(self.sendOrder) buttonCancelAll.clicked.connect(self.__orderMonitor.cancelAll) self.lineID.returnPressed.connect(self.updateID)
def __init__(self, parent=None): super(Form, self).__init__(parent) self.filterBox = QtWidgets.QComboBox() self.filterBox.addItem("No Filter") self.filterBox.addItem("Canny Filter") self.filterBox.addItem("2D Convolution - Average") self.filterBox.addItem("2D Convolution - Smooth") self.filterBox.addItem("2D Convolution - Gaussian") self.filterBox.addItem("2D Convolution - Median") self.filterBox.addItem("2D Convolution - Bilateral") self.filterBox.addItem("Invert") self.filterBox.addItem("Adaptive Threshold") self.filterBox.addItem("Laplacian Edge") self.filterBox.addItem("Background Subtract") self.SpinBox1 = QtWidgets.QDoubleSpinBox() self.SpinBox1.setRange(0, 1000) self.SpinBox1.setValue(1.00) self.SpinBox2 = QtWidgets.QDoubleSpinBox() self.SpinBox2.setRange(0, 1000) self.SpinBox2.setValue(1.00) self.filterLabel = QtWidgets.QLabel("No Filter") self.filterFlag = 'No Filter' self.dial = QtWidgets.QDial() self.dial.setNotchesVisible(True) self.zerospinbox = ZeroSpinBox() self.button1 = QtWidgets.QPushButton("Click to Take Picture") self.getImageFlag = False self.button2 = QtWidgets.QPushButton("Quit Live Camera") self.liveCameraFlag = False self.button3 = QtWidgets.QPushButton("Black & White") self.blackandwhiteFlag = False self.button4 = QtWidgets.QPushButton("Start Recording") self.recordingFlag = False layout = QtWidgets.QHBoxLayout() layout.addWidget(self.dial) layout.addWidget(self.zerospinbox) layout.addWidget(self.button4) layout.addWidget(self.button1) layout.addWidget(self.button2) layout.addWidget(self.button3) layout.addWidget(self.filterBox) layout.addWidget(self.filterLabel) layout.addWidget(self.SpinBox1) layout.addWidget(self.SpinBox2) self.setLayout(layout) self.dial.valueChanged[int].connect(self.zerospinbox.setValue) self.zerospinbox.valueChanged[int].connect(self.dial.setValue) self.zerospinbox.atzero.connect(self.announce) self.button1.clicked.connect(self.one) self.button2.clicked.connect(self.two) self.button3.clicked.connect(self.three) self.button4.clicked.connect(self.four) self.filterBox.currentIndexChanged[int].connect(self.updateUi) self.setWindowTitle("Camera Record Options")
test_parameterviewer() if 0: import qcodes import time import pdb import qtt.measurements.scans from qtt.instrument_drivers.virtual_instruments import VirtualIVVI ivvi = VirtualIVVI( name=qtt.measurements.scans.instrumentName('dummyivvi'), model=None) p = ParameterViewer(instruments=[ivvi], instrumentnames=['ivvi']) self = p p.show() self = p p.updatecallback() p.setGeometry(1540, 60, 360, 600) time.sleep(.1) ivvi.dac1.set(101) ivvi.dac2.set(102) #%% if __name__ == '__main__' and 0: box = QtWidgets.QDoubleSpinBox() box.setMaximum(10) qq = self.topLevelItem(0).child(2) self.setItemWidget(qq, 1, box)
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(865, 427) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout_2 = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout_2.setObjectName("verticalLayout_2") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.settings_ui_groupbox = QtWidgets.QGroupBox(Dialog) self.settings_ui_groupbox.setObjectName("settings_ui_groupbox") self.verticalLayout_3 = QtWidgets.QVBoxLayout( self.settings_ui_groupbox) self.verticalLayout_3.setObjectName("verticalLayout_3") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.zoomby_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.zoomby_label.setObjectName("zoomby_label") self.gridLayout.addWidget(self.zoomby_label, 3, 2, 1, 1) self.font_size_option = QtWidgets.QSpinBox(self.settings_ui_groupbox) self.font_size_option.setMinimum(1) self.font_size_option.setMaximum(30) self.font_size_option.setSingleStep(2) self.font_size_option.setObjectName("font_size_option") self.gridLayout.addWidget(self.font_size_option, 0, 3, 1, 1) self.tick_mark_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.tick_mark_label.setObjectName("tick_mark_label") self.gridLayout.addWidget(self.tick_mark_label, 4, 2, 1, 1) self.zoom_by_option = QtWidgets.QComboBox(self.settings_ui_groupbox) self.zoom_by_option.setObjectName("zoom_by_option") self.zoom_by_option.addItem("") self.zoom_by_option.addItem("") self.gridLayout.addWidget(self.zoom_by_option, 3, 3, 1, 1) self.line_width_option = QtWidgets.QSpinBox(self.settings_ui_groupbox) self.line_width_option.setMinimum(1) self.line_width_option.setMaximum(10) self.line_width_option.setDisplayIntegerBase(10) self.line_width_option.setObjectName("line_width_option") self.gridLayout.addWidget(self.line_width_option, 0, 1, 1, 1) self.scale_factor_option = QtWidgets.QSpinBox( self.settings_ui_groupbox) self.scale_factor_option.setMinimum(5) self.scale_factor_option.setMaximum(100) self.scale_factor_option.setSingleStep(5) self.scale_factor_option.setObjectName("scale_factor_option") self.gridLayout.addWidget(self.scale_factor_option, 1, 3, 1, 1) self.linewidth_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.linewidth_label.setObjectName("linewidth_label") self.gridLayout.addWidget(self.linewidth_label, 0, 0, 1, 1) self.fontsize_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.fontsize_label.setObjectName("fontsize_label") self.gridLayout.addWidget(self.fontsize_label, 0, 2, 1, 1) self.snap_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.snap_label.setObjectName("snap_label") self.gridLayout.addWidget(self.snap_label, 5, 0, 1, 1) self.jointsize_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.jointsize_label.setObjectName("jointsize_label") self.gridLayout.addWidget(self.jointsize_label, 4, 0, 1, 1) self.pathwidth_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.pathwidth_label.setObjectName("pathwidth_label") self.gridLayout.addWidget(self.pathwidth_label, 1, 0, 1, 1) self.linktransparency_label = QtWidgets.QLabel( self.settings_ui_groupbox) self.linktransparency_label.setObjectName("linktransparency_label") self.gridLayout.addWidget(self.linktransparency_label, 2, 2, 1, 1) self.margin_factor_option = QtWidgets.QSpinBox( self.settings_ui_groupbox) self.margin_factor_option.setMaximum(30) self.margin_factor_option.setSingleStep(5) self.margin_factor_option.setObjectName("margin_factor_option") self.gridLayout.addWidget(self.margin_factor_option, 3, 1, 1, 1) self.toolbar_pos_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.toolbar_pos_label.setObjectName("toolbar_pos_label") self.gridLayout.addWidget(self.toolbar_pos_label, 5, 2, 1, 1) self.selectionradius_label = QtWidgets.QLabel( self.settings_ui_groupbox) self.selectionradius_label.setObjectName("selectionradius_label") self.gridLayout.addWidget(self.selectionradius_label, 2, 0, 1, 1) self.scalefactor_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.scalefactor_label.setObjectName("scalefactor_label") self.gridLayout.addWidget(self.scalefactor_label, 1, 2, 1, 1) self.nav_toolbar_pos_option = QtWidgets.QComboBox( self.settings_ui_groupbox) self.nav_toolbar_pos_option.setObjectName("nav_toolbar_pos_option") self.nav_toolbar_pos_option.addItem("") self.nav_toolbar_pos_option.addItem("") self.gridLayout.addWidget(self.nav_toolbar_pos_option, 5, 3, 1, 1) self.marginfactor_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.marginfactor_label.setObjectName("marginfactor_label") self.gridLayout.addWidget(self.marginfactor_label, 3, 0, 1, 1) self.joint_size_option = QtWidgets.QSpinBox(self.settings_ui_groupbox) self.joint_size_option.setMinimum(1) self.joint_size_option.setMaximum(100) self.joint_size_option.setObjectName("joint_size_option") self.gridLayout.addWidget(self.joint_size_option, 4, 1, 1, 1) self.path_width_option = QtWidgets.QSpinBox(self.settings_ui_groupbox) self.path_width_option.setMinimum(1) self.path_width_option.setMaximum(5) self.path_width_option.setObjectName("path_width_option") self.gridLayout.addWidget(self.path_width_option, 1, 1, 1, 1) self.link_trans_option = QtWidgets.QSpinBox(self.settings_ui_groupbox) self.link_trans_option.setMaximum(80) self.link_trans_option.setSingleStep(10) self.link_trans_option.setObjectName("link_trans_option") self.gridLayout.addWidget(self.link_trans_option, 2, 3, 1, 1) self.snap_option = QtWidgets.QDoubleSpinBox(self.settings_ui_groupbox) self.snap_option.setMaximum(50.0) self.snap_option.setObjectName("snap_option") self.gridLayout.addWidget(self.snap_option, 5, 1, 1, 1) self.tick_mark_option = QtWidgets.QComboBox(self.settings_ui_groupbox) self.tick_mark_option.setObjectName("tick_mark_option") self.tick_mark_option.addItem("") self.tick_mark_option.addItem("") self.tick_mark_option.addItem("") self.gridLayout.addWidget(self.tick_mark_option, 4, 3, 1, 1) self.selection_radius_option = QtWidgets.QSpinBox( self.settings_ui_groupbox) self.selection_radius_option.setMinimum(3) self.selection_radius_option.setMaximum(10) self.selection_radius_option.setObjectName("selection_radius_option") self.gridLayout.addWidget(self.selection_radius_option, 2, 1, 1, 1) self.default_zoom_label = QtWidgets.QLabel(self.settings_ui_groupbox) self.default_zoom_label.setObjectName("default_zoom_label") self.gridLayout.addWidget(self.default_zoom_label, 6, 0, 1, 1) self.default_zoom_option = QtWidgets.QSpinBox( self.settings_ui_groupbox) self.default_zoom_option.setObjectName("default_zoom_option") self.gridLayout.addWidget(self.default_zoom_option, 6, 1, 1, 1) self.verticalLayout_3.addLayout(self.gridLayout) self.grab_no_background_option = QtWidgets.QCheckBox( self.settings_ui_groupbox) self.grab_no_background_option.setObjectName( "grab_no_background_option") self.verticalLayout_3.addWidget(self.grab_no_background_option) self.monochrome_option = QtWidgets.QCheckBox(self.settings_ui_groupbox) self.monochrome_option.setObjectName("monochrome_option") self.verticalLayout_3.addWidget(self.monochrome_option) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem) self.horizontalLayout.addWidget(self.settings_ui_groupbox) self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.settings_kernels_groupBox = QtWidgets.QGroupBox(Dialog) self.settings_kernels_groupBox.setObjectName( "settings_kernels_groupBox") self.verticalLayout_4 = QtWidgets.QVBoxLayout( self.settings_kernels_groupBox) self.verticalLayout_4.setObjectName("verticalLayout_4") self.formLayout_3 = QtWidgets.QFormLayout() self.formLayout_3.setObjectName("formLayout_3") self.planarsolver_label = QtWidgets.QLabel( self.settings_kernels_groupBox) self.planarsolver_label.setObjectName("planarsolver_label") self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.planarsolver_label) self.planar_solver_option = QtWidgets.QComboBox( self.settings_kernels_groupBox) self.planar_solver_option.setObjectName("planar_solver_option") self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.planar_solver_option) self.pathpreview_label = QtWidgets.QLabel( self.settings_kernels_groupBox) self.pathpreview_label.setObjectName("pathpreview_label") self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.pathpreview_label) self.path_preview_option = QtWidgets.QComboBox( self.settings_kernels_groupBox) self.path_preview_option.setObjectName("path_preview_option") self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.path_preview_option) self.verticalLayout_4.addLayout(self.formLayout_3) self.console_error_option = QtWidgets.QCheckBox( self.settings_kernels_groupBox) self.console_error_option.setObjectName("console_error_option") self.verticalLayout_4.addWidget(self.console_error_option) self.verticalLayout.addWidget(self.settings_kernels_groupBox) self.settings_project_groupbox = QtWidgets.QGroupBox(Dialog) self.settings_project_groupbox.setObjectName( "settings_project_groupbox") self.formLayout_2 = QtWidgets.QFormLayout( self.settings_project_groupbox) self.formLayout_2.setObjectName("formLayout_2") self.undo_limit_label = QtWidgets.QLabel( self.settings_project_groupbox) self.undo_limit_label.setObjectName("undo_limit_label") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.undo_limit_label) self.undo_limit_option = QtWidgets.QSpinBox( self.settings_project_groupbox) self.undo_limit_option.setMinimum(5) self.undo_limit_option.setObjectName("undo_limit_option") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.undo_limit_option) self.open_project_actions_label = QtWidgets.QLabel( self.settings_project_groupbox) self.open_project_actions_label.setObjectName( "open_project_actions_label") self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.open_project_actions_label) self.open_project_actions_option = QtWidgets.QComboBox( self.settings_project_groupbox) self.open_project_actions_option.setObjectName( "open_project_actions_option") self.open_project_actions_option.addItem("") self.open_project_actions_option.addItem("") self.open_project_actions_option.addItem("") self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.open_project_actions_option) self.file_type_label = QtWidgets.QLabel(self.settings_project_groupbox) self.file_type_label.setObjectName("file_type_label") self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.file_type_label) self.file_type_option = QtWidgets.QComboBox( self.settings_project_groupbox) self.file_type_option.setObjectName("file_type_option") self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.file_type_option) self.verticalLayout.addWidget(self.settings_project_groupbox) self.settings_misc_groupBox = QtWidgets.QGroupBox(Dialog) self.settings_misc_groupBox.setObjectName("settings_misc_groupBox") self.verticalLayout_7 = QtWidgets.QVBoxLayout( self.settings_misc_groupBox) self.verticalLayout_7.setObjectName("verticalLayout_7") self.auto_remove_link_option = QtWidgets.QCheckBox( self.settings_misc_groupBox) self.auto_remove_link_option.setObjectName("auto_remove_link_option") self.verticalLayout_7.addWidget(self.auto_remove_link_option) self.title_full_path_option = QtWidgets.QCheckBox( self.settings_misc_groupBox) self.title_full_path_option.setObjectName("title_full_path_option") self.verticalLayout_7.addWidget(self.title_full_path_option) self.not_save_option = QtWidgets.QCheckBox(self.settings_misc_groupBox) self.not_save_option.setObjectName("not_save_option") self.verticalLayout_7.addWidget(self.not_save_option) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_7.addItem(spacerItem1) self.verticalLayout.addWidget(self.settings_misc_groupBox) self.horizontalLayout.addLayout(self.verticalLayout) self.verticalLayout_2.addLayout(self.horizontalLayout) self.button_box = QtWidgets.QDialogButtonBox(Dialog) self.button_box.setOrientation(QtCore.Qt.Horizontal) self.button_box.setStandardButtons( QtWidgets.QDialogButtonBox.Apply | QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.RestoreDefaults) self.button_box.setObjectName("button_box") self.verticalLayout_2.addWidget(self.button_box) self.retranslateUi(Dialog) self.button_box.accepted.connect(Dialog.accept) QtCore.QMetaObject.connectSlotsByName(Dialog)
def gui(self): self.gui_reset() #w=g.win w = self.w width_units = QtWidgets.QDoubleSpinBox() width_pixels = QtWidgets.QSpinBox() width_units.setRange(.001, 1000000) width_pixels.setRange(1, self.width) font_size = QtWidgets.QSpinBox() unit = ComboBox() unit.addItem('micro') unit.addItem('nano') unit.addItem('pixels') orientation = ComboBox() orientation.addItem('horizontal') orientation.addItem('vertical') color = ComboBox() color.addItem("White") color.addItem("Black") background = ComboBox() background.addItem('None') background.addItem('Black') background.addItem('White') location = ComboBox() location.addItem('Lower Right') location.addItem('Lower Left') location.addItem('Top Right') location.addItem('Top Left') show = CheckBox() show_label = CheckBox() if hasattr( w, 'scaleBarLabel' ) and w.scaleBarLabel is not None: #if the scaleBarLabel already exists props = w.scaleBarLabel.flika_properties width_units.setValue(props['width_units']) width_pixels.setValue(props['width_pixels']) unit.setCurrentIndex(color.findText(props['unit'])) orientation.setCurrentIndex(color.findText(props['orientation'])) font_size.setValue(props['font_size']) color.setCurrentIndex(color.findText(props['color'])) background.setCurrentIndex(background.findText( props['background'])) location.setCurrentIndex(location.findText(props['location'])) else: font_size.setValue(12) width_pixels.setValue(int(w.view.width() / 8)) width_units.setValue(1) show.setChecked(True) show_label.setChecked(True) self.items.append({'name': 'unit', 'string': 'Units', 'object': unit}) self.items.append({ 'name': 'width_units', 'string': 'Width of bar in [Units]', 'object': width_units }) self.items.append({ 'name': 'width_pixels', 'string': 'Width of bar in pixels', 'object': width_pixels }) self.items.append({ 'name': 'font_size', 'string': 'Font size', 'object': font_size }) self.items.append({ 'name': 'color', 'string': 'Color', 'object': color }) self.items.append({ 'name': 'background', 'string': 'Background', 'object': background }) self.items.append({ 'name': 'location', 'string': 'Location', 'object': location }) self.items.append({ 'name': 'orientation', 'string': 'Orientation', 'object': orientation }) self.items.append({'name': 'show', 'string': 'Show', 'object': show}) self.items.append({ 'name': 'show_label', 'string': 'Show label', 'object': show_label }) super().gui() self.preview()
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(570, 375) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/DimensionalSynthesis.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout_5 = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout_5.setObjectName("verticalLayout_5") self.splitter = QtWidgets.QSplitter(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.splitter.sizePolicy().hasHeightForWidth()) self.splitter.setSizePolicy(sizePolicy) self.splitter.setOrientation(QtCore.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.path_list = QtWidgets.QListWidget(self.layoutWidget) self.path_list.setObjectName("path_list") self.verticalLayout.addWidget(self.path_list) self.tabWidget = QtWidgets.QTabWidget(self.splitter) self.tabWidget.setObjectName("tabWidget") self.moving = QtWidgets.QWidget() self.moving.setObjectName("moving") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.moving) self.verticalLayout_2.setContentsMargins(6, 6, 6, 6) self.verticalLayout_2.setObjectName("verticalLayout_2") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(self.moving) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 0, 2, 1, 1) self.label_2 = QtWidgets.QLabel(self.moving) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1) self.moving_y_coordinate = QtWidgets.QDoubleSpinBox(self.moving) self.moving_y_coordinate.setMinimum(-1000000.0) self.moving_y_coordinate.setMaximum(1000000.0) self.moving_y_coordinate.setObjectName("moving_y_coordinate") self.gridLayout.addWidget(self.moving_y_coordinate, 1, 1, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem1, 1, 2, 1, 1) self.moving_x_coordinate = QtWidgets.QDoubleSpinBox(self.moving) self.moving_x_coordinate.setMinimum(-1000000.0) self.moving_x_coordinate.setMaximum(1000000.0) self.moving_x_coordinate.setObjectName("moving_x_coordinate") self.gridLayout.addWidget(self.moving_x_coordinate, 0, 1, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout) spacerItem2 = QtWidgets.QSpacerItem(20, 99, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem2) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem3) self.moving_button = QtWidgets.QPushButton(self.moving) self.moving_button.setDefault(True) self.moving_button.setObjectName("moving_button") self.horizontalLayout_3.addWidget(self.moving_button) spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem4) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.tabWidget.addTab(self.moving, "") self.scaling = QtWidgets.QWidget() self.scaling.setObjectName("scaling") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.scaling) self.verticalLayout_3.setContentsMargins(6, 6, 6, 6) self.verticalLayout_3.setObjectName("verticalLayout_3") self.gridLayout_2 = QtWidgets.QGridLayout() self.gridLayout_2.setObjectName("gridLayout_2") spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem5, 0, 2, 1, 1) self.scaling_h = QtWidgets.QDoubleSpinBox(self.scaling) self.scaling_h.setMinimum(1.0) self.scaling_h.setMaximum(10000.0) self.scaling_h.setObjectName("scaling_h") self.gridLayout_2.addWidget(self.scaling_h, 0, 1, 1, 1) self.label_3 = QtWidgets.QLabel(self.scaling) self.label_3.setObjectName("label_3") self.gridLayout_2.addWidget(self.label_3, 0, 0, 1, 1) self.label_4 = QtWidgets.QLabel(self.scaling) self.label_4.setObjectName("label_4") self.gridLayout_2.addWidget(self.label_4, 1, 0, 1, 1) spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem6, 1, 2, 1, 1) self.scaling_v = QtWidgets.QDoubleSpinBox(self.scaling) self.scaling_v.setMinimum(1.0) self.scaling_v.setMaximum(10000.0) self.scaling_v.setObjectName("scaling_v") self.gridLayout_2.addWidget(self.scaling_v, 1, 1, 1, 1) self.verticalLayout_3.addLayout(self.gridLayout_2) self.line = QtWidgets.QFrame(self.scaling) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_3.addWidget(self.line) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.label_5 = QtWidgets.QLabel(self.scaling) self.label_5.setObjectName("label_5") self.horizontalLayout_2.addWidget(self.label_5) self.scaling_rx = QtWidgets.QDoubleSpinBox(self.scaling) self.scaling_rx.setMinimum(-1000000.0) self.scaling_rx.setMaximum(1000000.0) self.scaling_rx.setObjectName("scaling_rx") self.horizontalLayout_2.addWidget(self.scaling_rx) self.scaling_ry = QtWidgets.QDoubleSpinBox(self.scaling) self.scaling_ry.setMinimum(-1000000.0) self.scaling_ry.setMaximum(1000000.0) self.scaling_ry.setObjectName("scaling_ry") self.horizontalLayout_2.addWidget(self.scaling_ry) spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem7) self.verticalLayout_3.addLayout(self.horizontalLayout_2) spacerItem8 = QtWidgets.QSpacerItem(20, 52, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem8) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem9) self.scaling_button = QtWidgets.QPushButton(self.scaling) self.scaling_button.setDefault(True) self.scaling_button.setObjectName("scaling_button") self.horizontalLayout_4.addWidget(self.scaling_button) spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem10) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.tabWidget.addTab(self.scaling, "") self.curve_fitting = QtWidgets.QWidget() self.curve_fitting.setObjectName("curve_fitting") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.curve_fitting) self.verticalLayout_4.setContentsMargins(6, 6, 6, 6) self.verticalLayout_4.setObjectName("verticalLayout_4") self.label_8 = QtWidgets.QLabel(self.curve_fitting) self.label_8.setWordWrap(True) self.label_8.setObjectName("label_8") self.verticalLayout_4.addWidget(self.label_8) self.horizontalLayout_7 = QtWidgets.QHBoxLayout() self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.label_7 = QtWidgets.QLabel(self.curve_fitting) self.label_7.setObjectName("label_7") self.horizontalLayout_7.addWidget(self.label_7) self.points_num = QtWidgets.QLabel(self.curve_fitting) self.points_num.setObjectName("points_num") self.horizontalLayout_7.addWidget(self.points_num) spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_7.addItem(spacerItem11) self.verticalLayout_4.addLayout(self.horizontalLayout_7) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.label_6 = QtWidgets.QLabel(self.curve_fitting) self.label_6.setObjectName("label_6") self.horizontalLayout_6.addWidget(self.label_6) self.match_num = QtWidgets.QSpinBox(self.curve_fitting) self.match_num.setObjectName("match_num") self.horizontalLayout_6.addWidget(self.match_num) spacerItem12 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem12) self.verticalLayout_4.addLayout(self.horizontalLayout_6) spacerItem13 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_4.addItem(spacerItem13) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") spacerItem14 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem14) self.match_button = QtWidgets.QPushButton(self.curve_fitting) self.match_button.setDefault(True) self.match_button.setObjectName("match_button") self.horizontalLayout_8.addWidget(self.match_button) spacerItem15 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_8.addItem(spacerItem15) self.verticalLayout_4.addLayout(self.horizontalLayout_8) self.tabWidget.addTab(self.curve_fitting, "") self.verticalLayout_5.addWidget(self.splitter) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") spacerItem16 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem16) self.button_box = QtWidgets.QDialogButtonBox(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.button_box.sizePolicy().hasHeightForWidth()) self.button_box.setSizePolicy(sizePolicy) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Close) self.button_box.setObjectName("button_box") self.horizontalLayout.addWidget(self.button_box) self.verticalLayout_5.addLayout(self.horizontalLayout) self.retranslateUi(Dialog) self.button_box.rejected.connect(Dialog.reject) QtCore.QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(385, 251) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/formula.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout.setObjectName("verticalLayout") self.tabWidget = QtWidgets.QTabWidget(Dialog) self.tabWidget.setObjectName("tabWidget") self.fitting = QtWidgets.QWidget() self.fitting.setObjectName("fitting") self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.fitting) self.verticalLayout_6.setObjectName("verticalLayout_6") self.gridLayout_3 = QtWidgets.QGridLayout() self.gridLayout_3.setObjectName("gridLayout_3") self.num_points_label = QtWidgets.QLabel(self.fitting) self.num_points_label.setObjectName("num_points_label") self.gridLayout_3.addWidget(self.num_points_label, 1, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_3.addItem(spacerItem, 0, 3, 1, 1) self.verticalLayout_4 = QtWidgets.QVBoxLayout() self.verticalLayout_4.setObjectName("verticalLayout_4") self.efd_option = QtWidgets.QRadioButton(self.fitting) self.efd_option.setChecked(True) self.efd_option.setObjectName("efd_option") self.verticalLayout_4.addWidget(self.efd_option) self.bspline_option = QtWidgets.QRadioButton(self.fitting) self.bspline_option.setObjectName("bspline_option") self.verticalLayout_4.addWidget(self.bspline_option) self.gridLayout_3.addLayout(self.verticalLayout_4, 0, 1, 1, 1) self.fitting_method_label = QtWidgets.QLabel(self.fitting) self.fitting_method_label.setObjectName("fitting_method_label") self.gridLayout_3.addWidget(self.fitting_method_label, 0, 0, 1, 1) self.num_points = QtWidgets.QSpinBox(self.fitting) self.num_points.setMinimum(3) self.num_points.setMaximum(9999) self.num_points.setObjectName("num_points") self.gridLayout_3.addWidget(self.num_points, 1, 1, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_3.addItem(spacerItem1, 1, 3, 1, 1) self.close_path_option = QtWidgets.QCheckBox(self.fitting) self.close_path_option.setEnabled(False) self.close_path_option.setChecked(True) self.close_path_option.setObjectName("close_path_option") self.gridLayout_3.addWidget(self.close_path_option, 0, 2, 1, 1) self.verticalLayout_6.addLayout(self.gridLayout_3) self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem2) self.fitting_preview_button = QtWidgets.QPushButton(self.fitting) self.fitting_preview_button.setObjectName("fitting_preview_button") self.horizontalLayout_6.addWidget(self.fitting_preview_button) spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem3) self.verticalLayout_6.addLayout(self.horizontalLayout_6) spacerItem4 = QtWidgets.QSpacerItem(20, 171, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_6.addItem(spacerItem4) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem5) self.fitting_button = QtWidgets.QPushButton(self.fitting) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/fitting.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.fitting_button.setIcon(icon1) self.fitting_button.setObjectName("fitting_button") self.horizontalLayout_5.addWidget(self.fitting_button) spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem6) self.verticalLayout_6.addLayout(self.horizontalLayout_5) self.tabWidget.addTab(self.fitting, icon1, "") self.move_tab = QtWidgets.QWidget() self.move_tab.setObjectName("move_tab") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.move_tab) self.verticalLayout_2.setContentsMargins(6, 6, 6, 6) self.verticalLayout_2.setObjectName("verticalLayout_2") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.move_x_label = QtWidgets.QLabel(self.move_tab) self.move_x_label.setObjectName("move_x_label") self.gridLayout.addWidget(self.move_x_label, 0, 0, 1, 1) spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem7, 0, 2, 1, 1) self.move_y_label = QtWidgets.QLabel(self.move_tab) self.move_y_label.setObjectName("move_y_label") self.gridLayout.addWidget(self.move_y_label, 1, 0, 1, 1) self.move_y = QtWidgets.QDoubleSpinBox(self.move_tab) self.move_y.setMinimum(-1000000.0) self.move_y.setMaximum(1000000.0) self.move_y.setObjectName("move_y") self.gridLayout.addWidget(self.move_y, 1, 1, 1, 1) spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem8, 1, 2, 1, 1) self.move_x = QtWidgets.QDoubleSpinBox(self.move_tab) self.move_x.setMinimum(-1000000.0) self.move_x.setMaximum(1000000.0) self.move_x.setObjectName("move_x") self.gridLayout.addWidget(self.move_x, 0, 1, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout) spacerItem9 = QtWidgets.QSpacerItem(20, 99, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem9) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem10) self.move_button = QtWidgets.QPushButton(self.move_tab) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/translate.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.move_button.setIcon(icon2) self.move_button.setDefault(True) self.move_button.setObjectName("move_button") self.horizontalLayout_3.addWidget(self.move_button) spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem11) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.tabWidget.addTab(self.move_tab, icon2, "") self.rotate_tab = QtWidgets.QWidget() self.rotate_tab.setObjectName("rotate_tab") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.rotate_tab) self.verticalLayout_5.setObjectName("verticalLayout_5") self.gridLayout_5 = QtWidgets.QGridLayout() self.gridLayout_5.setObjectName("gridLayout_5") self.rotate_angle = QtWidgets.QDoubleSpinBox(self.rotate_tab) self.rotate_angle.setMaximum(360.0) self.rotate_angle.setObjectName("rotate_angle") self.gridLayout_5.addWidget(self.rotate_angle, 0, 1, 1, 1) self.rotate_angle_label = QtWidgets.QLabel(self.rotate_tab) self.rotate_angle_label.setObjectName("rotate_angle_label") self.gridLayout_5.addWidget(self.rotate_angle_label, 0, 0, 1, 1) spacerItem12 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_5.addItem(spacerItem12, 0, 2, 1, 1) self.verticalLayout_5.addLayout(self.gridLayout_5) spacerItem13 = QtWidgets.QSpacerItem(20, 158, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_5.addItem(spacerItem13) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") spacerItem14 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem14) self.rotate_button = QtWidgets.QPushButton(self.rotate_tab) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/rotate.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.rotate_button.setIcon(icon3) self.rotate_button.setObjectName("rotate_button") self.horizontalLayout_2.addWidget(self.rotate_button) spacerItem15 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem15) self.verticalLayout_5.addLayout(self.horizontalLayout_2) self.tabWidget.addTab(self.rotate_tab, icon3, "") self.scale_tab = QtWidgets.QWidget() self.scale_tab.setObjectName("scale_tab") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.scale_tab) self.verticalLayout_3.setContentsMargins(6, 6, 6, 6) self.verticalLayout_3.setObjectName("verticalLayout_3") self.gridLayout_2 = QtWidgets.QGridLayout() self.gridLayout_2.setObjectName("gridLayout_2") self.scale_h_label = QtWidgets.QLabel(self.scale_tab) self.scale_h_label.setObjectName("scale_h_label") self.gridLayout_2.addWidget(self.scale_h_label, 0, 0, 1, 1) spacerItem16 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem16, 0, 3, 1, 1) self.scale_v_label = QtWidgets.QLabel(self.scale_tab) self.scale_v_label.setObjectName("scale_v_label") self.gridLayout_2.addWidget(self.scale_v_label, 1, 0, 1, 1) self.scale_h = QtWidgets.QDoubleSpinBox(self.scale_tab) self.scale_h.setMinimum(1.0) self.scale_h.setMaximum(10000.0) self.scale_h.setObjectName("scale_h") self.gridLayout_2.addWidget(self.scale_h, 0, 1, 1, 1) self.scale_v = QtWidgets.QDoubleSpinBox(self.scale_tab) self.scale_v.setMinimum(1.0) self.scale_v.setMaximum(10000.0) self.scale_v.setObjectName("scale_v") self.gridLayout_2.addWidget(self.scale_v, 1, 1, 1, 1) spacerItem17 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem17, 1, 3, 1, 1) self.scale_r_label = QtWidgets.QLabel(self.scale_tab) self.scale_r_label.setObjectName("scale_r_label") self.gridLayout_2.addWidget(self.scale_r_label, 2, 0, 1, 1) self.scale_rx = QtWidgets.QDoubleSpinBox(self.scale_tab) self.scale_rx.setMinimum(-1000000.0) self.scale_rx.setMaximum(1000000.0) self.scale_rx.setObjectName("scale_rx") self.gridLayout_2.addWidget(self.scale_rx, 2, 1, 1, 1) self.scale_ry = QtWidgets.QDoubleSpinBox(self.scale_tab) self.scale_ry.setMinimum(-1000000.0) self.scale_ry.setMaximum(1000000.0) self.scale_ry.setObjectName("scale_ry") self.gridLayout_2.addWidget(self.scale_ry, 2, 2, 1, 1) spacerItem18 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem18, 2, 3, 1, 1) self.verticalLayout_3.addLayout(self.gridLayout_2) spacerItem19 = QtWidgets.QSpacerItem(20, 52, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem19) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem20 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem20) self.scale_button = QtWidgets.QPushButton(self.scale_tab) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/aim.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.scale_button.setIcon(icon4) self.scale_button.setDefault(True) self.scale_button.setObjectName("scale_button") self.horizontalLayout_4.addWidget(self.scale_button) spacerItem21 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem21) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.tabWidget.addTab(self.scale_tab, icon4, "") self.verticalLayout.addWidget(self.tabWidget) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") spacerItem22 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem22) self.button_box = QtWidgets.QDialogButtonBox(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.button_box.sizePolicy().hasHeightForWidth()) self.button_box.setSizePolicy(sizePolicy) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Close) self.button_box.setObjectName("button_box") self.horizontalLayout.addWidget(self.button_box) self.verticalLayout.addLayout(self.horizontalLayout) self.retranslateUi(Dialog) self.button_box.rejected.connect(Dialog.reject) QtCore.QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(1002, 498) Dialog.setMinimumSize(QtCore.QSize(1002, 498)) Dialog.setMaximumSize(QtCore.QSize(1002, 498)) Dialog.setStyleSheet("") self.gridLayout_2 = QtWidgets.QGridLayout(Dialog) self.gridLayout_2.setObjectName("gridLayout_2") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.lowerLeftScroll = QtWidgets.QScrollArea(Dialog) self.lowerLeftScroll.setMinimumSize(QtCore.QSize(476, 150)) self.lowerLeftScroll.setMaximumSize(QtCore.QSize(476, 150)) self.lowerLeftScroll.setVerticalScrollBarPolicy( QtCore.Qt.ScrollBarAlwaysOff) self.lowerLeftScroll.setHorizontalScrollBarPolicy( QtCore.Qt.ScrollBarAlwaysOff) self.lowerLeftScroll.setWidgetResizable(True) self.lowerLeftScroll.setObjectName("lowerLeftScroll") self.scrollAreaWidgetContents_5 = QtWidgets.QWidget() self.scrollAreaWidgetContents_5.setGeometry( QtCore.QRect(0, 0, 474, 148)) self.scrollAreaWidgetContents_5.setObjectName( "scrollAreaWidgetContents_5") self.lowerLeftScroll.setWidget(self.scrollAreaWidgetContents_5) self.horizontalLayout.addWidget(self.lowerLeftScroll) self.lowerRightScroll = QtWidgets.QScrollArea(Dialog) self.lowerRightScroll.setMinimumSize(QtCore.QSize(476, 150)) self.lowerRightScroll.setMaximumSize(QtCore.QSize(476, 150)) self.lowerRightScroll.setVerticalScrollBarPolicy( QtCore.Qt.ScrollBarAlwaysOff) self.lowerRightScroll.setHorizontalScrollBarPolicy( QtCore.Qt.ScrollBarAlwaysOff) self.lowerRightScroll.setWidgetResizable(True) self.lowerRightScroll.setObjectName("lowerRightScroll") self.scrollAreaWidgetContents_4 = QtWidgets.QWidget() self.scrollAreaWidgetContents_4.setGeometry( QtCore.QRect(0, 0, 474, 148)) self.scrollAreaWidgetContents_4.setObjectName( "scrollAreaWidgetContents_4") self.lowerRightScroll.setWidget(self.scrollAreaWidgetContents_4) self.horizontalLayout.addWidget(self.lowerRightScroll) self.gridLayout_2.addLayout(self.horizontalLayout, 1, 0, 1, 2) self.upperRightScroll = QtWidgets.QScrollArea(Dialog) self.upperRightScroll.setMinimumSize(QtCore.QSize(300, 300)) self.upperRightScroll.setMaximumSize(QtCore.QSize(300, 300)) self.upperRightScroll.setWidgetResizable(True) self.upperRightScroll.setObjectName("upperRightScroll") self.scrollAreaWidgetContents = QtWidgets.QWidget() self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 298, 298)) self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") self.upperRightScroll.setWidget(self.scrollAreaWidgetContents) self.gridLayout_2.addWidget(self.upperRightScroll, 0, 1, 1, 1) self.tabWidget = QtWidgets.QTabWidget(Dialog) self.tabWidget.setMinimumSize(QtCore.QSize(0, 0)) self.tabWidget.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.tabWidget.setFocusPolicy(QtCore.Qt.WheelFocus) self.tabWidget.setAutoFillBackground(False) self.tabWidget.setStyleSheet("") self.tabWidget.setObjectName("tabWidget") self.Generate = QtWidgets.QWidget() self.Generate.setObjectName("Generate") self.gridLayout_6 = QtWidgets.QGridLayout(self.Generate) self.gridLayout_6.setContentsMargins(21, 21, 21, 5) self.gridLayout_6.setObjectName("gridLayout_6") self.label = QtWidgets.QLabel(self.Generate) self.label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label.setObjectName("label") self.gridLayout_6.addWidget(self.label, 0, 0, 1, 1) self.wavelengthSpin = QtWidgets.QSpinBox(self.Generate) self.wavelengthSpin.setMinimumSize(QtCore.QSize(75, 0)) self.wavelengthSpin.setSpecialValueText("") self.wavelengthSpin.setSuffix("") self.wavelengthSpin.setMinimum(350) self.wavelengthSpin.setMaximum(750) self.wavelengthSpin.setProperty("value", 488) self.wavelengthSpin.setObjectName("wavelengthSpin") self.gridLayout_6.addWidget(self.wavelengthSpin, 0, 1, 1, 1) self.label_2 = QtWidgets.QLabel(self.Generate) self.label_2.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_2.setObjectName("label_2") self.gridLayout_6.addWidget(self.label_2, 0, 2, 1, 1) self.innerNASpin = QtWidgets.QDoubleSpinBox(self.Generate) self.innerNASpin.setMinimumSize(QtCore.QSize(70, 0)) self.innerNASpin.setMaximumSize(QtCore.QSize(65, 16777215)) self.innerNASpin.setSpecialValueText("") self.innerNASpin.setDecimals(3) self.innerNASpin.setMinimum(0.1) self.innerNASpin.setMaximum(0.64) self.innerNASpin.setSingleStep(0.001) self.innerNASpin.setProperty("value", 0.42) self.innerNASpin.setObjectName("innerNASpin") self.gridLayout_6.addWidget(self.innerNASpin, 0, 3, 1, 1) self.label_16 = QtWidgets.QLabel(self.Generate) self.label_16.setMinimumSize(QtCore.QSize(100, 0)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_16.setFont(font) self.label_16.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_16.setObjectName("label_16") self.gridLayout_6.addWidget(self.label_16, 0, 4, 1, 2) self.PatternPresetsCombo = QtWidgets.QComboBox(self.Generate) self.PatternPresetsCombo.setMinimumSize(QtCore.QSize(180, 0)) self.PatternPresetsCombo.setObjectName("PatternPresetsCombo") self.gridLayout_6.addWidget(self.PatternPresetsCombo, 0, 6, 1, 2) self.label_8 = QtWidgets.QLabel(self.Generate) self.label_8.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_8.setObjectName("label_8") self.gridLayout_6.addWidget(self.label_8, 1, 0, 1, 1) self.label_3 = QtWidgets.QLabel(self.Generate) self.label_3.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.label_3.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_3.setObjectName("label_3") self.gridLayout_6.addWidget(self.label_3, 1, 2, 1, 1) self.outerNASpin = QtWidgets.QDoubleSpinBox(self.Generate) self.outerNASpin.setMinimumSize(QtCore.QSize(70, 0)) self.outerNASpin.setMaximumSize(QtCore.QSize(65, 16777215)) self.outerNASpin.setSpecialValueText("") self.outerNASpin.setDecimals(3) self.outerNASpin.setMinimum(0.15) self.outerNASpin.setMaximum(0.7) self.outerNASpin.setSingleStep(0.001) self.outerNASpin.setProperty("value", 0.5) self.outerNASpin.setObjectName("outerNASpin") self.gridLayout_6.addWidget(self.outerNASpin, 1, 3, 1, 1) self.nBeamsLabel = QtWidgets.QLabel(self.Generate) self.nBeamsLabel.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.nBeamsLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.nBeamsLabel.setObjectName("nBeamsLabel") self.gridLayout_6.addWidget(self.nBeamsLabel, 1, 5, 1, 2) self.nBeamsSpin = QtWidgets.QSpinBox(self.Generate) self.nBeamsSpin.setMinimumSize(QtCore.QSize(75, 0)) self.nBeamsSpin.setMaximumSize(QtCore.QSize(75, 16777215)) self.nBeamsSpin.setSpecialValueText("") self.nBeamsSpin.setMinimum(1) self.nBeamsSpin.setMaximum(150) self.nBeamsSpin.setSingleStep(2) self.nBeamsSpin.setObjectName("nBeamsSpin") self.gridLayout_6.addWidget(self.nBeamsSpin, 1, 7, 1, 1) self.label_17 = QtWidgets.QLabel(self.Generate) self.label_17.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_17.setObjectName("label_17") self.gridLayout_6.addWidget(self.label_17, 2, 0, 1, 1) self.SpacingWidget = QtWidgets.QWidget(self.Generate) self.SpacingWidget.setObjectName("SpacingWidget") self.gridLayout_5 = QtWidgets.QGridLayout(self.SpacingWidget) self.gridLayout_5.setContentsMargins(40, 0, 0, 0) self.gridLayout_5.setObjectName("gridLayout_5") self.label_4 = QtWidgets.QLabel(self.SpacingWidget) self.label_4.setEnabled(False) self.label_4.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_4.setObjectName("label_4") self.gridLayout_5.addWidget(self.label_4, 0, 0, 1, 1) self.autoSpacingCheckBox = QtWidgets.QCheckBox(self.SpacingWidget) self.autoSpacingCheckBox.setMaximumSize(QtCore.QSize(113, 16777215)) self.autoSpacingCheckBox.setChecked(True) self.autoSpacingCheckBox.setObjectName("autoSpacingCheckBox") self.gridLayout_5.addWidget(self.autoSpacingCheckBox, 2, 0, 1, 1) self.fudgeSpin = QtWidgets.QDoubleSpinBox(self.SpacingWidget) self.fudgeSpin.setMinimumSize(QtCore.QSize(75, 0)) self.fudgeSpin.setMaximumSize(QtCore.QSize(75, 16777215)) self.fudgeSpin.setSpecialValueText("") self.fudgeSpin.setDecimals(3) self.fudgeSpin.setMinimum(0.75) self.fudgeSpin.setMaximum(1.25) self.fudgeSpin.setSingleStep(0.001) self.fudgeSpin.setProperty("value", 0.97) self.fudgeSpin.setObjectName("fudgeSpin") self.gridLayout_5.addWidget(self.fudgeSpin, 2, 1, 1, 1) self.spacingSpin = QtWidgets.QDoubleSpinBox(self.SpacingWidget) self.spacingSpin.setEnabled(False) self.spacingSpin.setMinimumSize(QtCore.QSize(75, 0)) self.spacingSpin.setMaximumSize(QtCore.QSize(75, 16777215)) self.spacingSpin.setSpecialValueText("") self.spacingSpin.setDecimals(3) self.spacingSpin.setMinimum(0.001) self.spacingSpin.setMaximum(40.0) self.spacingSpin.setSingleStep(0.001) self.spacingSpin.setProperty("value", 1.084) self.spacingSpin.setObjectName("spacingSpin") self.gridLayout_5.addWidget(self.spacingSpin, 0, 1, 1, 1) self.gridLayout_6.addWidget(self.SpacingWidget, 2, 5, 2, 3) self.label_7 = QtWidgets.QLabel(self.Generate) self.label_7.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_7.setObjectName("label_7") self.gridLayout_6.addWidget(self.label_7, 3, 0, 1, 1) self.tiltSpin = QtWidgets.QDoubleSpinBox(self.Generate) self.tiltSpin.setMinimumSize(QtCore.QSize(75, 0)) self.tiltSpin.setSpecialValueText("") self.tiltSpin.setDecimals(2) self.tiltSpin.setMinimum(-1.5) self.tiltSpin.setMaximum(1.5) self.tiltSpin.setSingleStep(0.01) self.tiltSpin.setProperty("value", 0.0) self.tiltSpin.setObjectName("tiltSpin") self.gridLayout_6.addWidget(self.tiltSpin, 3, 1, 1, 1) self.label_10 = QtWidgets.QLabel(self.Generate) self.label_10.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_10.setObjectName("label_10") self.gridLayout_6.addWidget(self.label_10, 4, 0, 1, 1) self.magSpin = QtWidgets.QDoubleSpinBox(self.Generate) self.magSpin.setMinimumSize(QtCore.QSize(75, 0)) self.magSpin.setSpecialValueText("") self.magSpin.setDecimals(3) self.magSpin.setMinimum(50.0) self.magSpin.setMaximum(350.0) self.magSpin.setSingleStep(0.001) self.magSpin.setProperty("value", 167.364) self.magSpin.setObjectName("magSpin") self.gridLayout_6.addWidget(self.magSpin, 4, 1, 1, 1) self.label_15 = QtWidgets.QLabel(self.Generate) self.label_15.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_15.setObjectName("label_15") self.gridLayout_6.addWidget(self.label_15, 5, 0, 1, 1) self.cropSpin = QtWidgets.QDoubleSpinBox(self.Generate) self.cropSpin.setMinimumSize(QtCore.QSize(75, 0)) self.cropSpin.setSpecialValueText("") self.cropSpin.setDecimals(3) self.cropSpin.setMinimum(0.001) self.cropSpin.setMaximum(1.0) self.cropSpin.setSingleStep(0.001) self.cropSpin.setProperty("value", 0.15) self.cropSpin.setObjectName("cropSpin") self.gridLayout_6.addWidget(self.cropSpin, 5, 1, 1, 1) self.previewPatternButton = QtWidgets.QPushButton(self.Generate) self.previewPatternButton.setMinimumSize(QtCore.QSize(0, 40)) self.previewPatternButton.setMaximumSize( QtCore.QSize(16777215, 16777215)) self.previewPatternButton.setAutoDefault(False) self.previewPatternButton.setDefault(False) self.previewPatternButton.setFlat(False) self.previewPatternButton.setObjectName("previewPatternButton") self.gridLayout_6.addWidget(self.previewPatternButton, 5, 2, 1, 3) self.writeFileButton = QtWidgets.QPushButton(self.Generate) self.writeFileButton.setMinimumSize(QtCore.QSize(0, 40)) self.writeFileButton.setAutoDefault(False) self.writeFileButton.setDefault(False) self.writeFileButton.setFlat(False) self.writeFileButton.setObjectName("writeFileButton") self.gridLayout_6.addWidget(self.writeFileButton, 5, 5, 1, 3) self.HexWidget = QtWidgets.QWidget(self.Generate) self.HexWidget.setObjectName("HexWidget") self.gridLayout = QtWidgets.QGridLayout(self.HexWidget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") self.idealNALabel = QtWidgets.QLabel(self.HexWidget) self.idealNALabel.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.idealNALabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.idealNALabel.setObjectName("idealNALabel") self.gridLayout.addWidget(self.idealNALabel, 0, 0, 1, 1) self.idealNASpin = QtWidgets.QDoubleSpinBox(self.HexWidget) self.idealNASpin.setMinimumSize(QtCore.QSize(70, 0)) self.idealNASpin.setMaximumSize(QtCore.QSize(65, 16777215)) self.idealNASpin.setSpecialValueText("") self.idealNASpin.setDecimals(3) self.idealNASpin.setMinimum(0.15) self.idealNASpin.setMaximum(0.7) self.idealNASpin.setSingleStep(0.001) self.idealNASpin.setProperty("value", 0.5) self.idealNASpin.setObjectName("idealNASpin") self.gridLayout.addWidget(self.idealNASpin, 0, 1, 1, 1) self.hexFillFactorLabel = QtWidgets.QLabel(self.HexWidget) self.hexFillFactorLabel.setEnabled(True) self.hexFillFactorLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.hexFillFactorLabel.setObjectName("hexFillFactorLabel") self.gridLayout.addWidget(self.hexFillFactorLabel, 1, 0, 1, 1) self.hexFillFactorSpin = QtWidgets.QDoubleSpinBox(self.HexWidget) self.hexFillFactorSpin.setEnabled(True) self.hexFillFactorSpin.setMinimumSize(QtCore.QSize(70, 0)) self.hexFillFactorSpin.setMaximumSize(QtCore.QSize(65, 16777215)) self.hexFillFactorSpin.setSpecialValueText("") self.hexFillFactorSpin.setDecimals(3) self.hexFillFactorSpin.setMinimum(0.01) self.hexFillFactorSpin.setMaximum(2.0) self.hexFillFactorSpin.setSingleStep(0.001) self.hexFillFactorSpin.setProperty("value", 0.75) self.hexFillFactorSpin.setObjectName("hexFillFactorSpin") self.gridLayout.addWidget(self.hexFillFactorSpin, 1, 1, 1, 1) self.hexBoundLabel = QtWidgets.QLabel(self.HexWidget) self.hexBoundLabel.setEnabled(True) self.hexBoundLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.hexBoundLabel.setObjectName("hexBoundLabel") self.gridLayout.addWidget(self.hexBoundLabel, 2, 0, 1, 1) self.hexBoundCombo = QtWidgets.QComboBox(self.HexWidget) self.hexBoundCombo.setMaximumSize(QtCore.QSize(76, 16777215)) self.hexBoundCombo.setObjectName("hexBoundCombo") self.hexBoundCombo.addItem("") self.hexBoundCombo.addItem("") self.hexBoundCombo.addItem("") self.gridLayout.addWidget(self.hexBoundCombo, 2, 1, 1, 1) self.gridLayout_6.addWidget(self.HexWidget, 2, 2, 3, 2) self.shiftXSpin = QtWidgets.QDoubleSpinBox(self.Generate) self.shiftXSpin.setMinimumSize(QtCore.QSize(75, 0)) self.shiftXSpin.setSpecialValueText("") self.shiftXSpin.setMinimum(-99.0) self.shiftXSpin.setSingleStep(0.1) self.shiftXSpin.setObjectName("shiftXSpin") self.gridLayout_6.addWidget(self.shiftXSpin, 1, 1, 1, 1) self.shiftYSpin = QtWidgets.QDoubleSpinBox(self.Generate) self.shiftYSpin.setMinimumSize(QtCore.QSize(75, 0)) self.shiftYSpin.setSpecialValueText("") self.shiftYSpin.setMinimum(-99.0) self.shiftYSpin.setSingleStep(0.1) self.shiftYSpin.setObjectName("shiftYSpin") self.gridLayout_6.addWidget(self.shiftYSpin, 2, 1, 1, 1) self.tabWidget.addTab(self.Generate, "") self.Batch = QtWidgets.QWidget() self.Batch.setObjectName("Batch") self.gridLayout_3 = QtWidgets.QGridLayout(self.Batch) self.gridLayout_3.setContentsMargins(21, 21, 21, 5) self.gridLayout_3.setObjectName("gridLayout_3") self.label_5 = QtWidgets.QLabel(self.Batch) self.label_5.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_5.setObjectName("label_5") self.gridLayout_3.addWidget(self.label_5, 1, 0, 1, 1) self.batch_wave = QtWidgets.QLineEdit(self.Batch) self.batch_wave.setObjectName("batch_wave") self.gridLayout_3.addWidget(self.batch_wave, 1, 1, 1, 6) self.batchProcessButton = QtWidgets.QPushButton(self.Batch) self.batchProcessButton.setEnabled(True) self.batchProcessButton.setMinimumSize(QtCore.QSize(0, 40)) font = QtGui.QFont() font.setKerning(True) self.batchProcessButton.setFont(font) self.batchProcessButton.setAutoDefault(False) self.batchProcessButton.setObjectName("batchProcessButton") self.gridLayout_3.addWidget(self.batchProcessButton, 7, 1, 1, 6) self.label_24 = QtWidgets.QLabel(self.Batch) self.label_24.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_24.setObjectName("label_24") self.gridLayout_3.addWidget(self.label_24, 6, 0, 1, 1) self.label_22 = QtWidgets.QLabel(self.Batch) self.label_22.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_22.setObjectName("label_22") self.gridLayout_3.addWidget(self.label_22, 5, 2, 1, 1) self.label_19 = QtWidgets.QLabel(self.Batch) self.label_19.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_19.setObjectName("label_19") self.gridLayout_3.addWidget(self.label_19, 3, 0, 1, 1) self.label_18 = QtWidgets.QLabel(self.Batch) self.label_18.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_18.setObjectName("label_18") self.gridLayout_3.addWidget(self.label_18, 2, 0, 1, 1) self.label_21 = QtWidgets.QLabel(self.Batch) self.label_21.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_21.setObjectName("label_21") self.gridLayout_3.addWidget(self.label_21, 5, 0, 1, 1) self.batch_outerNA = QtWidgets.QLineEdit(self.Batch) self.batch_outerNA.setObjectName("batch_outerNA") self.gridLayout_3.addWidget(self.batch_outerNA, 3, 1, 1, 6) self.batch_beamSpacing = QtWidgets.QLineEdit(self.Batch) self.batch_beamSpacing.setObjectName("batch_beamSpacing") self.gridLayout_3.addWidget(self.batch_beamSpacing, 4, 1, 1, 6) self.batch_xShift = QtWidgets.QLineEdit(self.Batch) self.batch_xShift.setMinimumSize(QtCore.QSize(90, 0)) self.batch_xShift.setObjectName("batch_xShift") self.gridLayout_3.addWidget(self.batch_xShift, 5, 1, 1, 1) self.label_20 = QtWidgets.QLabel(self.Batch) self.label_20.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_20.setObjectName("label_20") self.gridLayout_3.addWidget(self.label_20, 4, 0, 1, 1) self.batch_yShift = QtWidgets.QLineEdit(self.Batch) self.batch_yShift.setMinimumSize(QtCore.QSize(95, 0)) self.batch_yShift.setObjectName("batch_yShift") self.gridLayout_3.addWidget(self.batch_yShift, 5, 3, 1, 1) self.batch_tilt = QtWidgets.QLineEdit(self.Batch) self.batch_tilt.setMinimumSize(QtCore.QSize(140, 0)) self.batch_tilt.setObjectName("batch_tilt") self.gridLayout_3.addWidget(self.batch_tilt, 5, 5, 1, 2) self.batch_innerNA = QtWidgets.QLineEdit(self.Batch) self.batch_innerNA.setObjectName("batch_innerNA") self.gridLayout_3.addWidget(self.batch_innerNA, 2, 1, 1, 6) self.label_23 = QtWidgets.QLabel(self.Batch) self.label_23.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_23.setObjectName("label_23") self.gridLayout_3.addWidget(self.label_23, 5, 4, 1, 1) self.label_6 = QtWidgets.QLabel(self.Batch) self.label_6.setMaximumSize(QtCore.QSize(16777215, 14)) font = QtGui.QFont() font.setItalic(True) self.label_6.setFont(font) self.label_6.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_6.setObjectName("label_6") self.gridLayout_3.addWidget(self.label_6, 0, 0, 1, 7) self.batch_outputDir = QtWidgets.QLineEdit(self.Batch) self.batch_outputDir.setMinimumSize(QtCore.QSize(100, 0)) self.batch_outputDir.setReadOnly(True) self.batch_outputDir.setObjectName("batch_outputDir") self.gridLayout_3.addWidget(self.batch_outputDir, 6, 1, 1, 5) self.chooseBatchOutputDir = QtWidgets.QPushButton(self.Batch) self.chooseBatchOutputDir.setAutoDefault(False) self.chooseBatchOutputDir.setObjectName("chooseBatchOutputDir") self.gridLayout_3.addWidget(self.chooseBatchOutputDir, 6, 6, 1, 1) self.tabWidget.addTab(self.Batch, "") self.Settings = QtWidgets.QWidget() self.Settings.setObjectName("Settings") self.gridLayout_4 = QtWidgets.QGridLayout(self.Settings) self.gridLayout_4.setContentsMargins(21, 21, 21, 5) self.gridLayout_4.setObjectName("gridLayout_4") self.label_14 = QtWidgets.QLabel(self.Settings) self.label_14.setObjectName("label_14") self.gridLayout_4.addWidget(self.label_14, 0, 0, 1, 1) self.SLMmodelCombo = QtWidgets.QComboBox(self.Settings) self.SLMmodelCombo.setMaximumSize(QtCore.QSize(120, 16777215)) self.SLMmodelCombo.setObjectName("SLMmodelCombo") self.SLMmodelCombo.addItem("") self.SLMmodelCombo.addItem("") self.gridLayout_4.addWidget(self.SLMmodelCombo, 0, 1, 1, 2) spacerItem = QtWidgets.QSpacerItem(320, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_4.addItem(spacerItem, 0, 3, 1, 1) self.label_11 = QtWidgets.QLabel(self.Settings) self.label_11.setObjectName("label_11") self.gridLayout_4.addWidget(self.label_11, 1, 0, 1, 1) self.slm_pixelSize_spin = QtWidgets.QDoubleSpinBox(self.Settings) self.slm_pixelSize_spin.setMaximumSize(QtCore.QSize(80, 16777215)) self.slm_pixelSize_spin.setFocusPolicy(QtCore.Qt.WheelFocus) self.slm_pixelSize_spin.setSpecialValueText("") self.slm_pixelSize_spin.setDecimals(3) self.slm_pixelSize_spin.setMinimum(1.0) self.slm_pixelSize_spin.setMaximum(50.0) self.slm_pixelSize_spin.setSingleStep(0.001) self.slm_pixelSize_spin.setProperty("value", 13.662) self.slm_pixelSize_spin.setObjectName("slm_pixelSize_spin") self.gridLayout_4.addWidget(self.slm_pixelSize_spin, 1, 1, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(358, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_4.addItem(spacerItem1, 1, 2, 1, 2) self.label_12 = QtWidgets.QLabel(self.Settings) self.label_12.setObjectName("label_12") self.gridLayout_4.addWidget(self.label_12, 2, 0, 1, 1) self.slm_xpix_spin = QtWidgets.QSpinBox(self.Settings) self.slm_xpix_spin.setMaximumSize(QtCore.QSize(80, 16777215)) self.slm_xpix_spin.setFocusPolicy(QtCore.Qt.WheelFocus) self.slm_xpix_spin.setSpecialValueText("") self.slm_xpix_spin.setMinimum(1) self.slm_xpix_spin.setMaximum(3000) self.slm_xpix_spin.setProperty("value", 1280) self.slm_xpix_spin.setObjectName("slm_xpix_spin") self.gridLayout_4.addWidget(self.slm_xpix_spin, 2, 1, 1, 1) spacerItem2 = QtWidgets.QSpacerItem(358, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_4.addItem(spacerItem2, 2, 2, 1, 2) self.label_13 = QtWidgets.QLabel(self.Settings) self.label_13.setObjectName("label_13") self.gridLayout_4.addWidget(self.label_13, 3, 0, 1, 1) self.slm_ypix_spin = QtWidgets.QSpinBox(self.Settings) self.slm_ypix_spin.setMaximumSize(QtCore.QSize(80, 16777215)) self.slm_ypix_spin.setFocusPolicy(QtCore.Qt.WheelFocus) self.slm_ypix_spin.setSpecialValueText("") self.slm_ypix_spin.setMinimum(1) self.slm_ypix_spin.setMaximum(3000) self.slm_ypix_spin.setProperty("value", 1024) self.slm_ypix_spin.setObjectName("slm_ypix_spin") self.gridLayout_4.addWidget(self.slm_ypix_spin, 3, 1, 1, 1) spacerItem3 = QtWidgets.QSpacerItem(358, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_4.addItem(spacerItem3, 3, 2, 1, 2) spacerItem4 = QtWidgets.QSpacerItem(20, 107, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout_4.addItem(spacerItem4, 4, 3, 1, 1) self.maskLUTLabel = QtWidgets.QLabel(self.Settings) self.maskLUTLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.maskLUTLabel.setObjectName("maskLUTLabel") self.gridLayout_4.addWidget(self.maskLUTLabel, 0, 4, 1, 1) self.maskLUTCombo = QtWidgets.QComboBox(self.Settings) self.maskLUTCombo.setMinimumSize(QtCore.QSize(140, 0)) self.maskLUTCombo.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.maskLUTCombo.setObjectName("maskLUTCombo") self.gridLayout_4.addWidget(self.maskLUTCombo, 0, 5, 1, 1) self.sampleLUTLabel = QtWidgets.QLabel(self.Settings) self.sampleLUTLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.sampleLUTLabel.setObjectName("sampleLUTLabel") self.gridLayout_4.addWidget(self.sampleLUTLabel, 1, 4, 1, 1) self.sampleLUTCombo = QtWidgets.QComboBox(self.Settings) self.sampleLUTCombo.setMinimumSize(QtCore.QSize(140, 0)) self.sampleLUTCombo.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.sampleLUTCombo.setObjectName("sampleLUTCombo") self.gridLayout_4.addWidget(self.sampleLUTCombo, 1, 5, 1, 1) self.tabWidget.addTab(self.Settings, "") self.gridLayout_2.addWidget(self.tabWidget, 0, 0, 1, 1) self.retranslateUi(Dialog) self.tabWidget.setCurrentIndex(0) self.autoSpacingCheckBox.clicked['bool'].connect( self.spacingSpin.setDisabled) self.autoSpacingCheckBox.clicked['bool'].connect( self.label_4.setDisabled) self.autoSpacingCheckBox.clicked['bool'].connect( self.fudgeSpin.setEnabled) QtCore.QMetaObject.connectSlotsByName(Dialog) Dialog.setTabOrder(self.wavelengthSpin, self.shiftXSpin) Dialog.setTabOrder(self.shiftXSpin, self.shiftYSpin) Dialog.setTabOrder(self.shiftYSpin, self.tiltSpin) Dialog.setTabOrder(self.tiltSpin, self.magSpin) Dialog.setTabOrder(self.magSpin, self.cropSpin) Dialog.setTabOrder(self.cropSpin, self.innerNASpin) Dialog.setTabOrder(self.innerNASpin, self.outerNASpin) Dialog.setTabOrder(self.outerNASpin, self.nBeamsSpin) Dialog.setTabOrder(self.nBeamsSpin, self.spacingSpin) Dialog.setTabOrder(self.spacingSpin, self.fudgeSpin) Dialog.setTabOrder(self.fudgeSpin, self.idealNASpin) Dialog.setTabOrder(self.idealNASpin, self.hexFillFactorSpin) Dialog.setTabOrder(self.hexFillFactorSpin, self.hexBoundCombo) Dialog.setTabOrder(self.hexBoundCombo, self.batch_wave) Dialog.setTabOrder(self.batch_wave, self.batch_innerNA) Dialog.setTabOrder(self.batch_innerNA, self.batch_outerNA) Dialog.setTabOrder(self.batch_outerNA, self.batch_beamSpacing) Dialog.setTabOrder(self.batch_beamSpacing, self.batch_xShift) Dialog.setTabOrder(self.batch_xShift, self.batch_yShift) Dialog.setTabOrder(self.batch_yShift, self.batch_tilt) Dialog.setTabOrder(self.batch_tilt, self.chooseBatchOutputDir) Dialog.setTabOrder(self.chooseBatchOutputDir, self.batchProcessButton) Dialog.setTabOrder(self.batchProcessButton, self.lowerRightScroll) Dialog.setTabOrder(self.lowerRightScroll, self.lowerLeftScroll) Dialog.setTabOrder(self.lowerLeftScroll, self.slm_pixelSize_spin) Dialog.setTabOrder(self.slm_pixelSize_spin, self.slm_xpix_spin) Dialog.setTabOrder(self.slm_xpix_spin, self.slm_ypix_spin) Dialog.setTabOrder(self.slm_ypix_spin, self.previewPatternButton) Dialog.setTabOrder(self.previewPatternButton, self.writeFileButton) Dialog.setTabOrder(self.writeFileButton, self.tabWidget) Dialog.setTabOrder(self.tabWidget, self.PatternPresetsCombo) Dialog.setTabOrder(self.PatternPresetsCombo, self.upperRightScroll) Dialog.setTabOrder(self.upperRightScroll, self.autoSpacingCheckBox) Dialog.setTabOrder(self.autoSpacingCheckBox, self.batch_outputDir) Dialog.setTabOrder(self.batch_outputDir, self.SLMmodelCombo)
def __init__(self, viewerInstance, prob, threshold, parent = None): super(plot3D_options, self).__init__(parent) self.viewer = viewerInstance self.prob = prob self.threshold = threshold #window geometry windowGeometry(self, left=300, top=300, height=300, width=200) #spinboxes self.spinLabel1 = QtWidgets.QLabel("Amount of downsampling (0-1)") self.SpinBox1 = QtWidgets.QDoubleSpinBox() self.SpinBox1.setDecimals(4) self.SpinBox1.setRange(0,1.0000) self.SpinBox1.setValue(self.prob) self.spinLabel2 = QtWidgets.QLabel("Threshold level") self.SpinBox2 = QtWidgets.QSpinBox() self.SpinBox2.setRange(0,10000) self.SpinBox2.setValue(self.threshold) #checkboxes self.checkBox1_label = QtWidgets.QLabel("Display array outline") self.checkBox1 = QtWidgets.QCheckBox() self.checkBox2_label = QtWidgets.QLabel("Display plot axis") self.checkBox2 = QtWidgets.QCheckBox() #buttons #self.button1 = QtWidgets.QPushButton("Close") #grid layout layout = QtWidgets.QGridLayout() layout.setSpacing(5) layout.addWidget(self.spinLabel1, 1, 0) layout.addWidget(self.SpinBox1, 1, 1) layout.addWidget(self.spinLabel2, 2, 0) layout.addWidget(self.SpinBox2, 2, 1) layout.addWidget(self.checkBox1_label, 3, 0) layout.addWidget(self.checkBox1, 3, 1) layout.addWidget(self.checkBox2_label, 4, 0) layout.addWidget(self.checkBox2, 4, 1) #layout.addWidget(self.button1, 5, 2) self.setLayout(layout) self.setGeometry(self.left, self.top, self.width, self.height) #add window title self.setWindowTitle("3D Plot Options") #connect spinboxes self.SpinBox1.valueChanged.connect(self.spinBox1ValueChange) self.SpinBox2.valueChanged.connect(self.spinBox2ValueChange) #connect checkboxes self.checkBox1.stateChanged.connect(self.checkBox1ValueChange) self.checkBox2.stateChanged.connect(self.checkBox2ValueChange) #connect buttons #self.button1.clicked.connect(self.close) return
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(364, 596) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/bearing.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.horizontalLayout_5 = QtWidgets.QHBoxLayout(Dialog) self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.verticalLayout = QtWidgets.QVBoxLayout() self.verticalLayout.setObjectName("verticalLayout") self.name_label = QtWidgets.QLabel(Dialog) self.name_label.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.name_label.setObjectName("name_label") self.verticalLayout.addWidget(self.name_label) self.name_box = QtWidgets.QComboBox(Dialog) self.name_box.setObjectName("name_box") self.verticalLayout.addWidget(self.name_box) self.color_label = QtWidgets.QLabel(Dialog) self.color_label.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.color_label.setObjectName("color_label") self.verticalLayout.addWidget(self.color_label) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.color_box = QtWidgets.QComboBox(Dialog) self.color_box.setObjectName("color_box") self.horizontalLayout_2.addWidget(self.color_box) self.color_pick_button = QtWidgets.QPushButton(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.color_pick_button.sizePolicy().hasHeightForWidth()) self.color_pick_button.setSizePolicy(sizePolicy) self.color_pick_button.setObjectName("color_pick_button") self.horizontalLayout_2.addWidget(self.color_pick_button) self.verticalLayout.addLayout(self.horizontalLayout_2) self.groupBox = QtWidgets.QGroupBox(Dialog) self.groupBox.setObjectName("groupBox") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.groupBox) self.verticalLayout_3.setObjectName("verticalLayout_3") self.type_box = QtWidgets.QComboBox(self.groupBox) self.type_box.setObjectName("type_box") self.type_box.addItem("") self.type_box.addItem("") self.type_box.addItem("") self.verticalLayout_3.addWidget(self.type_box) self.formLayout_2 = QtWidgets.QFormLayout() self.formLayout_2.setObjectName("formLayout_2") self.angle_label = QtWidgets.QLabel(self.groupBox) self.angle_label.setObjectName("angle_label") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.angle_label) self.angle_box = QtWidgets.QDoubleSpinBox(self.groupBox) self.angle_box.setMaximum(180.0) self.angle_box.setObjectName("angle_box") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.angle_box) self.verticalLayout_3.addLayout(self.formLayout_2) self.verticalLayout.addWidget(self.groupBox) self.pos_group = QtWidgets.QGroupBox(Dialog) self.pos_group.setObjectName("pos_group") self.horizontalLayout_4 = QtWidgets.QHBoxLayout(self.pos_group) self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.x_label = QtWidgets.QLabel(self.pos_group) self.x_label.setObjectName("x_label") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.x_label) self.x_box = QtWidgets.QDoubleSpinBox(self.pos_group) self.x_box.setDecimals(4) self.x_box.setMinimum(-999999.0) self.x_box.setMaximum(999999.0) self.x_box.setObjectName("x_box") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.x_box) self.y_label = QtWidgets.QLabel(self.pos_group) self.y_label.setObjectName("y_label") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.y_label) self.y_box = QtWidgets.QDoubleSpinBox(self.pos_group) self.y_box.setDecimals(4) self.y_box.setMinimum(-999999.0) self.y_box.setMaximum(999999.0) self.y_box.setObjectName("y_box") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.y_box) self.horizontalLayout_4.addLayout(self.formLayout) self.relocate_option = QtWidgets.QPushButton(self.pos_group) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.relocate_option.sizePolicy().hasHeightForWidth()) self.relocate_option.setSizePolicy(sizePolicy) self.relocate_option.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/calculator.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.relocate_option.setIcon(icon1) self.relocate_option.setIconSize(QtCore.QSize(30, 30)) self.relocate_option.setObjectName("relocate_option") self.horizontalLayout_4.addWidget(self.relocate_option) self.verticalLayout.addWidget(self.pos_group) self.links_label = QtWidgets.QLabel(Dialog) self.links_label.setObjectName("links_label") self.verticalLayout.addWidget(self.links_label) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.no_selected = QtWidgets.QListWidget(Dialog) self.no_selected.setDragEnabled(True) self.no_selected.setDragDropMode(QtWidgets.QAbstractItemView.DragDrop) self.no_selected.setDefaultDropAction(QtCore.Qt.MoveAction) self.no_selected.setObjectName("no_selected") self.horizontalLayout.addWidget(self.no_selected) self.label_4 = QtWidgets.QLabel(Dialog) self.label_4.setObjectName("label_4") self.horizontalLayout.addWidget(self.label_4) self.selected = QtWidgets.QListWidget(Dialog) self.selected.setDragEnabled(True) self.selected.setDragDropMode(QtWidgets.QAbstractItemView.DragDrop) self.selected.setDefaultDropAction(QtCore.Qt.MoveAction) self.selected.setObjectName("selected") self.horizontalLayout.addWidget(self.selected) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_5.addLayout(self.verticalLayout) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.button_box = QtWidgets.QDialogButtonBox(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.button_box.sizePolicy().hasHeightForWidth()) self.button_box.setSizePolicy(sizePolicy) self.button_box.setOrientation(QtCore.Qt.Vertical) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel | QtWidgets.QDialogButtonBox.Ok) self.button_box.setObjectName("button_box") self.verticalLayout_2.addWidget(self.button_box) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem) self.horizontalLayout_5.addLayout(self.verticalLayout_2) self.retranslateUi(Dialog) self.button_box.accepted.connect(Dialog.accept) self.button_box.rejected.connect(Dialog.reject) QtCore.QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(587, 375) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/DimensionalSynthesis.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Dialog.setWindowIcon(icon) Dialog.setSizeGripEnabled(True) Dialog.setModal(True) self.verticalLayout = QtWidgets.QVBoxLayout(Dialog) self.verticalLayout.setObjectName("verticalLayout") self.tabWidget = QtWidgets.QTabWidget(Dialog) self.tabWidget.setObjectName("tabWidget") self.move_tab = QtWidgets.QWidget() self.move_tab.setObjectName("move_tab") self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.move_tab) self.verticalLayout_2.setContentsMargins(6, 6, 6, 6) self.verticalLayout_2.setObjectName("verticalLayout_2") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.move_x_label = QtWidgets.QLabel(self.move_tab) self.move_x_label.setObjectName("move_x_label") self.gridLayout.addWidget(self.move_x_label, 0, 0, 1, 1) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 0, 2, 1, 1) self.move_y_label = QtWidgets.QLabel(self.move_tab) self.move_y_label.setObjectName("move_y_label") self.gridLayout.addWidget(self.move_y_label, 1, 0, 1, 1) self.move_y = QtWidgets.QDoubleSpinBox(self.move_tab) self.move_y.setMinimum(-1000000.0) self.move_y.setMaximum(1000000.0) self.move_y.setObjectName("move_y") self.gridLayout.addWidget(self.move_y, 1, 1, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem1, 1, 2, 1, 1) self.move_x = QtWidgets.QDoubleSpinBox(self.move_tab) self.move_x.setMinimum(-1000000.0) self.move_x.setMaximum(1000000.0) self.move_x.setObjectName("move_x") self.gridLayout.addWidget(self.move_x, 0, 1, 1, 1) self.verticalLayout_2.addLayout(self.gridLayout) spacerItem2 = QtWidgets.QSpacerItem(20, 99, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem2) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem3) self.move_button = QtWidgets.QPushButton(self.move_tab) self.move_button.setDefault(True) self.move_button.setObjectName("move_button") self.horizontalLayout_3.addWidget(self.move_button) spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem4) self.verticalLayout_2.addLayout(self.horizontalLayout_3) self.tabWidget.addTab(self.move_tab, "") self.rotate_tab = QtWidgets.QWidget() self.rotate_tab.setObjectName("rotate_tab") self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.rotate_tab) self.verticalLayout_5.setObjectName("verticalLayout_5") self.gridLayout_5 = QtWidgets.QGridLayout() self.gridLayout_5.setObjectName("gridLayout_5") self.rotate_angle = QtWidgets.QDoubleSpinBox(self.rotate_tab) self.rotate_angle.setMaximum(360.0) self.rotate_angle.setObjectName("rotate_angle") self.gridLayout_5.addWidget(self.rotate_angle, 0, 1, 1, 1) self.rotate_angle_label = QtWidgets.QLabel(self.rotate_tab) self.rotate_angle_label.setObjectName("rotate_angle_label") self.gridLayout_5.addWidget(self.rotate_angle_label, 0, 0, 1, 1) spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_5.addItem(spacerItem5, 0, 2, 1, 1) self.verticalLayout_5.addLayout(self.gridLayout_5) spacerItem6 = QtWidgets.QSpacerItem(20, 158, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_5.addItem(spacerItem6) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem7) self.rotate_button = QtWidgets.QPushButton(self.rotate_tab) self.rotate_button.setObjectName("rotate_button") self.horizontalLayout_2.addWidget(self.rotate_button) spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem8) self.verticalLayout_5.addLayout(self.horizontalLayout_2) self.tabWidget.addTab(self.rotate_tab, "") self.scale_tab = QtWidgets.QWidget() self.scale_tab.setObjectName("scale_tab") self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.scale_tab) self.verticalLayout_3.setContentsMargins(6, 6, 6, 6) self.verticalLayout_3.setObjectName("verticalLayout_3") self.gridLayout_2 = QtWidgets.QGridLayout() self.gridLayout_2.setObjectName("gridLayout_2") self.scale_h_label = QtWidgets.QLabel(self.scale_tab) self.scale_h_label.setObjectName("scale_h_label") self.gridLayout_2.addWidget(self.scale_h_label, 0, 0, 1, 1) spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem9, 0, 3, 1, 1) self.scale_v_label = QtWidgets.QLabel(self.scale_tab) self.scale_v_label.setObjectName("scale_v_label") self.gridLayout_2.addWidget(self.scale_v_label, 1, 0, 1, 1) self.scale_h = QtWidgets.QDoubleSpinBox(self.scale_tab) self.scale_h.setMinimum(1.0) self.scale_h.setMaximum(10000.0) self.scale_h.setObjectName("scale_h") self.gridLayout_2.addWidget(self.scale_h, 0, 1, 1, 1) self.scale_v = QtWidgets.QDoubleSpinBox(self.scale_tab) self.scale_v.setMinimum(1.0) self.scale_v.setMaximum(10000.0) self.scale_v.setObjectName("scale_v") self.gridLayout_2.addWidget(self.scale_v, 1, 1, 1, 1) spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem10, 1, 3, 1, 1) self.scale_r_label = QtWidgets.QLabel(self.scale_tab) self.scale_r_label.setObjectName("scale_r_label") self.gridLayout_2.addWidget(self.scale_r_label, 2, 0, 1, 1) self.scale_rx = QtWidgets.QDoubleSpinBox(self.scale_tab) self.scale_rx.setMinimum(-1000000.0) self.scale_rx.setMaximum(1000000.0) self.scale_rx.setObjectName("scale_rx") self.gridLayout_2.addWidget(self.scale_rx, 2, 1, 1, 1) self.scale_ry = QtWidgets.QDoubleSpinBox(self.scale_tab) self.scale_ry.setMinimum(-1000000.0) self.scale_ry.setMaximum(1000000.0) self.scale_ry.setObjectName("scale_ry") self.gridLayout_2.addWidget(self.scale_ry, 2, 2, 1, 1) spacerItem11 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_2.addItem(spacerItem11, 2, 3, 1, 1) self.verticalLayout_3.addLayout(self.gridLayout_2) spacerItem12 = QtWidgets.QSpacerItem(20, 52, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_3.addItem(spacerItem12) self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") spacerItem13 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem13) self.scale_button = QtWidgets.QPushButton(self.scale_tab) self.scale_button.setDefault(True) self.scale_button.setObjectName("scale_button") self.horizontalLayout_4.addWidget(self.scale_button) spacerItem14 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_4.addItem(spacerItem14) self.verticalLayout_3.addLayout(self.horizontalLayout_4) self.tabWidget.addTab(self.scale_tab, "") self.reduce_tab = QtWidgets.QWidget() self.reduce_tab.setObjectName("reduce_tab") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.reduce_tab) self.verticalLayout_4.setObjectName("verticalLayout_4") self.gridLayout_3 = QtWidgets.QGridLayout() self.gridLayout_3.setObjectName("gridLayout_3") self.reduce_n = QtWidgets.QSpinBox(self.reduce_tab) self.reduce_n.setMinimum(1) self.reduce_n.setObjectName("reduce_n") self.gridLayout_3.addWidget(self.reduce_n, 0, 1, 1, 1) self.reduce_n_label = QtWidgets.QLabel(self.reduce_tab) self.reduce_n_label.setObjectName("reduce_n_label") self.gridLayout_3.addWidget(self.reduce_n_label, 0, 0, 1, 1) spacerItem15 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout_3.addItem(spacerItem15, 0, 2, 1, 1) self.verticalLayout_4.addLayout(self.gridLayout_3) spacerItem16 = QtWidgets.QSpacerItem(20, 193, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_4.addItem(spacerItem16) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") spacerItem17 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem17) self.reduce_button = QtWidgets.QPushButton(self.reduce_tab) self.reduce_button.setObjectName("reduce_button") self.horizontalLayout_5.addWidget(self.reduce_button) spacerItem18 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_5.addItem(spacerItem18) self.verticalLayout_4.addLayout(self.horizontalLayout_5) self.tabWidget.addTab(self.reduce_tab, "") self.verticalLayout.addWidget(self.tabWidget) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") spacerItem19 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem19) self.button_box = QtWidgets.QDialogButtonBox(Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.button_box.sizePolicy().hasHeightForWidth()) self.button_box.setSizePolicy(sizePolicy) self.button_box.setStandardButtons(QtWidgets.QDialogButtonBox.Close) self.button_box.setObjectName("button_box") self.horizontalLayout.addWidget(self.button_box) self.verticalLayout.addLayout(self.horizontalLayout) self.retranslateUi(Dialog) self.button_box.rejected.connect(Dialog.reject) QtCore.QMetaObject.connectSlotsByName(Dialog)
def setupUi(self, DockWidget): DockWidget.setObjectName("DockWidget") DockWidget.resize(703, 557) self.dockWidgetContents = QtWidgets.QWidget() self.dockWidgetContents.setObjectName("dockWidgetContents") self.gridLayout = QtWidgets.QGridLayout(self.dockWidgetContents) self.gridLayout.setObjectName("gridLayout") self.label = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setObjectName("label") self.gridLayout.addWidget(self.label, 0, 1, 1, 1) self.label_2 = QtWidgets.QLabel(self.dockWidgetContents) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setObjectName("label_2") self.gridLayout.addWidget(self.label_2, 0, 2, 1, 1) self.label_12 = QtWidgets.QLabel(self.dockWidgetContents) self.label_12.setMinimumSize(QtCore.QSize(0, 0)) self.label_12.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_12.setFont(font) self.label_12.setObjectName("label_12") self.gridLayout.addWidget(self.label_12, 1, 0, 1, 1) self.fontComboBox = QtWidgets.QFontComboBox(self.dockWidgetContents) self.fontComboBox.setMinimumSize(QtCore.QSize(0, 0)) self.fontComboBox.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.fontComboBox.setObjectName("fontComboBox") self.gridLayout.addWidget(self.fontComboBox, 1, 1, 1, 1) self.fontComboBoxDis = QtWidgets.QFontComboBox(self.dockWidgetContents) self.fontComboBoxDis.setEnabled(False) self.fontComboBoxDis.setMinimumSize(QtCore.QSize(0, 0)) self.fontComboBoxDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.fontComboBoxDis.setObjectName("fontComboBoxDis") self.gridLayout.addWidget(self.fontComboBoxDis, 1, 2, 1, 1) self.label_3 = QtWidgets.QLabel(self.dockWidgetContents) self.label_3.setObjectName("label_3") self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1) self.comboBoxEdit = QtWidgets.QComboBox(self.dockWidgetContents) self.comboBoxEdit.setEditable(True) self.comboBoxEdit.setObjectName("comboBoxEdit") self.comboBoxEdit.addItem("") self.comboBoxEdit.addItem("") self.comboBoxEdit.addItem("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/qss_icons/rc/window_undock.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.comboBoxEdit.addItem(icon, "") icon1 = QtGui.QIcon() icon1.addPixmap( QtGui.QPixmap(":/qss_icons/rc/[email protected]"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.comboBoxEdit.addItem(icon1, "") self.gridLayout.addWidget(self.comboBoxEdit, 2, 1, 1, 1) self.comboBoxEditDis = QtWidgets.QComboBox(self.dockWidgetContents) self.comboBoxEditDis.setEnabled(False) self.comboBoxEditDis.setEditable(True) self.comboBoxEditDis.setObjectName("comboBoxEditDis") self.comboBoxEditDis.addItem("") self.comboBoxEditDis.addItem("") self.comboBoxEditDis.addItem("") self.comboBoxEditDis.setItemText(2, "") self.gridLayout.addWidget(self.comboBoxEditDis, 2, 2, 1, 1) self.label_13 = QtWidgets.QLabel(self.dockWidgetContents) self.label_13.setMinimumSize(QtCore.QSize(0, 0)) self.label_13.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_13.setFont(font) self.label_13.setObjectName("label_13") self.gridLayout.addWidget(self.label_13, 3, 0, 1, 1) self.lineEdit = QtWidgets.QLineEdit(self.dockWidgetContents) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lineEdit.sizePolicy().hasHeightForWidth()) self.lineEdit.setSizePolicy(sizePolicy) self.lineEdit.setMinimumSize(QtCore.QSize(0, 0)) self.lineEdit.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.lineEdit.setObjectName("lineEdit") self.gridLayout.addWidget(self.lineEdit, 3, 1, 1, 1) self.lineEditDis = QtWidgets.QLineEdit(self.dockWidgetContents) self.lineEditDis.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.lineEditDis.sizePolicy().hasHeightForWidth()) self.lineEditDis.setSizePolicy(sizePolicy) self.lineEditDis.setMinimumSize(QtCore.QSize(0, 0)) self.lineEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.lineEditDis.setObjectName("lineEditDis") self.gridLayout.addWidget(self.lineEditDis, 3, 2, 1, 1) self.label_14 = QtWidgets.QLabel(self.dockWidgetContents) self.label_14.setMinimumSize(QtCore.QSize(0, 0)) self.label_14.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_14.setFont(font) self.label_14.setObjectName("label_14") self.gridLayout.addWidget(self.label_14, 4, 0, 1, 1) self.textEdit = QtWidgets.QTextEdit(self.dockWidgetContents) self.textEdit.setMinimumSize(QtCore.QSize(0, 0)) self.textEdit.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.textEdit.setObjectName("textEdit") self.gridLayout.addWidget(self.textEdit, 4, 1, 1, 1) self.textEditDis = QtWidgets.QTextEdit(self.dockWidgetContents) self.textEditDis.setEnabled(False) self.textEditDis.setMinimumSize(QtCore.QSize(0, 0)) self.textEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.textEditDis.setObjectName("textEditDis") self.gridLayout.addWidget(self.textEditDis, 4, 2, 1, 1) self.label_15 = QtWidgets.QLabel(self.dockWidgetContents) self.label_15.setMinimumSize(QtCore.QSize(0, 0)) self.label_15.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_15.setFont(font) self.label_15.setObjectName("label_15") self.gridLayout.addWidget(self.label_15, 5, 0, 1, 1) self.plainTextEdit = QtWidgets.QPlainTextEdit(self.dockWidgetContents) self.plainTextEdit.setMinimumSize(QtCore.QSize(0, 0)) self.plainTextEdit.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.plainTextEdit.setObjectName("plainTextEdit") self.gridLayout.addWidget(self.plainTextEdit, 5, 1, 1, 1) self.plainTextEditDis = QtWidgets.QPlainTextEdit( self.dockWidgetContents) self.plainTextEditDis.setEnabled(False) self.plainTextEditDis.setMinimumSize(QtCore.QSize(0, 0)) self.plainTextEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.plainTextEditDis.setObjectName("plainTextEditDis") self.gridLayout.addWidget(self.plainTextEditDis, 5, 2, 1, 1) self.label_16 = QtWidgets.QLabel(self.dockWidgetContents) self.label_16.setMinimumSize(QtCore.QSize(0, 0)) self.label_16.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_16.setFont(font) self.label_16.setObjectName("label_16") self.gridLayout.addWidget(self.label_16, 6, 0, 1, 1) self.spinBox = QtWidgets.QSpinBox(self.dockWidgetContents) self.spinBox.setMinimumSize(QtCore.QSize(0, 0)) self.spinBox.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.spinBox.setObjectName("spinBox") self.gridLayout.addWidget(self.spinBox, 6, 1, 1, 1) self.spinBoxDis = QtWidgets.QSpinBox(self.dockWidgetContents) self.spinBoxDis.setEnabled(False) self.spinBoxDis.setMinimumSize(QtCore.QSize(0, 0)) self.spinBoxDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.spinBoxDis.setObjectName("spinBoxDis") self.gridLayout.addWidget(self.spinBoxDis, 6, 2, 1, 1) self.label_17 = QtWidgets.QLabel(self.dockWidgetContents) self.label_17.setMinimumSize(QtCore.QSize(0, 0)) self.label_17.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_17.setFont(font) self.label_17.setObjectName("label_17") self.gridLayout.addWidget(self.label_17, 7, 0, 1, 1) self.doubleSpinBox = QtWidgets.QDoubleSpinBox(self.dockWidgetContents) self.doubleSpinBox.setMinimumSize(QtCore.QSize(0, 0)) self.doubleSpinBox.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.doubleSpinBox.setObjectName("doubleSpinBox") self.gridLayout.addWidget(self.doubleSpinBox, 7, 1, 1, 1) self.doubleSpinBoxDis = QtWidgets.QDoubleSpinBox( self.dockWidgetContents) self.doubleSpinBoxDis.setEnabled(False) self.doubleSpinBoxDis.setMinimumSize(QtCore.QSize(0, 0)) self.doubleSpinBoxDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.doubleSpinBoxDis.setObjectName("doubleSpinBoxDis") self.gridLayout.addWidget(self.doubleSpinBoxDis, 7, 2, 1, 1) self.label_18 = QtWidgets.QLabel(self.dockWidgetContents) self.label_18.setMinimumSize(QtCore.QSize(0, 0)) self.label_18.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_18.setFont(font) self.label_18.setObjectName("label_18") self.gridLayout.addWidget(self.label_18, 8, 0, 1, 1) self.timeEdit = QtWidgets.QTimeEdit(self.dockWidgetContents) self.timeEdit.setMinimumSize(QtCore.QSize(0, 0)) self.timeEdit.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.timeEdit.setObjectName("timeEdit") self.gridLayout.addWidget(self.timeEdit, 8, 1, 1, 1) self.timeEditDis = QtWidgets.QTimeEdit(self.dockWidgetContents) self.timeEditDis.setEnabled(False) self.timeEditDis.setMinimumSize(QtCore.QSize(0, 0)) self.timeEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.timeEditDis.setObjectName("timeEditDis") self.gridLayout.addWidget(self.timeEditDis, 8, 2, 1, 1) self.label_19 = QtWidgets.QLabel(self.dockWidgetContents) self.label_19.setMinimumSize(QtCore.QSize(0, 0)) self.label_19.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_19.setFont(font) self.label_19.setObjectName("label_19") self.gridLayout.addWidget(self.label_19, 9, 0, 1, 1) self.dateEdit = QtWidgets.QDateEdit(self.dockWidgetContents) self.dateEdit.setMinimumSize(QtCore.QSize(0, 0)) self.dateEdit.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.dateEdit.setObjectName("dateEdit") self.gridLayout.addWidget(self.dateEdit, 9, 1, 1, 1) self.dateEditDis = QtWidgets.QDateEdit(self.dockWidgetContents) self.dateEditDis.setEnabled(False) self.dateEditDis.setMinimumSize(QtCore.QSize(0, 0)) self.dateEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.dateEditDis.setObjectName("dateEditDis") self.gridLayout.addWidget(self.dateEditDis, 9, 2, 1, 1) self.label_20 = QtWidgets.QLabel(self.dockWidgetContents) self.label_20.setMinimumSize(QtCore.QSize(0, 0)) self.label_20.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setBold(True) font.setWeight(75) self.label_20.setFont(font) self.label_20.setObjectName("label_20") self.gridLayout.addWidget(self.label_20, 10, 0, 1, 1) self.dateTimeEdit = QtWidgets.QDateTimeEdit(self.dockWidgetContents) self.dateTimeEdit.setMinimumSize(QtCore.QSize(0, 0)) self.dateTimeEdit.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.dateTimeEdit.setObjectName("dateTimeEdit") self.gridLayout.addWidget(self.dateTimeEdit, 10, 1, 1, 1) self.dateTimeEditDis = QtWidgets.QDateTimeEdit(self.dockWidgetContents) self.dateTimeEditDis.setEnabled(False) self.dateTimeEditDis.setMinimumSize(QtCore.QSize(0, 0)) self.dateTimeEditDis.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.dateTimeEditDis.setObjectName("dateTimeEditDis") self.gridLayout.addWidget(self.dateTimeEditDis, 10, 2, 1, 1) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem, 11, 0, 1, 1) self.label_51 = QtWidgets.QLabel(self.dockWidgetContents) self.label_51.setAlignment(QtCore.Qt.AlignCenter) self.label_51.setObjectName("label_51") self.gridLayout.addWidget(self.label_51, 12, 0, 1, 3) DockWidget.setWidget(self.dockWidgetContents) self.retranslateUi(DockWidget) self.fontComboBox.editTextChanged['QString'].connect( self.fontComboBoxDis.setEditText) self.lineEdit.textEdited['QString'].connect(self.lineEditDis.setText) self.spinBox.valueChanged['int'].connect(self.spinBoxDis.setValue) self.doubleSpinBox.valueChanged['double'].connect( self.doubleSpinBoxDis.setValue) self.timeEdit.timeChanged['QTime'].connect(self.timeEditDis.setTime) self.dateEdit.dateTimeChanged['QDateTime'].connect( self.dateEditDis.setDateTime) self.dateTimeEdit.dateTimeChanged['QDateTime'].connect( self.dateTimeEditDis.setDateTime) QtCore.QMetaObject.connectSlotsByName(DockWidget)
def __init__(self, layout=None, name=None, value=0, min=None, max=None, use_slider=False, float=True, decimals=2, unit=None, step=None, **kwargs): # initialize the super widget QInput.__init__(self, layout, name, **kwargs) if self.settings is not None: value = cast_float(self.settings.value(self.settings_key, value)) if float is False: self.decimals = 0 else: if decimals is None: decimals = 2 self.decimals = decimals self.decimal_factor = 10**self.decimals if use_slider and min is not None and max is not None: # slider self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal) self.layout().addWidget(self.slider) self.slider.setRange(min * self.decimal_factor, max * self.decimal_factor) self.slider.valueChanged.connect( lambda x: self._valueChangedEvent(x / self.decimal_factor)) self.slider.sliderPressed.connect( lambda: self._setSliderDragged(True)) self.slider.sliderReleased.connect( lambda: self._setSliderDragged(False)) else: self.slider = None # add spin box if float: self.spin_box = QtWidgets.QDoubleSpinBox() self.spin_box.setDecimals(decimals) else: self.spin_box = QtWidgets.QSpinBox() if unit is not None: self.spin_box.setSuffix(" " + unit) self.layout().addWidget(self.spin_box) self.spin_box.valueChanged.connect(self._valueChangedEvent) if min is not None: self.spin_box.setMinimum(min) else: self.spin_box.setMinimum(-99999) if max is not None: self.spin_box.setMaximum(max) else: self.spin_box.setMaximum(+99999) if step is not None: self.spin_box.setSingleStep(step) self.setValue(value)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(446, 673) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/motor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout_7 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_7.setContentsMargins(0, 0, 0, 0) self.verticalLayout_7.setObjectName("verticalLayout_7") self.tab_widget = QtWidgets.QTabWidget(Form) self.tab_widget.setObjectName("tab_widget") self.inputs_tab = QtWidgets.QWidget() self.inputs_tab.setObjectName("inputs_tab") self.verticalLayout = QtWidgets.QVBoxLayout(self.inputs_tab) self.verticalLayout.setObjectName("verticalLayout") self.joint_groupbox = QtWidgets.QGroupBox(self.inputs_tab) self.joint_groupbox.setObjectName("joint_groupbox") self.horizontalLayout = QtWidgets.QHBoxLayout(self.joint_groupbox) self.horizontalLayout.setContentsMargins(6, 6, 6, 6) self.horizontalLayout.setObjectName("horizontalLayout") self.verticalLayout_13 = QtWidgets.QVBoxLayout() self.verticalLayout_13.setObjectName("verticalLayout_13") self.joint_list_lable = QtWidgets.QLabel(self.joint_groupbox) self.joint_list_lable.setObjectName("joint_list_lable") self.verticalLayout_13.addWidget(self.joint_list_lable) self.joint_list = QtWidgets.QListWidget(self.joint_groupbox) self.joint_list.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) self.joint_list.setObjectName("joint_list") self.verticalLayout_13.addWidget(self.joint_list) self.horizontalLayout.addLayout(self.verticalLayout_13) self.inputs_label_right2 = QtWidgets.QLabel(self.joint_groupbox) self.inputs_label_right2.setObjectName("inputs_label_right2") self.horizontalLayout.addWidget(self.inputs_label_right2) self.verticalLayout_16 = QtWidgets.QVBoxLayout() self.verticalLayout_16.setObjectName("verticalLayout_16") self.driver_list_lable = QtWidgets.QLabel(self.joint_groupbox) self.driver_list_lable.setObjectName("driver_list_lable") self.verticalLayout_16.addWidget(self.driver_list_lable) self.driver_list = QtWidgets.QListWidget(self.joint_groupbox) self.driver_list.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) self.driver_list.setObjectName("driver_list") self.verticalLayout_16.addWidget(self.driver_list) self.variable_add = QtWidgets.QPushButton(self.joint_groupbox) self.variable_add.setEnabled(False) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/arrow_down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_add.setIcon(icon1) self.variable_add.setObjectName("variable_add") self.verticalLayout_16.addWidget(self.variable_add) self.horizontalLayout.addLayout(self.verticalLayout_16) self.verticalLayout.addWidget(self.joint_groupbox) self.variable_groupbox = QtWidgets.QGroupBox(self.inputs_tab) self.variable_groupbox.setObjectName("variable_groupbox") self.horizontalLayout_7 = QtWidgets.QHBoxLayout(self.variable_groupbox) self.horizontalLayout_7.setObjectName("horizontalLayout_7") self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setObjectName("verticalLayout_5") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.variable_up = QtWidgets.QPushButton(self.variable_groupbox) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/arrow_up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_up.setIcon(icon2) self.variable_up.setObjectName("variable_up") self.horizontalLayout_2.addWidget(self.variable_up) self.variable_down = QtWidgets.QPushButton(self.variable_groupbox) self.variable_down.setIcon(icon1) self.variable_down.setObjectName("variable_down") self.horizontalLayout_2.addWidget(self.variable_down) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_2.addItem(spacerItem) self.variable_remove = QtWidgets.QPushButton(self.variable_groupbox) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/delete.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_remove.setIcon(icon3) self.variable_remove.setObjectName("variable_remove") self.horizontalLayout_2.addWidget(self.variable_remove) self.verticalLayout_5.addLayout(self.horizontalLayout_2) self.variable_list = QtWidgets.QListWidget(self.variable_groupbox) self.variable_list.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers) self.variable_list.setObjectName("variable_list") self.verticalLayout_5.addWidget(self.variable_list) self.horizontalLayout_7.addLayout(self.verticalLayout_5) self.line_5 = QtWidgets.QFrame(self.variable_groupbox) self.line_5.setFrameShape(QtWidgets.QFrame.VLine) self.line_5.setFrameShadow(QtWidgets.QFrame.Sunken) self.line_5.setObjectName("line_5") self.horizontalLayout_7.addWidget(self.line_5) self.inputs_dial_layout = QtWidgets.QVBoxLayout() self.inputs_dial_layout.setObjectName("inputs_dial_layout") self.dial_spinbox = QtWidgets.QDoubleSpinBox(self.variable_groupbox) self.dial_spinbox.setEnabled(False) self.dial_spinbox.setMaximum(360.0) self.dial_spinbox.setObjectName("dial_spinbox") self.inputs_dial_layout.addWidget(self.dial_spinbox) self.horizontalLayout_7.addLayout(self.inputs_dial_layout) self.verticalLayout.addWidget(self.variable_groupbox) self.groupBox = QtWidgets.QGroupBox(self.inputs_tab) self.groupBox.setObjectName("groupBox") self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.groupBox) self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.verticalLayout_18 = QtWidgets.QVBoxLayout() self.verticalLayout_18.setObjectName("verticalLayout_18") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.variable_speed_label = QtWidgets.QLabel(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.variable_speed_label.sizePolicy().hasHeightForWidth()) self.variable_speed_label.setSizePolicy(sizePolicy) self.variable_speed_label.setObjectName("variable_speed_label") self.horizontalLayout_4.addWidget(self.variable_speed_label) self.variable_speed = QtWidgets.QSpinBox(self.groupBox) self.variable_speed.setEnabled(False) self.variable_speed.setMinimum(-100) self.variable_speed.setMaximum(100) self.variable_speed.setSingleStep(5) self.variable_speed.setProperty("value", -10) self.variable_speed.setObjectName("variable_speed") self.horizontalLayout_4.addWidget(self.variable_speed) self.verticalLayout_18.addLayout(self.horizontalLayout_4) self.extremeRebound = QtWidgets.QCheckBox(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.extremeRebound.sizePolicy().hasHeightForWidth()) self.extremeRebound.setSizePolicy(sizePolicy) self.extremeRebound.setChecked(True) self.extremeRebound.setObjectName("extremeRebound") self.verticalLayout_18.addWidget(self.extremeRebound) self.horizontalLayout_3.addLayout(self.verticalLayout_18) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_3.addItem(spacerItem1) self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setObjectName("verticalLayout_3") self.variable_play = QtWidgets.QPushButton(self.groupBox) self.variable_play.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.variable_play.sizePolicy().hasHeightForWidth()) self.variable_play.setSizePolicy(sizePolicy) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/play.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon4.addPixmap(QtGui.QPixmap(":/icons/pause.png"), QtGui.QIcon.Active, QtGui.QIcon.On) self.variable_play.setIcon(icon4) self.variable_play.setCheckable(True) self.variable_play.setObjectName("variable_play") self.verticalLayout_3.addWidget(self.variable_play) self.variable_stop = QtWidgets.QPushButton(self.groupBox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.variable_stop.sizePolicy().hasHeightForWidth()) self.variable_stop.setSizePolicy(sizePolicy) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/interrupted.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.variable_stop.setIcon(icon5) self.variable_stop.setObjectName("variable_stop") self.verticalLayout_3.addWidget(self.variable_stop) self.record_start = QtWidgets.QPushButton(self.groupBox) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/record.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.record_start.setIcon(icon6) self.record_start.setCheckable(True) self.record_start.setObjectName("record_start") self.verticalLayout_3.addWidget(self.record_start) self.update_pos = QtWidgets.QPushButton(self.groupBox) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/merge.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.update_pos.setIcon(icon7) self.update_pos.setObjectName("update_pos") self.verticalLayout_3.addWidget(self.update_pos) self.horizontalLayout_3.addLayout(self.verticalLayout_3) self.verticalLayout.addWidget(self.groupBox) self.tab_widget.addTab(self.inputs_tab, icon, "") self.analysis_tab = QtWidgets.QWidget() self.analysis_tab.setObjectName("analysis_tab") self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.analysis_tab) self.verticalLayout_6.setObjectName("verticalLayout_6") self.horizontalLayout_6 = QtWidgets.QHBoxLayout() self.horizontalLayout_6.setObjectName("horizontalLayout_6") self.record_show = QtWidgets.QCheckBox(self.analysis_tab) self.record_show.setChecked(True) self.record_show.setObjectName("record_show") self.horizontalLayout_6.addWidget(self.record_show) spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem2) self.record_interval_label = QtWidgets.QLabel(self.analysis_tab) self.record_interval_label.setObjectName("record_interval_label") self.horizontalLayout_6.addWidget(self.record_interval_label) self.record_interval = QtWidgets.QDoubleSpinBox(self.analysis_tab) self.record_interval.setDecimals(2) self.record_interval.setMinimum(0.01) self.record_interval.setMaximum(20.0) self.record_interval.setProperty("value", 1.0) self.record_interval.setObjectName("record_interval") self.horizontalLayout_6.addWidget(self.record_interval) self.verticalLayout_6.addLayout(self.horizontalLayout_6) self.horizontalLayout_8 = QtWidgets.QHBoxLayout() self.horizontalLayout_8.setObjectName("horizontalLayout_8") self.record_list = QtWidgets.QListWidget(self.analysis_tab) self.record_list.setObjectName("record_list") self.horizontalLayout_8.addWidget(self.record_list) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setObjectName("verticalLayout_2") self.update_preview_button = QtWidgets.QPushButton(self.analysis_tab) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/data_update.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.update_preview_button.setIcon(icon8) self.update_preview_button.setObjectName("update_preview_button") self.verticalLayout_2.addWidget(self.update_preview_button) self.copy_path = QtWidgets.QPushButton(self.analysis_tab) icon9 = QtGui.QIcon() icon9.addPixmap(QtGui.QPixmap(":/icons/copy.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.copy_path.setIcon(icon9) self.copy_path.setObjectName("copy_path") self.verticalLayout_2.addWidget(self.copy_path) spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem3) self.record_remove = QtWidgets.QPushButton(self.analysis_tab) self.record_remove.setIcon(icon3) self.record_remove.setObjectName("record_remove") self.verticalLayout_2.addWidget(self.record_remove) self.horizontalLayout_8.addLayout(self.verticalLayout_2) self.verticalLayout_6.addLayout(self.horizontalLayout_8) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.plot_joint = QtWidgets.QComboBox(self.analysis_tab) self.plot_joint.setObjectName("plot_joint") self.horizontalLayout_5.addWidget(self.plot_joint) self.plot_joint_slot = QtWidgets.QCheckBox(self.analysis_tab) self.plot_joint_slot.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.plot_joint_slot.sizePolicy().hasHeightForWidth()) self.plot_joint_slot.setSizePolicy(sizePolicy) self.plot_joint_slot.setObjectName("plot_joint_slot") self.horizontalLayout_5.addWidget(self.plot_joint_slot) self.show_button = QtWidgets.QPushButton(self.analysis_tab) self.show_button.setIcon(icon7) self.show_button.setObjectName("show_button") self.horizontalLayout_5.addWidget(self.show_button) self.show_all_button = QtWidgets.QPushButton(self.analysis_tab) self.show_all_button.setIcon(icon7) self.show_all_button.setObjectName("show_all_button") self.horizontalLayout_5.addWidget(self.show_all_button) self.verticalLayout_6.addLayout(self.horizontalLayout_5) self.horizontalLayout_9 = QtWidgets.QHBoxLayout() self.horizontalLayout_9.setObjectName("horizontalLayout_9") self.cp_data_button = QtWidgets.QPushButton(self.analysis_tab) self.cp_data_button.setIcon(icon9) self.cp_data_button.setObjectName("cp_data_button") self.horizontalLayout_9.addWidget(self.cp_data_button) self.plot_button = QtWidgets.QPushButton(self.analysis_tab) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.plot_button.sizePolicy().hasHeightForWidth()) self.plot_button.setSizePolicy(sizePolicy) icon10 = QtGui.QIcon() icon10.addPixmap(QtGui.QPixmap(":/icons/formula.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.plot_button.setIcon(icon10) self.plot_button.setObjectName("plot_button") self.horizontalLayout_9.addWidget(self.plot_button) self.animate_button = QtWidgets.QPushButton(self.analysis_tab) self.animate_button.setIcon(icon) self.animate_button.setObjectName("animate_button") self.horizontalLayout_9.addWidget(self.animate_button) self.verticalLayout_6.addLayout(self.horizontalLayout_9) self.plot_groupbox = QtWidgets.QGroupBox(self.analysis_tab) self.plot_groupbox.setObjectName("plot_groupbox") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.plot_groupbox) self.verticalLayout_4.setObjectName("verticalLayout_4") self.horizontalLayout_11 = QtWidgets.QHBoxLayout() self.horizontalLayout_11.setObjectName("horizontalLayout_11") self.c_coord_sys = QtWidgets.QRadioButton(self.plot_groupbox) self.c_coord_sys.setChecked(True) self.c_coord_sys.setObjectName("c_coord_sys") self.horizontalLayout_11.addWidget(self.c_coord_sys) self.p_coord_sys = QtWidgets.QRadioButton(self.plot_groupbox) self.p_coord_sys.setObjectName("p_coord_sys") self.horizontalLayout_11.addWidget(self.p_coord_sys) self.verticalLayout_4.addLayout(self.horizontalLayout_11) self.horizontalLayout_10 = QtWidgets.QHBoxLayout() self.horizontalLayout_10.setObjectName("horizontalLayout_10") self.wrt_label = QtWidgets.QCheckBox(self.plot_groupbox) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.wrt_label.sizePolicy().hasHeightForWidth()) self.wrt_label.setSizePolicy(sizePolicy) self.wrt_label.setObjectName("wrt_label") self.horizontalLayout_10.addWidget(self.wrt_label) self.wrt_joint = QtWidgets.QComboBox(self.plot_groupbox) self.wrt_joint.setEnabled(False) self.wrt_joint.setObjectName("wrt_joint") self.horizontalLayout_10.addWidget(self.wrt_joint) self.wrt_joint_slot = QtWidgets.QCheckBox(self.plot_groupbox) self.wrt_joint_slot.setEnabled(False) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.wrt_joint_slot.sizePolicy().hasHeightForWidth()) self.wrt_joint_slot.setSizePolicy(sizePolicy) self.wrt_joint_slot.setObjectName("wrt_joint_slot") self.horizontalLayout_10.addWidget(self.wrt_joint_slot) self.verticalLayout_4.addLayout(self.horizontalLayout_10) self.line = QtWidgets.QFrame(self.plot_groupbox) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_4.addWidget(self.line) self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.plot_jerk = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_jerk.setObjectName("plot_jerk") self.gridLayout.addWidget(self.plot_jerk, 3, 0, 1, 1) self.plot_vel = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_vel.setObjectName("plot_vel") self.gridLayout.addWidget(self.plot_vel, 1, 0, 1, 1) self.plot_acc = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_acc.setObjectName("plot_acc") self.gridLayout.addWidget(self.plot_acc, 2, 0, 1, 1) self.plot_pos = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_pos.setChecked(True) self.plot_pos.setObjectName("plot_pos") self.gridLayout.addWidget(self.plot_pos, 0, 0, 1, 1) self.plot_curvature = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_curvature.setObjectName("plot_curvature") self.gridLayout.addWidget(self.plot_curvature, 0, 1, 1, 1) self.plot_signature = QtWidgets.QCheckBox(self.plot_groupbox) self.plot_signature.setObjectName("plot_signature") self.gridLayout.addWidget(self.plot_signature, 1, 1, 1, 1) self.verticalLayout_4.addLayout(self.gridLayout) self.verticalLayout_6.addWidget(self.plot_groupbox) self.tab_widget.addTab(self.analysis_tab, icon10, "") self.verticalLayout_7.addWidget(self.tab_widget) self.retranslateUi(Form) self.record_list.setCurrentRow(-1) self.wrt_label.toggled['bool'].connect(self.wrt_joint.setEnabled) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self, parameter, layout, type_int): # call the super method's initializer super().__init__(parameter, layout) if type_int: self.decimals = 0 elif self.parameter.decimals is None: self.decimals = 2 else: self.decimals = self.parameter.decimals self.decimal_factor = 10**self.decimals # if the parameter has a minimum and maximum, we can add a slider to display it if self.parameter.min is not None and self.parameter.max is not None: # create a slider object self.slider = QtWidgets.QSlider() # add it to the widget self.layout.addWidget(self.slider) # set the orientation of the slider to horizontal self.slider.setOrientation(QtCore.Qt.Horizontal) # set the range self.slider.setRange(parameter.min * self.decimal_factor, parameter.max * self.decimal_factor) # and connect the valueChanged signal self.slider.valueChanged.connect( lambda x: self.setValue(x / self.decimal_factor)) # if it is an integer, use a QSpinBox if type_int: self.spinBox = QtWidgets.QSpinBox() # if it is a float, use a QDoubleSpinBox else: self.spinBox = QtWidgets.QDoubleSpinBox() self.spinBox.setDecimals(self.decimals) # add the spinbox to the layout self.layout.addWidget(self.spinBox) # set the minimum of the spinbox if parameter.min is not None: self.spinBox.setMinimum(parameter.min) else: self.spinBox.setMinimum(-2**16) # set the maximum of the spinbox if parameter.max is not None: self.spinBox.setMaximum(parameter.max) else: self.spinBox.setMaximum(2**16) # connect the valueChanged signal of the spinbox self.spinBox.valueChanged.connect(self.setValue) # set the value of the parameter self.setValue(parameter.value) """ range selection """ self.range_edits = [] for name in ["min", "max"]: # the name of the range end, e.g. min or max self.layoutRange.addWidget(QtWidgets.QLabel(name)) # the selector edit = QtWidgets.QLineEdit() # a validator for the input if type_int: edit.setValidator(QtGui.QIntValidator()) else: edit.setValidator(QtGui.QDoubleValidator()) # connect the signal edit.textEdited.connect(self.rangeChanged) # style edit.setMaximumWidth(50) edit.setPlaceholderText(name + "imum") # set the value if already a value is given if self.parameter.min is not None: edit.setText(str(self.parameter.min)) # add it to the layout and the list self.layoutRange.addWidget(edit) self.range_edits.append(edit) # if the type is a float add a checkbox to sample from a log normal distribution for optimisation if not type_int: self.check_log = QtWidgets.QCheckBox("log-uniform") self.layoutRange.addWidget(self.check_log)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(326, 588) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("icons:id.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) Form.setWindowIcon(icon) self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form) self.verticalLayout_2.setObjectName("verticalLayout_2") self.formLayout = QtWidgets.QFormLayout() self.formLayout.setObjectName("formLayout") self.file_name_title = QtWidgets.QLabel(Form) self.file_name_title.setObjectName("file_name_title") self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.file_name_title) self.file_name_label = QtWidgets.QLineEdit(Form) self.file_name_label.setReadOnly(True) self.file_name_label.setObjectName("file_name_label") self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.file_name_label) self.path_title = QtWidgets.QLabel(Form) self.path_title.setObjectName("path_title") self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.path_title) self.path_label = QtWidgets.QLineEdit(Form) self.path_label.setReadOnly(True) self.path_label.setObjectName("path_label") self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.path_label) self.owner_title = QtWidgets.QLabel(Form) self.owner_title.setObjectName("owner_title") self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.owner_title) self.owner_label = QtWidgets.QLabel(Form) self.owner_label.setObjectName("owner_label") self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.owner_label) self.last_modified_title = QtWidgets.QLabel(Form) self.last_modified_title.setObjectName("last_modified_title") self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.last_modified_title) self.last_modified_label = QtWidgets.QLabel(Form) self.last_modified_label.setObjectName("last_modified_label") self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.last_modified_label) self.file_size_title = QtWidgets.QLabel(Form) self.file_size_title.setObjectName("file_size_title") self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.file_size_title) self.file_size_label = QtWidgets.QLabel(Form) self.file_size_label.setObjectName("file_size_label") self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.file_size_label) self.type_title = QtWidgets.QLabel(Form) self.type_title.setObjectName("type_title") self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.type_title) self.type_label = QtWidgets.QLabel(Form) self.type_label.setObjectName("type_label") self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.type_label) self.background_label = QtWidgets.QLabel(Form) self.background_label.setObjectName("background_label") self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.background_label) self.background_layout = QtWidgets.QHBoxLayout() self.background_layout.setObjectName("background_layout") self.background_option = QtWidgets.QLineEdit(Form) self.background_option.setClearButtonEnabled(True) self.background_option.setObjectName("background_option") self.background_layout.addWidget(self.background_option) self.background_choose_dir = QtWidgets.QToolButton(Form) icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap("icons:loadfile.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.background_choose_dir.setIcon(icon1) self.background_choose_dir.setObjectName("background_choose_dir") self.background_layout.addWidget(self.background_choose_dir) self.formLayout.setLayout(6, QtWidgets.QFormLayout.FieldRole, self.background_layout) self.background_scale_label = QtWidgets.QLabel(Form) self.background_scale_label.setObjectName("background_scale_label") self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.background_scale_label) self.background_scale_option = QtWidgets.QDoubleSpinBox(Form) self.background_scale_option.setMinimum(0.01) self.background_scale_option.setMaximum(10.0) self.background_scale_option.setSingleStep(0.02) self.background_scale_option.setObjectName("background_scale_option") self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.background_scale_option) self.background_offset_label = QtWidgets.QLabel(Form) self.background_offset_label.setObjectName("background_offset_label") self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.background_offset_label) self.background_offset_layout = QtWidgets.QHBoxLayout() self.background_offset_layout.setObjectName("background_offset_layout") self.background_x_option = QtWidgets.QDoubleSpinBox(Form) self.background_x_option.setMinimum(-999999.0) self.background_x_option.setMaximum(999999.0) self.background_x_option.setObjectName("background_x_option") self.background_offset_layout.addWidget(self.background_x_option) self.background_y_option = QtWidgets.QDoubleSpinBox(Form) self.background_y_option.setMinimum(-999999.0) self.background_y_option.setMaximum(999999.0) self.background_y_option.setObjectName("background_y_option") self.background_offset_layout.addWidget(self.background_y_option) self.formLayout.setLayout(8, QtWidgets.QFormLayout.FieldRole, self.background_offset_layout) self.background_opacity_label = QtWidgets.QLabel(Form) self.background_opacity_label.setObjectName("background_opacity_label") self.formLayout.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.background_opacity_label) self.background_opacity_option = QtWidgets.QDoubleSpinBox(Form) self.background_opacity_option.setMaximum(1.0) self.background_opacity_option.setSingleStep(0.1) self.background_opacity_option.setProperty("value", 1.0) self.background_opacity_option.setObjectName( "background_opacity_option") self.formLayout.setWidget(9, QtWidgets.QFormLayout.FieldRole, self.background_opacity_option) self.verticalLayout_2.addLayout(self.formLayout) self.line = QtWidgets.QFrame(Form) self.line.setFrameShape(QtWidgets.QFrame.HLine) self.line.setFrameShadow(QtWidgets.QFrame.Sunken) self.line.setObjectName("line") self.verticalLayout_2.addWidget(self.line) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.overview_button = QtWidgets.QPushButton(Form) self.overview_button.setIcon(icon) self.overview_button.setObjectName("overview_button") self.horizontalLayout_2.addWidget(self.overview_button) self.ex_expression_button = QtWidgets.QPushButton(Form) self.ex_expression_button.setIcon(icon) self.ex_expression_button.setObjectName("ex_expression_button") self.horizontalLayout_2.addWidget(self.ex_expression_button) self.verticalLayout_2.addLayout(self.horizontalLayout_2) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.export_group = QtWidgets.QGroupBox(Form) self.export_group.setObjectName("export_group") self.gridLayout = QtWidgets.QGridLayout(self.export_group) self.gridLayout.setObjectName("gridLayout") self.ex_dxf_button = QtWidgets.QPushButton(self.export_group) icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap("icons:dxf.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_dxf_button.setIcon(icon2) self.ex_dxf_button.setIconSize(QtCore.QSize(50, 50)) self.ex_dxf_button.setObjectName("ex_dxf_button") self.gridLayout.addWidget(self.ex_dxf_button, 0, 0, 1, 1) self.ex_slvs_button = QtWidgets.QPushButton(self.export_group) icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap("icons:solvespace.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_slvs_button.setIcon(icon3) self.ex_slvs_button.setIconSize(QtCore.QSize(50, 50)) self.ex_slvs_button.setObjectName("ex_slvs_button") self.gridLayout.addWidget(self.ex_slvs_button, 0, 1, 1, 1) self.ex_py_button = QtWidgets.QPushButton(self.export_group) icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap("icons:script.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_py_button.setIcon(icon4) self.ex_py_button.setIconSize(QtCore.QSize(50, 50)) self.ex_py_button.setObjectName("ex_py_button") self.gridLayout.addWidget(self.ex_py_button, 1, 0, 1, 1) self.ex_image_button = QtWidgets.QPushButton(self.export_group) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap("icons:picture.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_image_button.setIcon(icon5) self.ex_image_button.setIconSize(QtCore.QSize(50, 50)) self.ex_image_button.setObjectName("ex_image_button") self.gridLayout.addWidget(self.ex_image_button, 1, 1, 1, 1) self.ex_pmks_button = QtWidgets.QPushButton(self.export_group) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap("icons:pmks.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_pmks_button.setIcon(icon6) self.ex_pmks_button.setIconSize(QtCore.QSize(50, 50)) self.ex_pmks_button.setObjectName("ex_pmks_button") self.gridLayout.addWidget(self.ex_pmks_button, 0, 2, 1, 1) self.ex_capture_button = QtWidgets.QPushButton(self.export_group) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap("icons:capture.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.ex_capture_button.setIcon(icon7) self.ex_capture_button.setIconSize(QtCore.QSize(50, 50)) self.ex_capture_button.setObjectName("ex_capture_button") self.gridLayout.addWidget(self.ex_capture_button, 1, 2, 1, 1) self.horizontalLayout.addWidget(self.export_group) self.import_group = QtWidgets.QGroupBox(Form) self.import_group.setObjectName("import_group") self.verticalLayout = QtWidgets.QVBoxLayout(self.import_group) self.verticalLayout.setObjectName("verticalLayout") self.im_example_button = QtWidgets.QPushButton(self.import_group) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap("icons:example.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.im_example_button.setIcon(icon8) self.im_example_button.setIconSize(QtCore.QSize(50, 50)) self.im_example_button.setObjectName("im_example_button") self.verticalLayout.addWidget(self.im_example_button) self.im_pmks_button = QtWidgets.QPushButton(self.import_group) self.im_pmks_button.setIcon(icon6) self.im_pmks_button.setIconSize(QtCore.QSize(50, 50)) self.im_pmks_button.setObjectName("im_pmks_button") self.verticalLayout.addWidget(self.im_pmks_button) self.horizontalLayout.addWidget(self.import_group) self.verticalLayout_2.addLayout(self.horizontalLayout) self.history_tabs = QtWidgets.QTabWidget(Form) self.history_tabs.setObjectName("history_tabs") self.verticalLayout_2.addWidget(self.history_tabs) self.retranslateUi(Form) self.history_tabs.setCurrentIndex(-1) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(298, 702) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth()) Form.setSizePolicy(sizePolicy) Form.setMinimumSize(QtCore.QSize(0, 0)) Form.setBaseSize(QtCore.QSize(200, 300)) self.gridLayout_3 = QtWidgets.QGridLayout(Form) self.gridLayout_3.setContentsMargins(0, 0, 0, 0) self.gridLayout_3.setSpacing(6) self.gridLayout_3.setObjectName("gridLayout_3") self.splitter = QtWidgets.QSplitter(Form) self.splitter.setOrientation(QtCore.Qt.Horizontal) self.splitter.setObjectName("splitter") self.verticalLayoutWidget = QtWidgets.QWidget(self.splitter) self.verticalLayoutWidget.setObjectName("verticalLayoutWidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget) self.verticalLayout.setContentsMargins(0, 0, 0, 0) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setSizeConstraint( QtWidgets.QLayout.SetDefaultConstraint) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setObjectName("horizontalLayout") self.groupBox_main = QtWidgets.QGroupBox(self.verticalLayoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.groupBox_main.sizePolicy().hasHeightForWidth()) self.groupBox_main.setSizePolicy(sizePolicy) self.groupBox_main.setMinimumSize(QtCore.QSize(0, 0)) self.groupBox_main.setMaximumSize(QtCore.QSize(16777215, 16777215)) self.groupBox_main.setBaseSize(QtCore.QSize(0, 0)) self.groupBox_main.setTitle("") self.groupBox_main.setFlat(False) self.groupBox_main.setObjectName("groupBox_main") self.gridLayout_9 = QtWidgets.QGridLayout(self.groupBox_main) self.gridLayout_9.setContentsMargins(0, 0, 0, 0) self.gridLayout_9.setObjectName("gridLayout_9") self.gridLayout_2 = QtWidgets.QGridLayout() self.gridLayout_2.setSizeConstraint( QtWidgets.QLayout.SetDefaultConstraint) self.gridLayout_2.setObjectName("gridLayout_2") self.label_2 = QtWidgets.QLabel(self.groupBox_main) self.label_2.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_2.setObjectName("label_2") self.gridLayout_2.addWidget(self.label_2, 2, 0, 1, 1) self.Move_Done_LED = QLED(self.groupBox_main) self.Move_Done_LED.setObjectName("Move_Done_LED") self.gridLayout_2.addWidget(self.Move_Done_LED, 6, 1, 1, 1) self.IniStage_pb = QtWidgets.QPushButton(self.groupBox_main) self.IniStage_pb.setCheckable(True) self.IniStage_pb.setChecked(False) self.IniStage_pb.setObjectName("IniStage_pb") self.gridLayout_2.addWidget(self.IniStage_pb, 4, 0, 1, 1) self.Ini_state_LED = QLED(self.groupBox_main) self.Ini_state_LED.setObjectName("Ini_state_LED") self.gridLayout_2.addWidget(self.Ini_state_LED, 4, 1, 1, 1) self.Current_position_sb = QtWidgets.QDoubleSpinBox(self.groupBox_main) font = QtGui.QFont() font.setPointSize(20) self.Current_position_sb.setFont(font) self.Current_position_sb.setLocale( QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.Current_position_sb.setReadOnly(True) self.Current_position_sb.setButtonSymbols( QtWidgets.QAbstractSpinBox.NoButtons) self.Current_position_sb.setDecimals(6) self.Current_position_sb.setMinimum(-10000000.0) self.Current_position_sb.setMaximum(10000000.0) self.Current_position_sb.setObjectName("Current_position_sb") self.gridLayout_2.addWidget(self.Current_position_sb, 7, 0, 1, 2) self.Stage_type_combo = QtWidgets.QComboBox(self.groupBox_main) self.Stage_type_combo.setObjectName("Stage_type_combo") self.gridLayout_2.addWidget(self.Stage_type_combo, 2, 1, 1, 1) self.title_label = QtWidgets.QLabel(self.groupBox_main) font = QtGui.QFont() font.setFamily("Tahoma") font.setPointSize(14) font.setBold(True) font.setItalic(True) font.setWeight(75) self.title_label.setFont(font) self.title_label.setAlignment(QtCore.Qt.AlignCenter) self.title_label.setObjectName("title_label") self.gridLayout_2.addWidget(self.title_label, 0, 0, 1, 2) self.Quit_pb = QtWidgets.QPushButton(self.groupBox_main) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/close2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Quit_pb.setIcon(icon) self.Quit_pb.setObjectName("Quit_pb") self.gridLayout_2.addWidget(self.Quit_pb, 5, 0, 1, 2) self.label_4 = QtWidgets.QLabel(self.groupBox_main) self.label_4.setObjectName("label_4") self.gridLayout_2.addWidget(self.label_4, 6, 0, 1, 1) self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setSpacing(0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") self.Abs_position_sb_bis = SpinBox(self.groupBox_main) self.Abs_position_sb_bis.setLocale( QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.Abs_position_sb_bis.setDecimals(6) self.Abs_position_sb_bis.setMinimum(-100000000.0) self.Abs_position_sb_bis.setMaximum(100000000.0) self.Abs_position_sb_bis.setObjectName("Abs_position_sb_bis") self.horizontalLayout_2.addWidget(self.Abs_position_sb_bis) self.Moveto_pb_bis = QtWidgets.QPushButton(self.groupBox_main) self.Moveto_pb_bis.setText("") icon1 = QtGui.QIcon() icon1.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/go_to_1.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Moveto_pb_bis.setIcon(icon1) self.Moveto_pb_bis.setObjectName("Moveto_pb_bis") self.horizontalLayout_2.addWidget(self.Moveto_pb_bis) self.Moveto_pb_bis_2 = QtWidgets.QPushButton(self.groupBox_main) self.Moveto_pb_bis_2.setText("") icon2 = QtGui.QIcon() icon2.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/go_to_2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Moveto_pb_bis_2.setIcon(icon2) self.Moveto_pb_bis_2.setObjectName("Moveto_pb_bis_2") self.horizontalLayout_2.addWidget(self.Moveto_pb_bis_2) self.fine_tuning_pb = QtWidgets.QPushButton(self.groupBox_main) self.fine_tuning_pb.setText("") icon3 = QtGui.QIcon() icon3.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/Add_Step.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.fine_tuning_pb.setIcon(icon3) self.fine_tuning_pb.setCheckable(True) self.fine_tuning_pb.setObjectName("fine_tuning_pb") self.horizontalLayout_2.addWidget(self.fine_tuning_pb) self.parameters_pb = QtWidgets.QPushButton(self.groupBox_main) self.parameters_pb.setText("") icon4 = QtGui.QIcon() icon4.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/Settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.parameters_pb.setIcon(icon4) self.parameters_pb.setCheckable(True) self.parameters_pb.setObjectName("parameters_pb") self.horizontalLayout_2.addWidget(self.parameters_pb) self.gridLayout_2.addLayout(self.horizontalLayout_2, 1, 0, 1, 2) self.gridLayout_9.addLayout(self.gridLayout_2, 0, 0, 1, 1) self.horizontalLayout.addWidget(self.groupBox_main) spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.verticalLayout.addLayout(self.horizontalLayout) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.groupBox = QtWidgets.QGroupBox(self.verticalLayoutWidget) self.groupBox.setTitle("") self.groupBox.setFlat(False) self.groupBox.setObjectName("groupBox") self.gridLayout = QtWidgets.QGridLayout(self.groupBox) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") self.gridLayout_buttons = QtWidgets.QGridLayout() self.gridLayout_buttons.setContentsMargins(-1, 0, -1, -1) self.gridLayout_buttons.setObjectName("gridLayout_buttons") self.Move_Abs_pb = QtWidgets.QPushButton(self.groupBox) icon5 = QtGui.QIcon() icon5.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/Move.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Move_Abs_pb.setIcon(icon5) self.Move_Abs_pb.setObjectName("Move_Abs_pb") self.gridLayout_buttons.addWidget(self.Move_Abs_pb, 4, 1, 2, 1) self.label_3 = QtWidgets.QLabel(self.groupBox) self.label_3.setObjectName("label_3") self.gridLayout_buttons.addWidget(self.label_3, 7, 0, 1, 1) self.Move_Rel_minus_pb = QtWidgets.QPushButton(self.groupBox) icon6 = QtGui.QIcon() icon6.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/MoveDown.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Move_Rel_minus_pb.setIcon(icon6) self.Move_Rel_minus_pb.setObjectName("Move_Rel_minus_pb") self.gridLayout_buttons.addWidget(self.Move_Rel_minus_pb, 8, 1, 1, 1) self.Move_Rel_plus_pb = QtWidgets.QPushButton(self.groupBox) icon7 = QtGui.QIcon() icon7.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/MoveUp.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Move_Rel_plus_pb.setIcon(icon7) self.Move_Rel_plus_pb.setObjectName("Move_Rel_plus_pb") self.gridLayout_buttons.addWidget(self.Move_Rel_plus_pb, 7, 1, 1, 1) self.Stop_pb = QtWidgets.QPushButton(self.groupBox) icon8 = QtGui.QIcon() icon8.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/stop.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Stop_pb.setIcon(icon8) self.Stop_pb.setObjectName("Stop_pb") self.gridLayout_buttons.addWidget(self.Stop_pb, 11, 0, 1, 1) self.Abs_position_sb = SpinBox(self.groupBox) self.Abs_position_sb.setLocale( QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.Abs_position_sb.setDecimals(6) self.Abs_position_sb.setMinimum(-100000000.0) self.Abs_position_sb.setMaximum(100000000.0) self.Abs_position_sb.setObjectName("Abs_position_sb") self.gridLayout_buttons.addWidget(self.Abs_position_sb, 5, 0, 1, 1) self.Rel_position_sb = SpinBox(self.groupBox) self.Rel_position_sb.setLocale( QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates)) self.Rel_position_sb.setDecimals(6) self.Rel_position_sb.setMinimum(-10000000.0) self.Rel_position_sb.setMaximum(1000000.0) self.Rel_position_sb.setObjectName("Rel_position_sb") self.gridLayout_buttons.addWidget(self.Rel_position_sb, 8, 0, 1, 1) self.Get_position_pb = QtWidgets.QPushButton(self.groupBox) icon9 = QtGui.QIcon() icon9.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/Help_32.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Get_position_pb.setIcon(icon9) self.Get_position_pb.setObjectName("Get_position_pb") self.gridLayout_buttons.addWidget(self.Get_position_pb, 11, 1, 1, 1) self.Find_Home_pb = QtWidgets.QPushButton(self.groupBox) icon10 = QtGui.QIcon() icon10.addPixmap(QtGui.QPixmap(":/icons/Icon_Library/home2.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.Find_Home_pb.setIcon(icon10) self.Find_Home_pb.setObjectName("Find_Home_pb") self.gridLayout_buttons.addWidget(self.Find_Home_pb, 3, 1, 1, 1) self.label_5 = QtWidgets.QLabel(self.groupBox) self.label_5.setObjectName("label_5") self.gridLayout_buttons.addWidget(self.label_5, 3, 0, 1, 1) self.gridLayout.addLayout(self.gridLayout_buttons, 0, 0, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem1, 0, 1, 1, 1) self.horizontalLayout_3.addWidget(self.groupBox) self.verticalLayout.addLayout(self.horizontalLayout_3) spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem2) self.StatusBarLayout = QtWidgets.QHBoxLayout() self.StatusBarLayout.setSizeConstraint( QtWidgets.QLayout.SetMinimumSize) self.StatusBarLayout.setObjectName("StatusBarLayout") self.verticalLayout.addLayout(self.StatusBarLayout) self.verticalLayoutWidget_2 = QtWidgets.QWidget(self.splitter) self.verticalLayoutWidget_2.setObjectName("verticalLayoutWidget_2") self.verticalLayout_2 = QtWidgets.QVBoxLayout( self.verticalLayoutWidget_2) self.verticalLayout_2.setContentsMargins(0, 0, 0, 0) self.verticalLayout_2.setObjectName("verticalLayout_2") self.gridLayout_3.addWidget(self.splitter, 0, 0, 1, 1) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)