Example #1
0
 def __init__(self, parent):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_GroupBox_Rotation()
     self.ui.setupUi(self)
     self.ui.dial_rotation.valueChanged.connect(self._dial_value_changed)
     self.ui.doubleSpinBox_rotation.valueChanged.connect(
         self._text_value_changed)
Example #2
0
    def __init__(self, parent, point_size=True, key_size=False):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBox_text_box()
        self.ui.setupUi(self)

        self._point_size = point_size
        self._key_size = key_size
        self.ui.comboBox_size.model().item(len(self._size_keys)).setEnabled(
            self._point_size)

        # connect signal
        self.ui.checkBox_size.stateChanged.connect(self._size_state_changed)
        self.ui.checkBox_weight.stateChanged.connect(
            self._weight_state_changed)
        self.ui.comboBox_size.currentIndexChanged.connect(
            self._size_index_changed)

        self.ui.horizontalSlider_x.valueChanged.connect(
            self._x_slider_value_changed)
        self.ui.horizontalSlider_y.valueChanged.connect(
            self._y_slider_value_changed)
        self.ui.doubleSpinBox_x.editingFinished.connect(self._update_slider_x)
        self.ui.doubleSpinBox_y.editingFinished.connect(self._update_slider_y)

        self.ui.horizontalSlider_x_pad.valueChanged.connect(
            self._x_pad_slider_value_changed)
        self.ui.horizontalSlider_y_pad.valueChanged.connect(
            self._y_pad_slider_value_changed)
        self.ui.doubleSpinBox_x_pad.editingFinished.connect(
            self._update_slider_x_pad)
        self.ui.doubleSpinBox_y_pad.editingFinished.connect(
            self._update_slider_y_pad)
Example #3
0
    def __init__(self, parent):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBox_plot_control_resistivity_phase_pseudo_section()
        # set up gui
        self.ui.setupUi(self)

        self.ui.comboBox_res_cmap.addItems(list(cmapdict.keys()))
        self.ui.comboBox_res_cmap.setCurrentIndex(self.ui.comboBox_res_cmap.findText('mt_rd2gr2bl'))
        self.ui.comboBox_phase_cmap.addItems(list(cmapdict.keys()))
        self.ui.comboBox_phase_cmap.setCurrentIndex(self.ui.comboBox_phase_cmap.findText('mt_bl2gr2rd'))

        self.ui.doubleSpinBox_res_max.setMaximum(np.inf)
        self.ui.doubleSpinBox_res_min.setMaximum(np.inf)
        self.ui.doubleSpinBox_period_min.setMaximum(np.inf)
        self.ui.doubleSpinBox_period_max.setMaximum(np.inf)

        # connect signals
        self.ui.doubleSpinBox_period_min.valueChanged.connect(self._period_min_changed)
        self.ui.doubleSpinBox_period_max.valueChanged.connect(self._period_max_changed)
        self.ui.doubleSpinBox_phase_min.valueChanged.connect(self._phase_min_changed)
        self.ui.doubleSpinBox_phase_max.valueChanged.connect(self._phase_max_changed)
        self.ui.doubleSpinBox_res_min.valueChanged.connect(self._res_min_changed)
        self.ui.doubleSpinBox_res_max.valueChanged.connect(self._res_max_changed)

        self.ui.checkBox_phase.stateChanged.connect(self._phase_state_changed)
        self.ui.checkBox_period.stateChanged.connect(self._period_state_changed)
        self.ui.checkBox_resistivity.stateChanged.connect(self._res_state_changed)
Example #4
0
    def __init__(self, parent):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBox_mash_grid()
        self.ui.setupUi(self)

        # connect signal
        self.ui.radioButton_imshow.toggled.connect(self._imshow_toggled)
Example #5
0
 def __init__(self, parent, simple_color=True):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_GroupBox_Stretch()
     self.ui.setupUi(self)
     self.ui.checkBox_x_range.stateChanged.connect(
         self._x_range_state_change)
     self.ui.checkBox_y_range.stateChanged.connect(
         self._y_range_state_change)
Example #6
0
    def __init__(self, parent):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBox_Station_Select()
        self.ui.setupUi(self)
        self.mt_objs = None

        self.ui.comboBox_station.currentIndexChanged.connect(
            self._current_station_changed)
Example #7
0
    def __init__(self, parent):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBox_aspect()
        self.ui.setupUi(self)

        # connect signal
        self.ui.radioButton_aspect_float.toggled.connect(
            self._aspect_float_toggled)
Example #8
0
 def __init__(self, parent):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_groupBoxZ_Component_Multiple()
     self.ui.setupUi(self)
     # z-component checkbox logic
     self.ui.checkBox_zyx.stateChanged.connect(
         self._multiple_zcomponent_logic)
     self.ui.checkBox_zxy.stateChanged.connect(
         self._multiple_zcomponent_logic)
     self.ui.checkBox_det.stateChanged.connect(
         self._multiple_zcomponent_logic)
