- Timestamp:
- Sep 13, 2017 7:39:49 AM (7 years ago)
- Branches:
- ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- a14a2b0
- Parents:
- fef38e8
- Location:
- src/sas/qtgui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/MainWindow/GuiManager.py
rfef38e8 r3c8242c 96 96 self._helpView = QtWebKit.QWebView() 97 97 # Needs URL like path, so no path.join() here 98 GuiUtils._init()99 98 self._helpLocation = GuiUtils.HELP_DIRECTORY_LOCATION + "/index.html" 100 99 -
src/sas/qtgui/Utilities/GuiUtils.py
rfef38e8 r3c8242c 94 94 return config_module 95 95 96 def _init(): 97 # Get APP folder 98 PATH_APP = get_app_dir() 99 DATAPATH = PATH_APP 100 101 # Read in the local config, which can either be with the main 102 # application or in the installation directory 103 config = _find_local_config('local_config', PATH_APP) 104 105 if config is None: 106 config = _find_local_config('local_config', os.getcwd()) 96 97 # Get APP folder 98 PATH_APP = get_app_dir() 99 DATAPATH = PATH_APP 100 101 # Read in the local config, which can either be with the main 102 # application or in the installation directory 103 config = _find_local_config('local_config', PATH_APP) 104 105 if config is None: 106 config = _find_local_config('local_config', os.getcwd()) 107 else: 108 pass 109 110 c_conf_dir = CustomDir.setup_conf_dir(PATH_APP) 111 112 custom_config = _find_local_config('custom_config', c_conf_dir) 113 if custom_config is None: 114 custom_config = _find_local_config('custom_config', os.getcwd()) 115 if custom_config is None: 116 msgConfig = "Custom_config file was not imported" 117 118 #read some constants from config 119 APPLICATION_STATE_EXTENSION = config.APPLICATION_STATE_EXTENSION 120 APPLICATION_NAME = config.__appname__ 121 SPLASH_SCREEN_PATH = config.SPLASH_SCREEN_PATH 122 WELCOME_PANEL_ON = config.WELCOME_PANEL_ON 123 SPLASH_SCREEN_WIDTH = config.SPLASH_SCREEN_WIDTH 124 SPLASH_SCREEN_HEIGHT = config.SPLASH_SCREEN_HEIGHT 125 SS_MAX_DISPLAY_TIME = config.SS_MAX_DISPLAY_TIME 126 if not WELCOME_PANEL_ON: 127 WELCOME_PANEL_SHOW = False 128 else: 129 WELCOME_PANEL_SHOW = True 130 try: 131 DATALOADER_SHOW = custom_config.DATALOADER_SHOW 132 TOOLBAR_SHOW = custom_config.TOOLBAR_SHOW 133 FIXED_PANEL = custom_config.FIXED_PANEL 134 if WELCOME_PANEL_ON: 135 WELCOME_PANEL_SHOW = custom_config.WELCOME_PANEL_SHOW 136 PLOPANEL_WIDTH = custom_config.PLOPANEL_WIDTH 137 DATAPANEL_WIDTH = custom_config.DATAPANEL_WIDTH 138 GUIFRAME_WIDTH = custom_config.GUIFRAME_WIDTH 139 GUIFRAME_HEIGHT = custom_config.GUIFRAME_HEIGHT 140 CONTROL_WIDTH = custom_config.CONTROL_WIDTH 141 CONTROL_HEIGHT = custom_config.CONTROL_HEIGHT 142 DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE 143 CLEANUP_PLOT = custom_config.CLEANUP_PLOT 144 # custom open_path 145 open_folder = custom_config.DEFAULT_OPEN_FOLDER 146 if open_folder != None and os.path.isdir(open_folder): 147 DEFAULT_OPEN_FOLDER = os.path.abspath(open_folder) 107 148 else: 108 pass109 110 c_conf_dir = CustomDir.setup_conf_dir(PATH_APP)111 112 custom_config = _find_local_config('custom_config', c_conf_dir)113 if custom_config is None:114 custom_config = _find_local_config('custom_config', os.getcwd())115 if custom_config is None:116 msgConfig = "Custom_config file was not imported"117 118 #read some constants from config119 APPLICATION_STATE_EXTENSION = config.APPLICATION_STATE_EXTENSION120 APPLICATION_NAME = config.__appname__121 SPLASH_SCREEN_PATH = config.SPLASH_SCREEN_PATH122 WELCOME_PANEL_ON = config.WELCOME_PANEL_ON123 SPLASH_SCREEN_WIDTH = config.SPLASH_SCREEN_WIDTH124 SPLASH_SCREEN_HEIGHT = config.SPLASH_SCREEN_HEIGHT125 SS_MAX_DISPLAY_TIME = config.SS_MAX_DISPLAY_TIME126 if not WELCOME_PANEL_ON:127 WELCOME_PANEL_SHOW = False128 else:129 WELCOME_PANEL_SHOW = True130 try:131 DATALOADER_SHOW = custom_config.DATALOADER_SHOW132 TOOLBAR_SHOW = custom_config.TOOLBAR_SHOW133 FIXED_PANEL = custom_config.FIXED_PANEL134 if WELCOME_PANEL_ON:135 WELCOME_PANEL_SHOW = custom_config.WELCOME_PANEL_SHOW136 PLOPANEL_WIDTH = custom_config.PLOPANEL_WIDTH137 DATAPANEL_WIDTH = custom_config.DATAPANEL_WIDTH138 GUIFRAME_WIDTH = custom_config.GUIFRAME_WIDTH139 GUIFRAME_HEIGHT = custom_config.GUIFRAME_HEIGHT140 CONTROL_WIDTH = custom_config.CONTROL_WIDTH141 CONTROL_HEIGHT = custom_config.CONTROL_HEIGHT142 DEFAULT_PERSPECTIVE = custom_config.DEFAULT_PERSPECTIVE143 CLEANUP_PLOT = custom_config.CLEANUP_PLOT144 # custom open_path145 open_folder = custom_config.DEFAULT_OPEN_FOLDER146 if open_folder != None and os.path.isdir(open_folder):147 DEFAULT_OPEN_FOLDER = os.path.abspath(open_folder)148 else:149 DEFAULT_OPEN_FOLDER = PATH_APP150 except AttributeError:151 DATALOADER_SHOW = True152 TOOLBAR_SHOW = True153 FIXED_PANEL = True154 WELCOME_PANEL_SHOW = False155 PLOPANEL_WIDTH = config.PLOPANEL_WIDTH156 DATAPANEL_WIDTH = config.DATAPANEL_WIDTH157 GUIFRAME_WIDTH = config.GUIFRAME_WIDTH158 GUIFRAME_HEIGHT = config.GUIFRAME_HEIGHT159 CONTROL_WIDTH = -1160 CONTROL_HEIGHT = -1161 DEFAULT_PERSPECTIVE = None162 CLEANUP_PLOT = False163 149 DEFAULT_OPEN_FOLDER = PATH_APP 164 165 #DEFAULT_STYLE = config.DEFAULT_STYLE 166 167 PLUGIN_STATE_EXTENSIONS = config.PLUGIN_STATE_EXTENSIONS 168 OPEN_SAVE_MENU = config.OPEN_SAVE_PROJECT_MENU 169 VIEW_MENU = config.VIEW_MENU 170 EDIT_MENU = config.EDIT_MENU 171 extension_list = [] 172 if APPLICATION_STATE_EXTENSION is not None: 173 extension_list.append(APPLICATION_STATE_EXTENSION) 174 EXTENSIONS = PLUGIN_STATE_EXTENSIONS + extension_list 175 try: 176 PLUGINS_WLIST = '|'.join(config.PLUGINS_WLIST) 177 except AttributeError: 178 PLUGINS_WLIST = '' 179 APPLICATION_WLIST = config.APPLICATION_WLIST 180 IS_WIN = True 181 IS_LINUX = False 182 CLOSE_SHOW = True 183 TIME_FACTOR = 2 184 NOT_SO_GRAPH_LIST = ["BoxSum"] 150 except AttributeError: 151 DATALOADER_SHOW = True 152 TOOLBAR_SHOW = True 153 FIXED_PANEL = True 154 WELCOME_PANEL_SHOW = False 155 PLOPANEL_WIDTH = config.PLOPANEL_WIDTH 156 DATAPANEL_WIDTH = config.DATAPANEL_WIDTH 157 GUIFRAME_WIDTH = config.GUIFRAME_WIDTH 158 GUIFRAME_HEIGHT = config.GUIFRAME_HEIGHT 159 CONTROL_WIDTH = -1 160 CONTROL_HEIGHT = -1 161 DEFAULT_PERSPECTIVE = None 162 CLEANUP_PLOT = False 163 DEFAULT_OPEN_FOLDER = PATH_APP 164 165 #DEFAULT_STYLE = config.DEFAULT_STYLE 166 167 PLUGIN_STATE_EXTENSIONS = config.PLUGIN_STATE_EXTENSIONS 168 OPEN_SAVE_MENU = config.OPEN_SAVE_PROJECT_MENU 169 VIEW_MENU = config.VIEW_MENU 170 EDIT_MENU = config.EDIT_MENU 171 extension_list = [] 172 if APPLICATION_STATE_EXTENSION is not None: 173 extension_list.append(APPLICATION_STATE_EXTENSION) 174 EXTENSIONS = PLUGIN_STATE_EXTENSIONS + extension_list 175 try: 176 PLUGINS_WLIST = '|'.join(config.PLUGINS_WLIST) 177 except AttributeError: 178 PLUGINS_WLIST = '' 179 APPLICATION_WLIST = config.APPLICATION_WLIST 180 IS_WIN = True 181 IS_LINUX = False 182 CLOSE_SHOW = True 183 TIME_FACTOR = 2 184 NOT_SO_GRAPH_LIST = ["BoxSum"] 185 185 186 186 187 class Communicate(QtCore.QObject):
Note: See TracChangeset
for help on using the changeset viewer.