def set_settings_from_dict(self, settings_dict): ref_settings_dict = {'stypes_tab_widget_currentIndex': 0} settings = gf.check_config(ref_settings_dict, settings_dict) self.current_tab_idx = int(settings['stypes_tab_widget_currentIndex'])
def set_settings_from_dict(self, settings_dict=None): ref_settings_dict = { 'pos': self.pos().toTuple(), 'size': self.size().toTuple(), 'windowState': False, 'main_splitter': None, 'splitter': None, 'scripts_tree_widget': None, } settings = gf.check_config(ref_settings_dict, settings_dict) self.move(settings['pos'][0], settings['pos'][1]) self.resize(settings['size'][0], settings['size'][1]) if settings['windowState']: self.setWindowState(QtCore.Qt.WindowMaximized) if settings['main_splitter']: self.main_splitter.restoreState( QtCore.QByteArray.fromHex( six.ensure_binary(settings['main_splitter']))) if settings['splitter']: self.splitter.restoreState( QtCore.QByteArray.fromHex( six.ensure_binary(settings['splitter']))) if settings['scripts_tree_widget']: self.revert_scripts_tree_state(settings['scripts_tree_widget'])
def set_settings_from_dict(self, settings_dict=None): ref_settings_dict = { 'watch_folders_dict': self.watch_folders_dict, } settings = gf.check_config(ref_settings_dict, settings_dict) self.watch_folders_dict = settings['watch_folders_dict']
def set_settings_from_dict(self, settings_dict=None): ref_settings_dict = { 'build_directory_checkbox': False, } settings = gf.check_config(ref_settings_dict, settings_dict) self.build_directory_checkbox.setChecked( settings['build_directory_checkbox'])
def set_settings_from_dict(self, settings_dict=None): ref_settings_dict = { 'presets_combo_box': 0, } settings = gf.check_config(ref_settings_dict, settings_dict) initial_index = self.presets_combo_box.currentIndex() self.presets_combo_box.setCurrentIndex(int(settings['presets_combo_box'])) if initial_index == int(settings['presets_combo_box']): self.apply_repo_sync_preset(initial_index)
def set_settings_from_dict(self, settings_dict=None): ref_settings_dict = { 'includeSubfoldersCheckBox': False, 'keepFileNameCheckBox': False, 'groupCheckinCheckBox': False, } settings = gf.check_config(ref_settings_dict, settings_dict) self.includeSubfoldersCheckBox.setChecked( settings['includeSubfoldersCheckBox']) self.keepFileNameCheckBox.setChecked(settings['keepFileNameCheckBox']) self.groupCheckinCheckBox.setChecked(settings['groupCheckinCheckBox'])
def set_settings_from_dict(self, settings_dict=None): ref_settings_dict = { 'geometry': None, 'edit_widndow_settings_dict': self.edit_window.get_settings_dict(), } settings = gf.check_config(ref_settings_dict, settings_dict) geo = settings['geometry'] if geo: self.setGeometry(QtCore.QRect(geo[0], geo[1], geo[2], geo[3])) else: self.resize(600, 500) self.edit_window.set_settings_from_dict( settings['edit_widndow_settings_dict'])
def set_settings_from_dict(self, settings_dict=None): ref_settings_dict = { 'pos': self.pos().toTuple(), 'size': self.size().toTuple(), 'windowState': False, 'opened_projects': '', 'current_active_project': '', } settings = gf.check_config(ref_settings_dict, settings_dict) self.move(settings['pos'][0], settings['pos'][1]) self.resize(settings['size'][0], settings['size'][1]) if settings['windowState']: self.setWindowState(QtCore.Qt.WindowMaximized)
def set_settings_from_dict(self, settings_dict=None): ref_settings_dict = { 'docked': 0, 'dock_pos': (200, 200), 'dock_size': (427, 690), 'dock_isFloating': 0, 'dock_tabArea': 1, } settings = gf.check_config(ref_settings_dict, settings_dict) self.docked = bool(int(settings['docked'])) self.dock_pos = gf.tuple_to_qsize(settings['dock_pos'], 'pos') self.dock_size = gf.tuple_to_qsize(settings['dock_size'], 'size') self.dock_is_floating = bool(int(settings['dock_isFloating'])) if int(settings['dock_tabArea']) == 2: self.dock_area = 'right' else: self.dock_area = 'left'