Exemplo n.º 1
0
	def populate_main_gui_general_settings(self):
		dom = self.dom
		RefLData = dom.getElementsByTagName('RefLData')
		node_0 = RefLData[0]
		
		q_step = self.getNodeValue(node_0, 'q_step')
		if q_step == '':
			q_step = '0.001'
		self.parent.ui.qStep.setText(q_step)
		
		angle_offset = self.getNodeValue(node_0, 'angle_offset')
		self.parent.ui.angleOffsetValue.setText(angle_offset)
		
		angle_offset_error = self.getNodeValue(node_0, 'angle_offset_error')
		self.parent.ui.angleOffsetError.setText(angle_offset_error)
		
		scaling_factor_file = self.getNodeValue(node_0, 'scaling_factor_file')
		self.parent.full_scaling_factor_file_name = scaling_factor_file
		short_scaling_factor_file = os.path.basename(scaling_factor_file)
		self.parent.ui.scalingFactorFile.setText(short_scaling_factor_file)
		o_scaling_factor_widget = ScalingFactorWidgetsHandler(parent = self.parent)
		o_scaling_factor_widget.fill_incident_medium_list(scaling_factor_file)
		self.parent.path_ascii = os.path.dirname(scaling_factor_file)
		scaling_factor_flag = str2bool(self.getNodeValue(node_0, 'scaling_factor_flag'))
		o_scaling_factor_widget.checkbox(status = scaling_factor_flag)
		o_scaling_factor_widget.set_enabled(status = scaling_factor_flag)
    def __init__(self, parent=None):
        self.parent = parent
        
        settings = QSettings()
        self.parent.path_ascii = str(settings.value("path_ascii", 
                                                    os.path.expanduser('~')).toString())

        self.parent.path_config = str(settings.value("path_config", 
                                                    os.path.expanduser('~')).toString())
        
        o_user_config = UserConfiguration()
        ylog_value = str(settings.value("is_reduced_plot_stitching_tab_ylog").toString())
        if ylog_value is not '':
            o_user_config.is_reduced_plot_stitching_tab_ylog = str2bool(ylog_value)
        xlog_value = str(settings.value("is_reduced_plot_stitching_tab_xlog").toString())
        if xlog_value is not '':
            o_user_config.is_reduced_plot_stitching_tab_xlog = str2bool(xlog_value)
        self.parent.o_user_configuration = o_user_config
Exemplo n.º 3
0
    def __init__(self, parent=None):
        self.parent = parent

        settings = QSettings()
        self.parent.path_ascii = str(
            settings.value("path_ascii", os.path.expanduser('~')).toString())

        self.parent.path_config = str(
            settings.value("path_config", os.path.expanduser('~')).toString())

        o_user_config = UserConfiguration()
        ylog_value = str(
            settings.value("is_reduced_plot_stitching_tab_ylog").toString())
        if ylog_value is not '':
            o_user_config.is_reduced_plot_stitching_tab_ylog = str2bool(
                ylog_value)
        xlog_value = str(
            settings.value("is_reduced_plot_stitching_tab_xlog").toString())
        if xlog_value is not '':
            o_user_config.is_reduced_plot_stitching_tab_xlog = str2bool(
                xlog_value)
        self.parent.o_user_configuration = o_user_config
Exemplo n.º 4
0
    def populate_main_gui_general_settings(self):
        dom = self.dom
        RefLData = dom.getElementsByTagName('RefLData')
        node_0 = RefLData[0]

        q_step = self.getNodeValue(node_0, 'q_step')
        if q_step == '':
            q_step = '0.01'
        self.parent.ui.qStep.setText(q_step)

        q_min = self.getNodeValue(node_0, 'q_min')
        if q_min == '':
            q_min = '0.005'
        _gui_metadata = self.parent.gui_metadata
        _gui_metadata['q_min'] = q_min
        self.parent.gui_metadata = _gui_metadata

        angle_offset = self.getNodeValue(node_0, 'angle_offset')
        self.parent.ui.angleOffsetValue.setText(angle_offset)

        angle_offset_error = self.getNodeValue(node_0, 'angle_offset_error')
        self.parent.ui.angleOffsetError.setText(angle_offset_error)

        scaling_factor_file = self.getNodeValue(node_0, 'scaling_factor_file')
        self.parent.full_scaling_factor_file_name = scaling_factor_file
        short_scaling_factor_file = os.path.basename(scaling_factor_file)
        self.parent.ui.scalingFactorFile.setText(short_scaling_factor_file)

        o_scaling_factor_widget = ScalingFactorWidgetsHandler(
            parent=self.parent)
        o_scaling_factor_widget.fill_incident_medium_list(scaling_factor_file)
        #+1 to make mantid friendly
        index_selected = int(
            self.getNodeValue(node_0, 'incident_medium_index_selected')) + 1
        o_scaling_factor_widget.set_index_selected(index_selected)

        self.parent.path_ascii = os.path.dirname(scaling_factor_file)
        scaling_factor_flag = str2bool(
            self.getNodeValue(node_0, 'scaling_factor_flag'))
        o_scaling_factor_widget.checkbox(status=scaling_factor_flag)
        o_scaling_factor_widget.set_enabled(status=scaling_factor_flag)