Example #9
0
    def __init__(self, parent):
        QGroupBox.__init__(self, parent)
        self._mt_obj_dict = {}
        self.model_stations = QStandardItemModel()

        # setup ui
        self.ui = Ui_GroupBox_select_from_files()
        self.ui.setupUi(self)
        self.ui.listView_stations.setModel(self.model_stations)

        # connect signals
        self.ui.listView_stations.selectionModel().selectionChanged.connect(self._update_selection)
Example #10
0
 def __init__(self, parent, simple_color=True):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_GroupBox_Arrow()
     self.ui.setupUi(self)
     self._simple_color = simple_color
     if not self._simple_color:
         # use all colors available to matplot
         self.ui.comboBox_color_imaginary.clear()
         self.ui.comboBox_color_real.clear()
         cnames = [name for name, hex in COLORS]
         self.ui.comboBox_color_imaginary.addItems(cnames)
         self.ui.comboBox_color_real.addItems(cnames)
Example #11
0
 def __init__(self, label, klass, wordwrap=False, **kwargs):
     QGroupBox.__init__(self, label)
     self.klass = klass
     self.dataset = klass(**kwargs)
     self.layout = QVBoxLayout()
     if self.dataset.get_comment():
         label = QLabel(self.dataset.get_comment())
         label.setWordWrap(wordwrap)
         self.layout.addWidget(label)
     self.grid_layout = QGridLayout()
     self.layout.addLayout(self.grid_layout)
     self.setLayout(self.layout)
     self.edit = self.get_edit_layout()
Example #12
0
    def __init__(self, parent):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBoxEllipse()
        self.ui.setupUi(self)
        # set tooltips for color by and cmap
        for i in range(self.ui.comboBoxColor_by.count()):
            self.ui.comboBoxColor_by.setItemData(
                i, self.ui.comboBoxColor_by.itemText(i), QtCore.Qt.ToolTipRole)
        for i in range(self.ui.comboBox_cmap.count()):
            self.ui.comboBox_cmap.setItemData(
                i, self.ui.comboBox_cmap.itemText(i), QtCore.Qt.ToolTipRole)

        self.ui.doubleSpinBox_min.editingFinished.connect(self._increase_max)
        self.ui.doubleSpinBox_max.editingFinished.connect(self._decrease_min)
Example #13
0
    def __init__(self, parent, show_period=True, show_frequency=True, allow_range_select=True,
                 select_multiple=True):
        QGroupBox.__init__(self, parent)
        self._mt_objs = None
        self._unique_periods = None
        self._unique_frequencies = None
        self._periods = None
        self._frequencies = None
        self._allow_range = allow_range_select
        self._select_multiple = select_multiple
        self.ui = Ui_GroupBox_frequency_select()
        self.ui.setupUi(self)

        self.ui.label_place_holder.hide()
        self.model_selected = QStandardItemModel()
        self.ui.listView_selected.setModel(self.model_selected)
        self.frequency_delegate = FrequencySelection.FrequencyDelegate(self.ui.listView_selected)
        self.ui.listView_selected.setItemDelegate(self.frequency_delegate)

        self.histogram = FrequencySelection.Histogram(self, allow_range_select=self._allow_range)
        self.histogram.set_unit(self._units[0])
        self.histogram.set_tol(self.ui.doubleSpinBox_tolerance.value())
        self.histogram.frequency_selected.connect(self._frequency_selected)
        self.histogram.frequency_range_selected.connect(self._frequency_selected)
        self.ui.widget_histgram.layout().addWidget(self.histogram)

        self.ui.radioButton_period.setChecked(show_period)
        self.ui.radioButton_frequency.setChecked(show_frequency)
        self.ui.doubleSpinBox_tolerance.setHidden(not self._allow_range)
        self.ui.checkBox_existing_only.setChecked(not self._allow_range)
        self.ui.checkBox_existing_only.setHidden(not self._allow_range)
        self.ui.label_tolerance.setHidden(not self._allow_range)
        self.ui.radioButton_period.setHidden(not (show_period and show_frequency))
        self.ui.radioButton_frequency.setHidden(not (show_period and show_frequency))
        if self.ui.radioButton_frequency.isHidden():
            self.setTitle(self._type[1])
        elif self.ui.radioButton_period.isHidden():
            self.setTitle(self._type[0])

        self.ui.radioButton_frequency.toggled.connect(self._frequency_toggled)
        self.ui.checkBox_existing_only.toggled.connect(self.histogram.select_existing)
        self.ui.checkBox_existing_only.toggled.connect(self.model_selected.clear)
        self.ui.checkBox_show_existing.toggled.connect(self.histogram.show_existing)
        self.ui.checkBox_x_log_scale.toggled.connect(self.histogram.set_x_log_scale)
        self.ui.checkBox_y_log_scale.toggled.connect(self.histogram.set_y_log_scale)
        self.ui.pushButton_clear.clicked.connect(self._clear_all)
        self.ui.pushButton_delete.clicked.connect(self._delete_selected)
        self.ui.doubleSpinBox_tolerance.valueChanged.connect(self.histogram.set_tol)
