示例#1
0
    def __init__(self, main):
        super().__init__(main)

        # General
        group_box_general = QGroupBox(self.tr('General'), self)

        (self.label_dispersion_divide,
         self.spin_box_dispersion_number_sections,
         self.label_dispersion_sections
         ) = wl_widgets.wl_widgets_number_sections(self)

        group_box_general.setLayout(wl_layout.Wl_Layout())
        group_box_general.layout().addWidget(self.label_dispersion_divide, 0,
                                             0)
        group_box_general.layout().addWidget(
            self.spin_box_dispersion_number_sections, 0, 1)
        group_box_general.layout().addWidget(self.label_dispersion_sections, 0,
                                             2)

        group_box_general.layout().setColumnStretch(3, 1)

        self.setLayout(wl_layout.Wl_Layout())
        self.layout().addWidget(group_box_general, 0, 0)

        self.layout().setContentsMargins(6, 4, 6, 4)
        self.layout().setRowStretch(1, 1)
示例#2
0
    def __init__(self, main):
        super().__init__(main)

        self.settings_default = self.main.settings_default['measures'][
            'dispersion']
        self.settings_custom = self.main.settings_custom['measures'][
            'dispersion']

        # General
        group_box_general_settings = QGroupBox(self.tr('General Settings'),
                                               self)

        (self.label_dispersion_divide,
         self.spin_box_dispersion_number_sections,
         self.label_dispersion_sections
         ) = wl_widgets.wl_widgets_number_sections(self)

        group_box_general_settings.setLayout(wl_layouts.Wl_Layout())
        group_box_general_settings.layout().addWidget(
            self.label_dispersion_divide, 0, 0)
        group_box_general_settings.layout().addWidget(
            self.spin_box_dispersion_number_sections, 0, 1)
        group_box_general_settings.layout().addWidget(
            self.label_dispersion_sections, 0, 2)

        group_box_general_settings.layout().setColumnStretch(3, 1)

        self.setLayout(wl_layouts.Wl_Layout())
        self.layout().addWidget(group_box_general_settings, 0, 0)

        self.layout().setContentsMargins(6, 4, 6, 4)
        self.layout().setRowStretch(1, 1)
示例#3
0
    def __init__(self, main):
        super().__init__(main)

        self.settings_default = self.main.settings_default['measures'][
            'adjusted_freq']
        self.settings_custom = self.main.settings_custom['measures'][
            'adjusted_freq']

        # General
        group_box_general_settings = QGroupBox(self.tr('General Settings'),
                                               self)

        (self.label_adjusted_freq_divide,
         self.spin_box_adjusted_freq_number_sections,
         self.label_adjusted_freq_sections
         ) = wl_widgets.wl_widgets_number_sections(self)
        self.checkbox_use_same_settings_dispersion = QCheckBox(
            self.tr('Use same settings in "Settings → Measures → Dispersion"'),
            self)

        self.checkbox_use_same_settings_dispersion.stateChanged.connect(
            self.use_same_settings_changed)

        group_box_general_settings.setLayout(wl_layouts.Wl_Layout())
        group_box_general_settings.layout().addWidget(
            self.label_adjusted_freq_divide, 0, 0)
        group_box_general_settings.layout().addWidget(
            self.spin_box_adjusted_freq_number_sections, 0, 1)
        group_box_general_settings.layout().addWidget(
            self.label_adjusted_freq_sections, 0, 2)
        group_box_general_settings.layout().addWidget(
            self.checkbox_use_same_settings_dispersion, 1, 0, 1, 4)

        group_box_general_settings.layout().setColumnStretch(3, 1)

        self.setLayout(wl_layouts.Wl_Layout())
        self.layout().addWidget(group_box_general_settings, 0, 0)

        self.layout().setContentsMargins(6, 4, 6, 4)
        self.layout().setRowStretch(1, 1)

        self.use_same_settings_changed()
