sas.qtgui.MainWindow package¶
Subpackages¶
- sas.qtgui.MainWindow.UI package
- Submodules
- sas.qtgui.MainWindow.UI.AboutUI module
- sas.qtgui.MainWindow.UI.AcknowledgementsUI module
- sas.qtgui.MainWindow.UI.CategoryManagerUI module
- sas.qtgui.MainWindow.UI.ChangeCategoryUI module
- sas.qtgui.MainWindow.UI.ChangeNameUI module
- sas.qtgui.MainWindow.UI.DataExplorerUI module
- sas.qtgui.MainWindow.UI.MainWindowUI module
- sas.qtgui.MainWindow.UI.TabbedFileLoadUI module
- sas.qtgui.MainWindow.UI.WelcomePanelUI module
- Module contents
Submodules¶
sas.qtgui.MainWindow.AboutBox module¶
sas.qtgui.MainWindow.Acknowledgements module¶
sas.qtgui.MainWindow.CategoryManager module¶
- class sas.qtgui.MainWindow.CategoryManager.Categories[source]¶
Bases:
object
Container class for accessing model categories
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.MainWindow.CategoryManager', '__doc__': '\n Container class for accessing model categories\n ', '__init__': <function Categories.__init__>, 'readCategoryInfo': <function Categories.readCategoryInfo>, 'saveCategories': <function Categories.saveCategories>, 'setupModelDict': <function Categories.setupModelDict>, 'regenerateModelDict': <function Categories.regenerateModelDict>, 'regenerateMasterDict': <function Categories.regenerateMasterDict>, 'modelToCategory': <function Categories.modelToCategory>, 'modelDict': <function Categories.modelDict>, 'categoryDict': <function Categories.categoryDict>, 'categoryList': <function Categories.categoryList>, '__dict__': <attribute '__dict__' of 'Categories' objects>, '__weakref__': <attribute '__weakref__' of 'Categories' objects>, '__annotations__': {}})¶
- __doc__ = '\n Container class for accessing model categories\n '¶
- __module__ = 'sas.qtgui.MainWindow.CategoryManager'¶
- __weakref__¶
list of weak references to the object
- regenerateMasterDict()[source]¶
regenerates self.master_category_dict from self.by_model_dict and self.model_enabled_dict
- class sas.qtgui.MainWindow.CategoryManager.CategoryManager(parent=None, manager=None)[source]¶
Bases:
QDialog
,Ui_CategoryManagerUI
- __doc__ = None¶
- __module__ = 'sas.qtgui.MainWindow.CategoryManager'¶
- class sas.qtgui.MainWindow.CategoryManager.ChangeCategory(parent=None, categories=None, model=None)[source]¶
Bases:
QDialog
,Ui_ChangeCategoryUI
Dialog for adding/removing categories for a single model
- __annotations__ = {}¶
- __doc__ = '\n Dialog for adding/removing categories for a single model\n '¶
- __module__ = 'sas.qtgui.MainWindow.CategoryManager'¶
- class sas.qtgui.MainWindow.CategoryManager.ToolTippedItemModel(parent=None)[source]¶
Bases:
QStandardItemModel
Subclass from QStandardItemModel to allow displaying tooltips in QTableView model.
- __annotations__ = {}¶
- __doc__ = '\n Subclass from QStandardItemModel to allow displaying tooltips in\n QTableView model.\n '¶
- __module__ = 'sas.qtgui.MainWindow.CategoryManager'¶
sas.qtgui.MainWindow.DataExplorer module¶
sas.qtgui.MainWindow.DataManager module¶
sas.qtgui.MainWindow.DataState module¶
- class sas.qtgui.MainWindow.DataState.DataState(data=None, parent=None)[source]¶
Bases:
object
Store information about data
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.MainWindow.DataState', '__doc__': '\n Store information about data\n ', '__init__': <function DataState.__init__>, '__str__': <function DataState.__str__>, 'clone': <function DataState.clone>, 'set_name': <function DataState.set_name>, 'get_name': <function DataState.get_name>, 'set_data': <function DataState.set_data>, 'get_data': <function DataState.get_data>, 'set_path': <function DataState.set_path>, 'get_path': <function DataState.get_path>, 'set_theory': <function DataState.set_theory>, 'get_theory': <function DataState.get_theory>, 'get_message': <function DataState.get_message>, '__dict__': <attribute '__dict__' of 'DataState' objects>, '__weakref__': <attribute '__weakref__' of 'DataState' objects>, '__annotations__': {}})¶
- __doc__ = '\n Store information about data\n '¶
- __module__ = 'sas.qtgui.MainWindow.DataState'¶
- __weakref__¶
list of weak references to the object
sas.qtgui.MainWindow.DroppableDataLoadWidget module¶
- class sas.qtgui.MainWindow.DroppableDataLoadWidget.DroppableDataLoadWidget(parent=None, guimanager=None)[source]¶
Bases:
QTabWidget
,Ui_DataLoadWidget
Overwrite drag and drop methods in the base class so users can drop files directly onto the Data Explorer
- __annotations__ = {}¶
- __doc__ = '\n Overwrite drag and drop methods in the base class\n so users can drop files directly onto the Data Explorer\n '¶
- __module__ = 'sas.qtgui.MainWindow.DroppableDataLoadWidget'¶
sas.qtgui.MainWindow.GuiManager module¶
sas.qtgui.MainWindow.MainWindow module¶
- class sas.qtgui.MainWindow.MainWindow.MainSasViewWindow(screen_resolution, parent=None)[source]¶
Bases:
QMainWindow
,Ui_SasView
- __annotations__ = {}¶
- __doc__ = None¶
- __module__ = 'sas.qtgui.MainWindow.MainWindow'¶
sas.qtgui.MainWindow.NameChanger module¶
sas.qtgui.MainWindow.PackageGatherer module¶
- class sas.qtgui.MainWindow.PackageGatherer.PackageGatherer[source]¶
Bases:
object
A class used to gather packages/modules used by SasView and their current installed version
- Method log_installed_packages:
Log version number of locally installed python packages
- Method log_imported_packages:
Log version number of python packages imported in this instance of SasView.
- Method get_imported_packages:
Get a dictionary of imported module version numbers
- Method remove_duplicate_modules:
Strip duplicate instances of each module
- Method format_unattainable_packages_list:
Format module names in the unattainable_modules list
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.MainWindow.PackageGatherer', '__doc__': ' A class used to gather packages/modules used by SasView and their current installed version\n\n :method log_installed_packages: Log version number of locally installed python packages\n :method log_imported_packages: Log version number of python packages imported in this instance of SasView.\n :method get_imported_packages: Get a dictionary of imported module version numbers\n :method remove_duplicate_modules: Strip duplicate instances of each module\n :method format_unattainable_packages_list: Format module names in the unattainable_modules list\n ', 'log_installed_modules': <function PackageGatherer.log_installed_modules>, 'log_imported_packages': <function PackageGatherer.log_imported_packages>, 'get_imported_packages': <function PackageGatherer.get_imported_packages>, 'remove_duplicate_modules': <function PackageGatherer.remove_duplicate_modules>, 'format_no_version_list': <function PackageGatherer.format_no_version_list>, '__dict__': <attribute '__dict__' of 'PackageGatherer' objects>, '__weakref__': <attribute '__weakref__' of 'PackageGatherer' objects>, '__annotations__': {}})¶
- __doc__ = ' A class used to gather packages/modules used by SasView and their current installed version\n\n :method log_installed_packages: Log version number of locally installed python packages\n :method log_imported_packages: Log version number of python packages imported in this instance of SasView.\n :method get_imported_packages: Get a dictionary of imported module version numbers\n :method remove_duplicate_modules: Strip duplicate instances of each module\n :method format_unattainable_packages_list: Format module names in the unattainable_modules list\n '¶
- __module__ = 'sas.qtgui.MainWindow.PackageGatherer'¶
- __weakref__¶
list of weak references to the object
- format_no_version_list(modules_dict, no_version_list)[source]¶
Format module names in the no_version_list list
The unattainable_modules is a list of modules whose version number could not be found. This method rename each module in the unattainable_modules to it’s parent modules name, remove modules that already have a version number and remove duplicate modules from the no_version_list list. Entries may appear in the no_version_list if they are a class in a module, and the version number could not be ascertained from the class.
- Parameters:
modules_dict (dict) – A dictionary with the module names as the key, with their respective version numbers as the value.
no_version_list (list) – A list of modules whose version number could not be found.
- Returns:
A reduced / clean list of modules whose version number could not be found
- Return type:
dict
- get_imported_packages()[source]¶
Get a dictionary of imported package version numbers
Use a variety of method, for example a module.version call, to attempt to get the module version of each module that has been imported in this instance of running SasView. The sys.modules command lists the imported modules. A list of modules whose version number cannot be found is also included.
- Returns:
A dictionary with the package names as the key, with their respective version numbers as the value.
- Return type:
dict
- log_imported_packages()[source]¶
Log version number of python packages imported in this instance of SasView.
Use the get_imported_packages method to to create a dictionary of installed modules as the keys, with their respective version numbers as the values. There may be some packages whose version number is unattainable.
- Returns:
Nothing
- Return type:
None
- log_installed_modules()[source]¶
Log version number of locally installed python packages
Use pip list to create a dictionary of installed modules as the keys, with their respective version numbers as the values. Only packages available through pip will be included.
:returns:Nothing :rtype: None
- remove_duplicate_modules(modules_dict)[source]¶
Strip duplicate instances of each module
Multiple instances of one module can be keys of the dictionary of module version numbers generated by the method get_imported_packages. This is because if an individual class is imported from a module, then each class would be listed in sys.modules. For example the command from PyQt5.QtWidgets import QMainWindow, QMdiArea lead to both QMainWindow and QMdiArea being keys, when in reality they are both part of PyQt5. This method save the first instance of each module, unless the version numbers are different.
- Parameters:
modules_dict (dict) – A dictionary with the module names as the key, with their respective version numbers as the value.
- Returns:
A reduced / cleaned dictionary with the module names as the key, with their respective version numbers as the value.
- Return type:
dict