Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.groupBox = QGroupBox("Light mode", self)
self.gridLayout.addWidget(self.groupBox, 2, 0)
self.groupBoxDark = QGroupBox("Dark mode", self)
self.gridLayout.addWidget(self.groupBoxDark, 2, 1)
self.formLayout = QFormLayout(self.groupBox)
self.groupBox.setLayout(self.formLayout)
self.fgColorPreview = QLineEdit(self)
self.formLayout.addRow("Foreground", self.fgColorPreview)
self.bgColorPreview = QLineEdit(self)
self.formLayout.addRow("Background", self.bgColorPreview)
self.boldCheckBox = QCheckBox(self.groupBox)
self.formLayout.addRow("Bold", self.boldCheckBox)
self.italicCheckBox = QCheckBox(self.groupBox)
self.formLayout.addRow("Italic", self.italicCheckBox)
self.underlineCheckBox = QCheckBox(self.groupBox)
self.formLayout.addRow("Underline", self.underlineCheckBox)
self.formLayoutDark = QFormLayout(self.groupBoxDark)
self.groupBoxDark.setLayout(self.formLayoutDark)
self.fgColorPreviewDark = QLineEdit(self)
self.formLayoutDark.addRow("Foreground", self.fgColorPreviewDark)
self.bgColorPreviewDark = QLineEdit(self)
self.formLayoutDark.addRow("Background", self.bgColorPreviewDark)
self.boldCheckBoxDark = QCheckBox(self.groupBoxDark)
self.formLayoutDark.addRow("Bold", self.boldCheckBoxDark)
self.italicCheckBoxDark = QCheckBox(self.groupBox)
self.formLayoutDark.addRow("Italic", self.italicCheckBoxDark)
self.underlineCheckBoxDark = QCheckBox(self.groupBox)
self.formLayoutDark.addRow("Underline", self.underlineCheckBoxDark)
self.spacer = QSpacerItem(20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
self._folder_box = ClientGUICommon.StaticBox( self, 'folder options' )
self._name = QW.QLineEdit( self._folder_box )
self._path = QP.DirPickerCtrl( self._folder_box )
self._check_regularly = QW.QCheckBox( self._folder_box )
self._period = ClientGUITime.TimeDeltaButton( self._folder_box, min = 3 * 60, days = True, hours = True, minutes = True )
self._paused = QW.QCheckBox( self._folder_box )
self._check_now = QW.QCheckBox( self._folder_box )
self._show_working_popup = QW.QCheckBox( self._folder_box )
self._publish_files_to_popup_button = QW.QCheckBox( self._folder_box )
self._publish_files_to_page = QW.QCheckBox( self._folder_box )
self._file_seed_cache_button = ClientGUIFileSeedCache.FileSeedCacheButton( self._folder_box, HG.client_controller, self._import_folder.GetFileSeedCache, file_seed_cache_set_callable = self._import_folder.SetFileSeedCache )
#
self._file_box = ClientGUICommon.StaticBox( self, 'file options' )
self._mimes = ClientGUIOptionsPanels.OptionsPanelMimes( self._file_box, HC.ALLOWED_MIMES )
def create_choice():
choice = ClientGUICommon.BetterChoice( self._file_box )
for if_id in ( CC.IMPORT_FOLDER_DELETE, CC.IMPORT_FOLDER_IGNORE, CC.IMPORT_FOLDER_MOVE ):
self.plane_label = QLabel('Plane:')
self.location_label = QLabel('Location:')
self.zaxis_method_label = QLabel('Z-Axis Method:')
self.cid_label = QLabel('Coordinate System:')
self.x_label = QLabel('X')
self.y_label = QLabel('Y')
self.z_label = QLabel('Z')
#self.location_label.setAlignment(Qt.AlignCenter)
self.cid_label.setAlignment(Qt.AlignCenter)
self.x_label.setAlignment(Qt.AlignCenter)
self.y_label.setAlignment(Qt.AlignCenter)
self.z_label.setAlignment(Qt.AlignCenter)
self.export_checkbox = QCheckBox()
self.csv_label = QLabel('CSV Filename:')
self.csv_edit = QLineEdit()
self.csv_button = QPushButton('Browse...')
self.csv_label.setEnabled(False)
self.csv_edit.setEnabled(False)
self.csv_button.setEnabled(False)
#-----------------------------------------------------------------------
# nodes
self.add_button = QPushButton('Add')
self.remove_button = QPushButton('Remove')
# elements
self.add2_button = QPushButton('Add')
self.remove2_button = QPushButton('Remove')
#-----------------------------------------------------------------------
# closing
gen_button.clicked.connect(self.generate_predefined_clicked)
samplo_button = QtWidgets.QPushButton(groupBox)
samplo_button.setText('GenSampLo')
samplo_button.setObjectName('samplo_' + method_name)
samplo_button.clicked.connect(self.samplo_predefined_clicked)
gridLayout.addWidget(gen_button, 0, 0, 1, 1)
gridLayout.addWidget(samplo_button, 1, 0, 1, 1)
# run through all parameters of the current method and create the widgets
for param_index, (param_name, param) in enumerate(method_params[method_name].items()):
# create a label for the parameter
param_label = QtWidgets.QLabel(groupBox)
param_label.setText(param_name)
# create proper input widget for the parameter depending on default value type
if type(param) is bool:
input_obj = QtWidgets.QCheckBox(groupBox)
input_obj.setChecked(param)
elif type(param) is float:
input_obj = ScienDSpinBox(groupBox)
if 'amp' in param_name or 'volt' in param_name:
input_obj.setSuffix('V')
elif 'freq' in param_name:
input_obj.setSuffix('Hz')
elif 'time' in param_name or 'period' in param_name or 'tau' in param_name:
input_obj.setSuffix('s')
input_obj.setMinimumSize(QtCore.QSize(80, 0))
input_obj.setValue(param)
elif type(param) is int:
input_obj = ScienSpinBox(groupBox)
input_obj.setValue(param)
elif type(param) is str:
input_obj = QtWidgets.QLineEdit(groupBox)
self.magnify_label = QLabel('Screenshot Magnify:')
self.magnify_edit = QSpinBox(self)
self.magnify_edit.setMinimum(1)
self.magnify_edit.setMaximum(10)
self.magnify_edit.setValue(self._magnify)
#-----------------------------------------------------------------------
self.nastran_is_element_quality_checkbox = QCheckBox('Element Quality')
self.nastran_is_element_quality_checkbox.setToolTip('Cacluate Aspect Ratio, Skew Angle, Max/Min Interior Angle, etc.')
self.nastran_is_element_quality_checkbox.setChecked(self._nastran_is_element_quality)
self.nastran_is_properties_checkbox = QCheckBox('Properties')
self.nastran_is_properties_checkbox.setToolTip('Breakdown each layer of a PCOMP/PSHELL')
self.nastran_is_properties_checkbox.setChecked(self._nastran_is_properties)
self.nastran_is_3d_bars_checkbox = QCheckBox('3D Bars')
self.nastran_is_3d_bars_checkbox.setToolTip('Crete 3D Bar/Beam geometry')
self.nastran_is_3d_bars_checkbox.setChecked(self._nastran_is_3d_bars)
#self.nastran_is_3d_bars_checkbox.setDisabled(True)
self.nastran_is_3d_bars_update_checkbox = QCheckBox('Update 3D Bars')
self.nastran_is_3d_bars_update_checkbox.setToolTip('Update the 3D Bar/Beam cross-sections when deformations are applied')
self.nastran_is_3d_bars_update_checkbox.setChecked(self._nastran_is_3d_bars_update)
self.nastran_is_shell_mcid_checkbox = QCheckBox('Shell MCIDs')
self.nastran_is_shell_mcid_checkbox.setToolTip('Calculate the Material Coordinate Systems for Shells')
self.nastran_is_shell_mcid_checkbox.setChecked(self._nastran_is_shell_mcids)
self.nastran_create_coords_checkbox = QCheckBox('Coords')
self.nastran_create_coords_checkbox.setChecked(self._nastran_create_coords)
self.nastran_is_bar_axes_checkbox = QCheckBox('Bar Axes')
def __init__(self, parent=None, **kwargs):
super(NetworkPlotWidget, self).__init__(parent)
self.checkBox_useCorrected = QtWidgets.QCheckBox()
self.checkBox_useCorrected.setText("Plot Corrected")
self.checkBox_useCorrected.setEnabled(False)
self.comboBox_primarySelector = QtWidgets.QComboBox(self)
self.comboBox_primarySelector.addItems(("S", "Z", "Y", "A", "Smith Chart"))
self.comboBox_unitsSelector = QtWidgets.QComboBox(self)
self.comboBox_unitsSelector.addItems(self.S_UNITS)
self.comboBox_traceSelector = QtWidgets.QComboBox(self)
self.set_trace_items()
self.comboBox_traceSelector.setCurrentIndex(0)
self.plot_layout = pg.GraphicsLayoutWidget(self)
self.plot_layout.sceneObj.sigMouseClicked.connect(self.graph_clicked)
self.nastran_composite_plate_stress_checkbox = QCheckBox('Composite Plate Stress')
self.nastran_rod_stress_checkbox = QCheckBox('Rod Stress')
self.nastran_bar_stress_checkbox = QCheckBox('Bar Stress')
self.nastran_beam_stress_checkbox = QCheckBox('Beam Stress')
self.nastran_stress_checkbox.setChecked(self._nastran_stress)
self.nastran_plate_stress_checkbox.setChecked(self._nastran_plate_stress)
self.nastran_composite_plate_stress_checkbox.setChecked(self._nastran_composite_plate_stress)
self.nastran_rod_stress_checkbox.setChecked(self._nastran_rod_stress)
self.nastran_bar_stress_checkbox.setChecked(self._nastran_bar_stress)
self.nastran_beam_stress_checkbox.setChecked(self._nastran_beam_stress)
self.nastran_strain_checkbox = QCheckBox('Strain')
self.nastran_plate_strain_checkbox = QCheckBox('Plate Strain')
self.nastran_composite_plate_strain_checkbox = QCheckBox('Composite Plate Strain')
self.nastran_rod_strain_checkbox = QCheckBox('Rod Strain')
self.nastran_bar_strain_checkbox = QCheckBox('Bar Strain')
self.nastran_beam_strain_checkbox = QCheckBox('Beam Strain')
self.nastran_strain_checkbox.setChecked(self._nastran_strain)
self.nastran_plate_strain_checkbox.setChecked(self._nastran_plate_strain)
self.nastran_composite_plate_strain_checkbox.setChecked(self._nastran_composite_plate_strain)
self.nastran_rod_strain_checkbox.setChecked(self._nastran_rod_strain)
self.nastran_bar_strain_checkbox.setChecked(self._nastran_bar_strain)
self.nastran_beam_strain_checkbox.setChecked(self._nastran_beam_strain)
#-----------------------------------------------------------------------
# closing
self.apply_button = QPushButton("Apply")
self.ok_button = QPushButton("OK")
self.cancel_button = QPushButton("Cancel")
def __init__(self, parent=None, flags=QtCore.Qt.WindowFlags(0), **kwargs):
super(BackendPreferencesPage, self).__init__(parent, flags, **kwargs)
# self.setupUi(self)
# GDAL backend
msg = 'Show overview items in the tree view.'
tip = msg + "\nNOTE: this setting doesn't affects items already open."
checkbox = QtWidgets.QCheckBox(self.tr(msg), toolTip=self.tr(tip))
self.showOverviewCheckbox = checkbox
layout = QtWidgets.QVBoxLayout()
layout.addWidget(checkbox)
# layout.addSpacerItem(QtWidgets.QSpacerItem(0, 20))
self.groupbox = QtWidgets.QGroupBox(
self.tr('GDAL Backend Preferences'))
self.groupbox.setLayout(layout)
self.verticalLayout.insertWidget(1, self.groupbox)