示例#4
0
    def __init__(self, main):
        super().__init__(main)

        # z-score
        group_box_z_score = QGroupBox(self.tr('z-score'), self)

        (self.label_z_score_direction, self.combo_box_z_score_direction
         ) = wl_widgets.wl_widgets_direction_2(self)

        group_box_z_score.setLayout(wl_layout.Wl_Layout())
        group_box_z_score.layout().addWidget(self.label_z_score_direction, 0,
                                             0)
        group_box_z_score.layout().addWidget(self.combo_box_z_score_direction,
                                             0, 1)

        group_box_z_score.layout().setColumnStretch(2, 1)

        # Student's t-test (Two-sample)
        group_box_students_t_test_2_sample = QGroupBox(
            self.tr('Student\'s t-test (Two-sample)'), self)

        (self.label_students_t_test_2_sample_divide,
         self.spin_box_students_t_test_2_sample_number_sections,
         self.label_students_t_test_2_sample_sections
         ) = wl_widgets.wl_widgets_number_sections(self)

        (self.label_students_t_test_2_sample_use_data,
         self.combo_box_students_t_test_2_sample_use_data
         ) = wl_widgets.wl_widgets_use_data_freq(self)
        self.label_students_t_test_2_sample_variances = QLabel(
            self.tr('Variances:'), self)
        self.combo_box_students_t_test_2_sample_variances = QComboBox(self)
        self.label_welchs_t_test = wl_label.Wl_Label_Hint(
            self.tr('''
                <p>
                    * If variances are set to "Unequal", the Welch\'s t-test will be performed instead.
                </p>
            '''), self)

        self.combo_box_students_t_test_2_sample_variances.addItems(
            [self.tr('Equal'), self.tr('Unequal')])

        layout_students_t_test_2_sample_number_sections = wl_layout.Wl_Layout()
        layout_students_t_test_2_sample_number_sections.addWidget(
            self.label_students_t_test_2_sample_divide, 0, 0)
        layout_students_t_test_2_sample_number_sections.addWidget(
            self.spin_box_students_t_test_2_sample_number_sections, 0, 1)
        layout_students_t_test_2_sample_number_sections.addWidget(
            self.label_students_t_test_2_sample_sections, 0, 2)

        layout_students_t_test_2_sample_number_sections.setColumnStretch(3, 1)

        group_box_students_t_test_2_sample.setLayout(wl_layout.Wl_Layout())
        group_box_students_t_test_2_sample.layout().addLayout(
            layout_students_t_test_2_sample_number_sections, 0, 0, 1, 3)
        group_box_students_t_test_2_sample.layout().addWidget(
            self.label_students_t_test_2_sample_use_data, 1, 0)
        group_box_students_t_test_2_sample.layout().addWidget(
            self.combo_box_students_t_test_2_sample_use_data, 1, 1)
        group_box_students_t_test_2_sample.layout().addWidget(
            self.label_students_t_test_2_sample_variances, 2, 0)
        group_box_students_t_test_2_sample.layout().addWidget(
            self.combo_box_students_t_test_2_sample_variances, 2, 1)
        group_box_students_t_test_2_sample.layout().addWidget(
            self.label_welchs_t_test, 3, 0, 1, 3)

        group_box_students_t_test_2_sample.layout().setColumnStretch(2, 1)

        # Pearson's Chi-squared Test
        group_box_pearsons_chi_squared_test = QGroupBox(
            self.tr('Pearson\'s Chi-squared Test'), self)

        self.checkbox_pearsons_chi_squared_test_apply_correction = QCheckBox(
            self.tr('Apply Yates\'s correction for continuity'))

        group_box_pearsons_chi_squared_test.setLayout(wl_layout.Wl_Layout())
        group_box_pearsons_chi_squared_test.layout().addWidget(
            self.checkbox_pearsons_chi_squared_test_apply_correction, 0, 0)

        # Fisher's Exact Test
        group_box_fishers_exact_test = QGroupBox(
            self.tr('Fisher\'s Exact Test'), self)

        (self.label_fishers_exact_test_direction,
         self.combo_box_fishers_exact_test_direction
         ) = wl_widgets.wl_widgets_direction(self)

        group_box_fishers_exact_test.setLayout(wl_layout.Wl_Layout())
        group_box_fishers_exact_test.layout().addWidget(
            self.label_fishers_exact_test_direction, 0, 0)
        group_box_fishers_exact_test.layout().addWidget(
            self.combo_box_fishers_exact_test_direction, 0, 1)

        group_box_fishers_exact_test.layout().setColumnStretch(2, 1)

        # Mann-Whitney U Test
        group_box_mann_whitney_u_test = QGroupBox(
            self.tr('Mann-Whitney U Test'), self)

        (self.label_mann_whitney_u_test_divide,
         self.spin_box_mann_whitney_u_test_number_sections,
         self.label_mann_whitney_u_test_sections
         ) = wl_widgets.wl_widgets_number_sections(self)

        (self.label_mann_whitney_u_test_use_data,
         self.combo_box_mann_whitney_u_test_use_data
         ) = wl_widgets.wl_widgets_use_data_freq(self)
        (self.label_mann_whitney_u_test_direction,
         self.combo_box_mann_whitney_u_test_direction
         ) = wl_widgets.wl_widgets_direction(self)
        self.checkbox_mann_whitney_u_test_apply_correction = QCheckBox(
            self.tr('Apply continuity correction'), self)

        layout_mann_whitney_u_test_number_sections = wl_layout.Wl_Layout()
        layout_mann_whitney_u_test_number_sections.addWidget(
            self.label_mann_whitney_u_test_divide, 0, 0)
        layout_mann_whitney_u_test_number_sections.addWidget(
            self.spin_box_mann_whitney_u_test_number_sections, 0, 1)
        layout_mann_whitney_u_test_number_sections.addWidget(
            self.label_mann_whitney_u_test_sections, 0, 2)

        layout_mann_whitney_u_test_number_sections.setColumnStretch(3, 1)

        group_box_mann_whitney_u_test.setLayout(wl_layout.Wl_Layout())
        group_box_mann_whitney_u_test.layout().addLayout(
            layout_mann_whitney_u_test_number_sections, 0, 0, 1, 3)
        group_box_mann_whitney_u_test.layout().addWidget(
            self.label_mann_whitney_u_test_use_data, 1, 0)
        group_box_mann_whitney_u_test.layout().addWidget(
            self.combo_box_mann_whitney_u_test_use_data, 1, 1)
        group_box_mann_whitney_u_test.layout().addWidget(
            self.label_mann_whitney_u_test_direction, 2, 0)
        group_box_mann_whitney_u_test.layout().addWidget(
            self.combo_box_mann_whitney_u_test_direction, 2, 1)
        group_box_mann_whitney_u_test.layout().addWidget(
            self.checkbox_mann_whitney_u_test_apply_correction, 3, 0, 1, 3)

        group_box_mann_whitney_u_test.layout().setColumnStretch(3, 1)

        self.setLayout(wl_layout.Wl_Layout())
        self.layout().addWidget(group_box_z_score, 0, 0)
        self.layout().addWidget(group_box_students_t_test_2_sample, 1, 0)
        self.layout().addWidget(group_box_pearsons_chi_squared_test, 2, 0)
        self.layout().addWidget(group_box_fishers_exact_test, 3, 0)
        self.layout().addWidget(group_box_mann_whitney_u_test, 4, 0)

        self.layout().setContentsMargins(6, 4, 6, 4)
        self.layout().setRowStretch(5, 1)