def __init__(self, parent=None): super(ImportPage, self).__init__(parent=None) main_v_box = QVBoxLayout() label_font = QFont() sys_font_point_size = label_font.pointSize() label_font.setPointSize(sys_font_point_size + 2) step_label = QLabel(str("Import")) step_label.setFont(label_font) self.simple_lin = QLineEdit(self) self.simple_lin.textChanged.connect(self.update_command) self.x_spn_bx = QSpinBox() self.x_spn_bx.setMaximum(99999) self.x_spn_bx.setSpecialValueText(" ") self.y_spn_bx = QSpinBox() self.y_spn_bx.setMaximum(99999) self.y_spn_bx.setSpecialValueText(" ") self.x_spn_bx.valueChanged.connect(self.x_beam_changed) self.y_spn_bx.valueChanged.connect(self.y_beam_changed) self.chk_invert = QCheckBox("Invert rotation axis") self.chk_invert.stateChanged.connect(self.inv_rota_changed) self.opn_fil_btn = QPushButton(" \n Select file(s) \n ") main_path = get_main_path() self.opn_fil_btn.setIcon(QIcon(main_path + "/resources/import.png")) self.opn_fil_btn.setIconSize(QSize(80, 48)) main_v_box.addWidget(step_label) main_v_box.addWidget(self.opn_fil_btn) main_v_box.addWidget(self.simple_lin) self.b_cetre_label = QLabel("\n\n Beam centre") main_v_box.addWidget(self.b_cetre_label) cent_hbox = QHBoxLayout() self.x_label = QLabel(" X: ") cent_hbox.addWidget(self.x_label) cent_hbox.addWidget(self.x_spn_bx) self.y_label = QLabel(" Y: ") cent_hbox.addWidget(self.y_label) cent_hbox.addWidget(self.y_spn_bx) # cent_hbox.addWidget(QLabel(" \n ")) cent_hbox.addStretch() main_v_box.addLayout(cent_hbox) main_v_box.addWidget(self.chk_invert) main_v_box.addStretch() self.opn_fil_btn.clicked.connect(self.open_files) self.defa_dir = str(os.getcwd()) self.setLayout(main_v_box) # self.show() self.reset_par()
def __init__(self, parent=None): super(IntegrateSimplerParamTab, self).__init__() # self.param_widget_parent = parent.param_widget_parent localLayout = QVBoxLayout() PrFit_lay_out = QHBoxLayout() label_PrFit = QLabel("Use profile fitting") PrFit_lay_out.addWidget(label_PrFit) PrFit_comb_bx = DefaultComboBox("integration.profile.fitting", ["True", "False", "Auto"]) PrFit_comb_bx.currentIndexChanged.connect(self.combobox_changed) PrFit_lay_out.addWidget(PrFit_comb_bx) localLayout.addLayout(PrFit_lay_out) hbox_lay_algorithm_53 = QHBoxLayout() label_algorithm_53 = QLabel("Background algorithm") hbox_lay_algorithm_53.addWidget(label_algorithm_53) box_algorithm_53 = DefaultComboBox( "integration.background.algorithm", ["simple", "null", "median", "gmodel", "glm"], default_index=4) box_algorithm_53.currentIndexChanged.connect(self.combobox_changed) hbox_lay_algorithm_53.addWidget(box_algorithm_53) localLayout.addLayout(hbox_lay_algorithm_53) hbox_d_min = QHBoxLayout() label_d_min = QLabel("High resolution limit") hbox_d_min.addWidget(label_d_min) d_min_spn_bx = QDoubleSpinBox() d_min_spn_bx.local_path = "prediction.d_min" d_min_spn_bx.setSpecialValueText("None") d_min_spn_bx.setValue(0.0) hbox_d_min.addWidget(d_min_spn_bx) d_min_spn_bx.editingFinished.connect(self.spnbox_finished) localLayout.addLayout(hbox_d_min) hbox_lay_nproc = QHBoxLayout() label_nproc = QLabel("Number of jobs") # label_nproc.setFont( QFont("Monospace", 10)) hbox_lay_nproc.addWidget(label_nproc) self.box_nproc = QSpinBox() self.box_nproc.local_path = "integration.mp.nproc" self.box_nproc.editingFinished.connect(self.spnbox_finished) hbox_lay_nproc.addWidget(self.box_nproc) localLayout.addLayout(hbox_lay_nproc) self.inner_reset_btn = ResetButton() localLayout.addWidget(self.inner_reset_btn) localLayout.addStretch() self.setLayout(localLayout) self.box_nproc.tmp_lst = None self.lst_var_widg = _get_all_direct_layout_widget_children(localLayout)
def setupUiForPlayer(self, pGrid, idx): """setup UI elements for a player""" self.spValues[idx] = QSpinBox() self.nameLabels[idx] = QLabel() self.nameLabels[idx].setBuddy(self.spValues[idx]) self.windLabels[idx] = WindLabel() pGrid.addWidget(self.nameLabels[idx], idx + 2, 0) pGrid.addWidget(self.windLabels[idx], idx + 2, 1) pGrid.addWidget(self.spValues[idx], idx + 2, 2) self.wonBoxes[idx] = QCheckBox("") pGrid.addWidget(self.wonBoxes[idx], idx + 2, 3) self.wonBoxes[idx].clicked.connect(self.wonChanged) self.spValues[idx].valueChanged.connect(self.slotInputChanged) detailTab = QWidget() self.detailTabs.addTab(detailTab, '') self.details[idx] = QWidget() detailTabLayout = QVBoxLayout(detailTab) detailTabLayout.addWidget(self.details[idx]) detailTabLayout.addStretch() self.detailsLayout[idx] = QVBoxLayout(self.details[idx])
def setupPlotSettingsFrame(self): self.plotSettingsFrame = ctk.ctkCollapsibleButton() self.plotSettingsFrame.text = "Plotting Settings" self.plotSettingsFrame.collapsed = 1 plotSettingsFrameLayout = QFormLayout(self.plotSettingsFrame) self.layout.addWidget(self.plotSettingsFrame) # label map for probing self.labelMapSelector = slicer.qMRMLNodeComboBox() self.labelMapSelector.nodeTypes = ['vtkMRMLLabelMapVolumeNode'] self.labelMapSelector.toolTip = 'Label map to be probed' self.labelMapSelector.setMRMLScene(slicer.mrmlScene) self.labelMapSelector.addEnabled = 0 self.chartButton = QPushButton('Chart') self.chartButton.setEnabled(False) hbox = QHBoxLayout() hbox.addWidget(QLabel('Probed label volume')) hbox.addWidget(self.labelMapSelector) hbox.addWidget(self.chartButton) plotSettingsFrameLayout.addRow(hbox) self.iCharting = QCheckBox('Interactive charting') self.iCharting.setChecked(True) plotSettingsFrameLayout.addRow(self.iCharting) self.iChartingMode = QButtonGroup() self.iChartingIntensity = QRadioButton('Signal intensity') self.iChartingIntensityFixedAxes = QRadioButton( 'Fixed range intensity') self.iChartingPercent = QRadioButton('Percentage change') self.iChartingIntensity.setChecked(1) self.iChartingMode.addButton(self.iChartingIntensity) self.iChartingMode.addButton(self.iChartingIntensityFixedAxes) self.iChartingMode.addButton(self.iChartingPercent) hbox = QHBoxLayout() self.plottingModeGroupBox = QGroupBox('Plotting mode:') plottingModeLayout = QVBoxLayout() self.plottingModeGroupBox.setLayout(plottingModeLayout) plottingModeLayout.addWidget(self.iChartingIntensity) plottingModeLayout.addWidget(self.iChartingIntensityFixedAxes) plottingModeLayout.addWidget(self.iChartingPercent) hbox.addWidget(self.plottingModeGroupBox) self.showLegendCheckBox = QCheckBox('Display legend') self.showLegendCheckBox.setChecked(0) self.xLogScaleCheckBox = QCheckBox('Use log scale for X axis') self.xLogScaleCheckBox.setChecked(0) self.yLogScaleCheckBox = QCheckBox('Use log scale for Y axis') self.yLogScaleCheckBox.setChecked(0) self.plotGeneralSettingsGroupBox = QGroupBox('General Plot options:') plotGeneralSettingsLayout = QVBoxLayout() self.plotGeneralSettingsGroupBox.setLayout(plotGeneralSettingsLayout) plotGeneralSettingsLayout.addWidget(self.showLegendCheckBox) plotGeneralSettingsLayout.addWidget(self.xLogScaleCheckBox) plotGeneralSettingsLayout.addWidget(self.yLogScaleCheckBox) hbox.addWidget(self.plotGeneralSettingsGroupBox) plotSettingsFrameLayout.addRow(hbox) self.nFramesBaselineCalculation = QSpinBox() self.nFramesBaselineCalculation.minimum = 1 hbox = QHBoxLayout() hbox.addWidget(QLabel('Frame count(baseline calculation):')) hbox.addWidget(self.nFramesBaselineCalculation) plotSettingsFrameLayout.addRow(hbox)
def __init__(self, parent=None): super(IntegrateSimplerParamTab, self).__init__() # self.param_widget_parent = parent.param_widget_parent localLayout = QVBoxLayout() PrFit_lay_out = QHBoxLayout() label_PrFit = QLabel("Use Profile Fitting") PrFit_lay_out.addWidget(label_PrFit) PrFit_comb_bx = QComboBox() PrFit_comb_bx.local_path = "integration.profile.fitting" PrFit_comb_bx.tmp_lst = [] PrFit_comb_bx.tmp_lst.append("True") PrFit_comb_bx.tmp_lst.append("False") PrFit_comb_bx.tmp_lst.append("Auto") for lst_itm in PrFit_comb_bx.tmp_lst: PrFit_comb_bx.addItem(lst_itm) PrFit_comb_bx.currentIndexChanged.connect(self.combobox_changed) PrFit_lay_out.addWidget(PrFit_comb_bx) localLayout.addLayout(PrFit_lay_out) hbox_lay_algorithm_53 = QHBoxLayout() label_algorithm_53 = QLabel("Background Algorithm") hbox_lay_algorithm_53.addWidget(label_algorithm_53) box_algorithm_53 = QComboBox() box_algorithm_53.local_path = "integration.background.algorithm" box_algorithm_53.tmp_lst = [] box_algorithm_53.tmp_lst.append("simple") box_algorithm_53.tmp_lst.append("null") box_algorithm_53.tmp_lst.append("median") box_algorithm_53.tmp_lst.append("gmodel") box_algorithm_53.tmp_lst.append("glm") for lst_itm in box_algorithm_53.tmp_lst: box_algorithm_53.addItem(lst_itm) box_algorithm_53.setCurrentIndex(4) box_algorithm_53.currentIndexChanged.connect(self.combobox_changed) hbox_lay_algorithm_53.addWidget(box_algorithm_53) localLayout.addLayout(hbox_lay_algorithm_53) hbox_d_min = QHBoxLayout() label_d_min = QLabel("d_min") hbox_d_min.addWidget(label_d_min) d_min_spn_bx = QDoubleSpinBox() d_min_spn_bx.local_path = "prediction.d_min" d_min_spn_bx.setSpecialValueText("None") d_min_spn_bx.setValue(0.0) hbox_d_min.addWidget(d_min_spn_bx) d_min_spn_bx.valueChanged.connect(self.spnbox_changed) localLayout.addLayout(hbox_d_min) hbox_lay_nproc = QHBoxLayout() label_nproc = QLabel("Number of Jobs") # label_nproc.setFont( QFont("Monospace", 10)) hbox_lay_nproc.addWidget(label_nproc) self.box_nproc = QSpinBox() self.box_nproc.local_path = "integration.mp.nproc" self.box_nproc.valueChanged.connect(self.spnbox_changed) hbox_lay_nproc.addWidget(self.box_nproc) localLayout.addLayout(hbox_lay_nproc) self.inner_reset_btn = ResetButton() localLayout.addWidget(self.inner_reset_btn) localLayout.addStretch() self.setLayout(localLayout) self.box_nproc.tmp_lst = None self.lst_var_widg = _get_all_direct_layout_widget_children(localLayout)
def __init__(self, parent=None): super(FindspotsSimplerParameterTab, self).__init__() # self.param_widget_parent = parent.param_widget_parent #TODO thinks about making "None equivalent to 1" xds_gain_label = QLabel("Gain") xds_gain_spn_bx = QDoubleSpinBox() xds_gain_spn_bx.local_path = "spotfinder.threshold.dispersion.gain" xds_gain_spn_bx.setSpecialValueText("None") xds_gain_spn_bx.setValue(1.0) xds_gain_spn_bx.valueChanged.connect(self.spnbox_changed) xds_sigma_background_label = QLabel("Sigma Background") xds_sigma_background_spn_bx = QDoubleSpinBox() xds_sigma_background_spn_bx.setValue(6.0) xds_sigma_background_spn_bx.local_path = ( "spotfinder.threshold.dispersion.sigma_background") xds_sigma_background_spn_bx.valueChanged.connect(self.spnbox_changed) xds_sigma_strong_label = QLabel("Sigma Strong") xds_sigma_strong_spn_bx = QDoubleSpinBox() xds_sigma_strong_spn_bx.setValue(3.0) xds_sigma_strong_spn_bx.local_path = ( "spotfinder.threshold.dispersion.sigma_strong") xds_sigma_strong_spn_bx.valueChanged.connect(self.spnbox_changed) xds_global_threshold_label = QLabel("Global Threshold") xds_global_threshold_spn_bx = QDoubleSpinBox() xds_global_threshold_spn_bx.local_path = ( "spotfinder.threshold.dispersion.global_threshold") xds_global_threshold_spn_bx.valueChanged.connect(self.spnbox_changed) localLayout = QVBoxLayout() xds_gain_hb = QHBoxLayout() xds_gain_hb.addWidget(xds_gain_label) xds_gain_hb.addWidget(xds_gain_spn_bx) localLayout.addLayout(xds_gain_hb) xds_sigma_background_hb = QHBoxLayout() xds_sigma_background_hb.addWidget(xds_sigma_background_label) xds_sigma_background_hb.addWidget(xds_sigma_background_spn_bx) localLayout.addLayout(xds_sigma_background_hb) xds_sigma_strong_hb = QHBoxLayout() xds_sigma_strong_hb.addWidget(xds_sigma_strong_label) xds_sigma_strong_hb.addWidget(xds_sigma_strong_spn_bx) localLayout.addLayout(xds_sigma_strong_hb) xds_global_threshold_hb = QHBoxLayout() xds_global_threshold_hb.addWidget(xds_global_threshold_label) xds_global_threshold_hb.addWidget(xds_global_threshold_spn_bx) localLayout.addLayout(xds_global_threshold_hb) hbox_lay_nproc = QHBoxLayout() label_nproc = QLabel("Number of Jobs") # label_nproc.setPalette(palette_object) # label_nproc.setFont( QFont("Monospace", 10)) hbox_lay_nproc.addWidget(label_nproc) self.box_nproc = QSpinBox() self.box_nproc.local_path = "spotfinder.mp.nproc" self.box_nproc.valueChanged.connect(self.spnbox_changed) hbox_lay_nproc.addWidget(self.box_nproc) localLayout.addLayout(hbox_lay_nproc) self.inner_reset_btn = ResetButton() localLayout.addWidget(self.inner_reset_btn) localLayout.addStretch() self.setLayout(localLayout) self.lst_var_widg = _get_all_direct_layout_widget_children(localLayout)