Example #14
0
    def __init__(self, parent):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBox_plot_control_strike()
        self.ui.setupUi(self)

        # setup ui
        # format validator
        self._double_validator = QDoubleValidator(-np.inf, np.inf, 1000)
        self.ui.lineEdit_min.setValidator(self._double_validator)
        self.ui.lineEdit_max.setValidator(self._double_validator)

        # connect signals
        self.ui.radioButton_range_minmax.toggled.connect(self._range_minmax_toggled)
        self.ui.lineEdit_min.editingFinished.connect(self._range_min_value_changed)
        self.ui.lineEdit_max.editingFinished.connect(self._range_max_value_changed)
        self.ui.checkBox_max_error.toggled.connect(self._max_error_toggled)
Example #15
0
    def __init__(self, parent):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBox_common_settings()
        self.ui.setupUi(self)

        # dpi
        self.ui.spinBox_dpi.valueChanged.connect(self._dpi_changed)
        # inches
        self.ui.doubleSpinBox_width_inches.valueChanged.connect(self._width_inches_changed)
        self.ui.doubleSpinBox_height_inches.valueChanged.connect(self._height_inches_changed)
        # pixels
        self.ui.spinBox_width_pixels.valueChanged.connect(self._width_pixels_changed)
        self.ui.spinBox_height_pixels.valueChanged.connect(self._height_pixels_changed)
        # x
        self.ui.horizontalSlider_x.valueChanged.connect(self._x_slider_changed)
        self.ui.doubleSpinBox_x.valueChanged.connect(self._x_spinbox_changed)
        # y
        self.ui.horizontalSlider_y.valueChanged.connect(self._y_slider_changed)
        self.ui.doubleSpinBox_y.valueChanged.connect(self._y_spinbox_changed)
Example #16
0
    def __init__(self,
                 parent,
                 simple_color=True,
                 point_size=True,
                 key_size=False):
        QGroupBox.__init__(self, parent)
        self.ui = Ui_GroupBox_Font()
        self.ui.setupUi(self)
        self.ui.checkBox_size.stateChanged.connect(self.size_state_changed)
        self.ui.checkBox_weight.stateChanged.connect(self.weight_state_changed)
        self.ui.checkBox_color.stateChanged.connect(self.color_state_changed)
        self.ui.comboBox_size.currentIndexChanged.connect(
            self.size_index_changed)
        self._simple_color = simple_color
        self._point_size = point_size
        self._key_size = key_size

        self.ui.comboBox_size.model().item(len(self._size_keys)).setEnabled(
            self._point_size)

        if not self._simple_color:
            self.ui.comboBox_color.clear()
            cnames = [name for name, hex in COLORS]
            self.ui.comboBox_color.addItems(cnames)
Example #17
0
 def __init__(self, parent=None):
     QGroupBox.__init__(self, parent)
     self.ui = load_ui(__file__,
                       '../../../ui/sans/trans_direct_beam.ui',
                       baseinstance=self)
Example #18
0
 def __init__(self, parent=None):
     QGroupBox.__init__(self, parent)
     self.ui = load_ui(__file__, '../../../ui/sans/trans_direct_beam.ui', baseinstance=self)
Example #19
0
 def __init__(self, parent):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_groupBoxZ_Component_Single()
     self.ui.setupUi(self)
Example #20
0
 def __init__(self, parent):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_GroupBox_Padding()
     self.ui.setupUi(self)
Example #21
0
 def __init__(self, parent):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_GroupBoxTolerance()
     self.ui.setupUi(self)
Example #22
0
 def __init__(self, parent):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_GroupBox_Linedir()
     self.ui.setupUi(self)
Example #23
0
 def __init__(self, parent):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_GroupBox_plot_control_mt_response()
     self.ui.setupUi(self)
Example #24
0
 def __init__(self, title, parent=None):
     QGroupBox.__init__(self, title, parent)
     PyDMPrimitiveWidget.__init__(self)
Example #25
0
 def __init__(self, parent):
     QGroupBox.__init__(self, parent)
     self.ui = Ui_GroupBox_z_unit()
     self.ui.setupUi(self)