# sas.qtgui.MainWindow package

## Subpackages

- sas.qtgui.MainWindow.UI package
  - Submodules
  - sas.qtgui.MainWindow.UI.AcknowledgementsUI module
    - `Ui_Acknowledgements`
      - `Ui_Acknowledgements.retranslateUi()`
      - `Ui_Acknowledgements.setupUi()`
  - sas.qtgui.MainWindow.UI.CategoryManagerUI module
    - `Ui_CategoryManagerUI`
      - `Ui_CategoryManagerUI.retranslateUi()`
      - `Ui_CategoryManagerUI.setupUi()`
  - sas.qtgui.MainWindow.UI.ChangeCategoryUI module
    - `Ui_ChangeCategoryUI`
      - `Ui_ChangeCategoryUI.retranslateUi()`
      - `Ui_ChangeCategoryUI.setupUi()`
  - sas.qtgui.MainWindow.UI.ChangeNameUI module
    - `Ui_ChangeCategoryUI`
      - `Ui_ChangeCategoryUI.retranslateUi()`
      - `Ui_ChangeCategoryUI.setupUi()`
  - sas.qtgui.MainWindow.UI.DataExplorerUI module
    - `Ui_DataLoadWidget`
      - `Ui_DataLoadWidget.retranslateUi()`
      - `Ui_DataLoadWidget.setupUi()`
  - sas.qtgui.MainWindow.UI.MainWindowUI module
    - `Ui_SasView`
      - `Ui_SasView.retranslateUi()`
      - `Ui_SasView.setupUi()`
  - sas.qtgui.MainWindow.UI.TabbedFileLoadUI module
    - `Ui_DataLoadWidget`
      - `Ui_DataLoadWidget.retranslateUi()`
      - `Ui_DataLoadWidget.setupUi()`
  - sas.qtgui.MainWindow.UI.WelcomePanelUI module
    - `Ui_WelcomePanelUI`
      - `Ui_WelcomePanelUI.retranslateUi()`
      - `Ui_WelcomePanelUI.setupUi()`
  - Module contents

## Submodules

## sas.qtgui.MainWindow.Acknowledgements module

class sas.qtgui.MainWindow.Acknowledgements.Acknowledgements(parent=None)

  Bases: `QDialog`, `Ui_Acknowledgements`

  addText()

    Modify the labels so the text corresponds to the current version

  staticMetaObject = PySide6.QtCore.QMetaObject("Acknowledgements" inherits "QDialog": )

## sas.qtgui.MainWindow.CategoryManager module

class sas.qtgui.MainWindow.CategoryManager.Categories

  Bases: `object`

  Container class for accessing model categories

  categoryDict()

    Getter for the category dict

  categoryList()

    Getter for the category list

  modelDict()

    Getter for the model list

  modelToCategory()

    Getter for the model->category dict

  readCategoryInfo()

    Reads the categories in from file

  regenerateMasterDict()

    regenerates self.master_category_dict from self.by_model_dict and self.model_enabled_dict

  regenerateModelDict()

    Regenerates self.by_model_dict which has each model name as the key and the list of categories belonging to that model along with the enabled mapping

  saveCategories()

    Serializes categorization info to file

  setupModelDict()

    create a dictionary for model->category mapping

class sas.qtgui.MainWindow.CategoryManager.CategoryManager(parent=None, manager=None)

  Bases: `QDialog`, `Ui_CategoryManagerUI`

  displayHelp()
  initializeGlobals()

    Initialize global variables used in this class

  initializeModelList()

    Model category combo setup

  initializeModels()

    Set up models and views

  initializeSignals()
    Returns:

  onClose()

    Save the category file before exiting

  onEnableAll(isChecked)

    Respond to the Enable/Disable All checkbox

  onListChanged(item)
  onListSelection()

    Respond to row selection and update GUI

  onModify()

    Show the Change Category dialog - modal

  onReset()

    Reload the saved categories

  onSearch()

    Respond to text entered in search field

  selectedModels()

    Returns a list of selected models

  setTableProperties(table)

    Setting table properties

  staticMetaObject = PySide6.QtCore.QMetaObject("CategoryManager" inherits "QDialog": )

class sas.qtgui.MainWindow.CategoryManager.ChangeCategory(parent=None, categories=None, model=None)

  Bases: `QDialog`, `Ui_ChangeCategoryUI`

  Dialog for adding/removing categories for a single model

  initializeElements()

    Initialize local GUI elements with information from the Categories object

  initializeList()

    Initialize the category list for the given model

  initializeSignals()

    Initialize signals for UI elements

  listCategories()

    Returns the list of categories from the QListWidget

  onAdd()

    Add the chosen category to the list

  onAddChoice()

    Respond to the type selection for new category

  onListSelection()

    Respond to selection in the category list view

  onOK()

    Accept the new categories for the model

  onRemove()

    Remove selected categories in the list

  selectedModels()

    Returns a list of selected models

  staticMetaObject = PySide6.QtCore.QMetaObject("ChangeCategory" inherits "QDialog": )

class sas.qtgui.MainWindow.CategoryManager.ToolTippedItemModel(parent=None)

  Bases: `QStandardItemModel`

  Subclass from QStandardItemModel to allow displaying tooltips in QTableView model.

  headerData(section, orientation, role=ItemDataRole.DisplayRole)

    Displays tooltip for each column’s header :param section: :param orientation: :param role: :return:

  staticMetaObject = PySide6.QtCore.QMetaObject("ToolTippedItemModel" inherits "QStandardItemModel": )

## sas.qtgui.MainWindow.DataExplorer module

class sas.qtgui.MainWindow.DataExplorer.DataExplorerWindow(parent=None, guimanager=None, manager=None)

  Bases: `DroppableDataLoadWidget`

  addDataPlot2D(plot_set, item)

    Create a new 2D plot and add it to the workspace

  addPlot(new_plot)

    Helper method for plot bookkeeping

  add_data(data_list)

    Update the data manager with new items

  allDataForModel(model)
  static appendOrUpdatePlot(self, data, plot)
  appendPlot()

    Add data set(s) to the existing matplotlib chart

  changeName()

    Open a modal window that can change the display name of the selected data

  changeTabs(tab=0)

    Switch tabs of the data explorer 0: data tab 1: theory tab

  chooseFiles()

    Shows the Open file dialog and returns the chosen path(s)

  cloneTheory(item_from)

    Manually clone theory items into a new HashableItem

  closeAllPlots()

    Close all currently displayed plots

  closeEvent(event)

    Overwrite the close event - no close!

  closePlotsForItem(item)

    Given standard item, close all its currently displayed plots

  closeResultPanelOnDelete(data)

    Given a data1d/2d object, close the fitting results panel if currently populated with the data

  contextMenu()

    Define actions and layout of the right click context menu

  createSendToMenu()
  property default_load_location: str
  deleteAllItems()

    Deletes all datasets from both model and theory_model

  deleteFile(event)

    Delete selected rows from the model

  deleteIndices(indices)

    Delete model idices from the current view

  deleteIntermediateTheoryPlotsByTabId(tab_id)

    Given a model’s ID, deletes all items in the theory item model which reference the same ID. Useful in the case of intermediate results disappearing when changing calculations (in which case you don’t want them to be retained in the list).

  deleteTheory(event)

    Delete selected rows from the theory model

  displayData(data_list, id=None)

    Forces display of charts for the given data set

  displayDataByName(name=None, is_data=True, id=None)

    Forces display of charts for the given name

  displayHelp()

    Show the “Loading data” section of help

  enableGraphCombo(combo_text)

    Enables/disables “Assign Plot” elements

  extShowEditDataMask()
  flatDataForModel(model)

    Get a flat “name:data1d/2d” dict for all items in the model, including children

  freezeCheckedData()

    Convert checked results (fitted model, residuals) into separate dataset.

  freezeDataToItem(data=None)

    Freeze given set of data to main model

  freezeItem(item=None)

    Freeze given item

  freezeSelectedItems()

    Freeze selected items

  freezeTheory(event)

    Freeze selected theory rows.

    “Freezing” means taking the plottable data from the Theory item and copying it to a separate top-level item in Data.

  getAllData()

    Get items from both data and theory models

  getAllFlatData()

    Get items from both data and theory models

  getDataForID(id)
  getItemForID(id)
  getSerializedData()

    converts all datasets into serializable dictionary

  getWlist()

    Wildcards of files we know the format of.

  initPerspectives()

    Populate the Perspective combobox and define callbacks

  isPlotShown(plot)

    Checks currently shown plots and returns true if match

  itemFromDisplayName(name)

    Retrieves model item corresponding to the given display name

  loadAnalysis()

    Called when the “Open Analysis” menu item chosen.

  loadComplete(output)

    Post message to status bar and update the data manager

  loadFailed(reason)
  loadFile(event=None)

    Called when the “Load” button pressed. Opens the Qt “Open File…” dialog

  loadFolder(event=None)

    Called when the “File/Load Folder” menu item chosen. Opens the Qt “Open Folder…” dialog

  loadFromURL(url)

    Threaded file load

  loadProject()

    Called when the “Open Project” menu item chosen.

  minimizeAllPlots()

    Minimize all currently displayed plots

  newPlot()

    Select checked data and plot it

  onAnalysisUpdate(new_perspective_name: str)

    Update the perspective combo index based on passed string

  onCustomContextMenu(position)

    Show the right-click context menu in the data treeview

  onDataReplaced()

    Called when data is to be replaced in the current fitting tab.

  onFileListChanged(item)

    Slot for model (data/theory) changes. Currently only reacting to checkbox selection.

  onFileListDeselected()

    Slot for actionDeselect

  onFileListSelected()

    Slot for actionSelect

  onTabSwitch(index)

    Callback for tab switching signal

  plotData(plots, transform=True)

    Takes 1D/2D data and generates a single plot (1D) or multiple plots (2D)

  quickData3DPlot()

    Slowish 3D plot

  quickDataPlot()

    Frozen plot - display an image of the plot

  readData(path)

    verbatim copy-paste from `sasgui.guiframe.local_perspectives.data_loader.data_loader.py` slightly modified for clarity

  readProject(filename)

    Read out datasets and perspective information from file

  recursivelyCloneItem(item)

    Clone QStandardItem() object

  saveAnalysis(data, tab_id=1, ext='fitv')

    Called when the “Save Analysis” menu item chosen.

  saveAsAnalysisFile(tab_id=1, extension='fitv')

    Show the save as… dialog and return the chosen filepath

  saveDataAs()

    Save the data points as either txt or xml

  saveDataToFile(outfile)

    Save every dataset to a json file

  saveProject()

    Called when the “Save Project” menu item chosen.

  selectData(index)

    Callback method for modifying the TreeView on Selection Options change

  selectedItems()

    Returns the selected items from the current view

  sendData(event=None)

    Send selected item data to the current perspective and set the relevant notifiers

  sendItemToPerspective(item, tab_index=None)

    Send the passed item data to the current perspective and set the relevant notifiers

  sendToMenu(hasSubmenu=False)
  setCheckItems(status=CheckState.Unchecked)

    Sets requested checkbox status on selected indices

  setItemsCheckability(model, dimension=None, checked=False)

    For a given model, check or uncheck all items of given dimension

  showDataInfo()

    Show a simple read-only text edit with data information.

  showEditDataMask(data=None)

    Mask Editor for 2D plots

  staticMetaObject = PySide6.QtCore.QMetaObject("DataExplorerWindow" inherits "DroppableDataLoadWidget": )
  updateGraphCombo(graph_list)

    Modify Graph combo box on graph add/delete

  updateGraphCount(graphs)

    Modify the graph name combo and potentially remove deleted graphs

  updateModel(data, p_file)

    Add data and Info fields to the model item

  updateModelFromData(data)

    Given data from analysis/project file, create indices and populate data/theory models

  updateModelFromPerspective(model_item)

    Receive an update model item from a perspective Make sure it is valid and if so, replace it in the model

  updatePerspectiveCombo(index)

    Notify the gui manager about the new perspective chosen.

  updatePerspectiveWithProperties(key, value)
  updatePlot(data)

    Modify existing plot for immediate response and returns True. Returns false, if the plot does not exist already.

  updatePlotName(name_tuple)

    Modify the name of the current plot

  updateTheoryFromPerspective(model_item)

    Receive an update theory item from a perspective Make sure it is valid and if so, replace/add in the model

  updateWithBatchPages(all_data)

    Checks all properties and see if there are any batch pages defined. If so, pull out relevant indices and recreate the batch page(s)

## sas.qtgui.MainWindow.DataManager module

This module manages all data loaded into the application. Data_manager makes available all data loaded for the current perspective.

All modules “creating Data” posts their data to data_manager . Data_manager make these new data available for all other perspectives.

class sas.qtgui.MainWindow.DataManager.DataManager

  Bases: `object`

  Manage a list of data

  add_data(data_list)

    receive a list of data items for storage

  assign(other)
  create_gui_data(data, path=None)

    Receive data from loader and create a data to use for guiframe

  delete_by_id(id_list=None)

    save data and path

  delete_by_name(name_list=None)

    save data and path

  delete_data(data_id, theory_id=None, delete_all=False)
  delete_theory(data_id, theory_id)
  freeze(theory_id)
  freeze_theory(data_id, theory_id)
  get_all_data()

    return list of all available data

  get_by_id(id_list=None)
  get_by_name(name_list=None)

    return a list of data given a list of data names

  get_data_state(data_id)

    Send list of selected data

  get_message()

    return message

  load_from_readable(fp)

    load content from tp to stored_data (a .read()-supporting file-like object)

  remove_item_from_data_name_dict(name)

    Remove ‘name’ or ‘name [n]’ from data_name_dict

  rename(name)

    rename data

  save_to_writable(fp)

    save content of stored_data to fp (a .write()-supporting file-like object)

  update_data(prev_data, new_data)
  update_stored_data(name_list=None)

    update stored data after deleting files in Data Explorer

  update_theory(theory, data_id=None, state=None)

## sas.qtgui.MainWindow.DataState module

class sas.qtgui.MainWindow.DataState.DataState(data=None, parent=None)

  Bases: `object`

  Store information about data

  clone()
  get_data()
  get_message()

    return message

  get_name()
  get_path()

    return the path of the loaded data

  get_theory()
  set_data(data)
  set_name(name)
  set_path(path)

    Set the path of the loaded data

  set_theory(theory_data, theory_state=None)

## sas.qtgui.MainWindow.DroppableDataLoadWidget module

class sas.qtgui.MainWindow.DroppableDataLoadWidget.DroppableDataLoadWidget(parent=None, guimanager=None)

  Bases: `QTabWidget`, `Ui_DataLoadWidget`

  Overwrite drag and drop methods in the base class so users can drop files directly onto the Data Explorer

  closeEvent(event)

    Overwrite the close event - no close!

  dragEnterEvent(event)

    Called automatically on a drag into the treeview

  dragIsOK(event)

    Return True if the event contain URLs

  dragMoveEvent(event)

    Called automatically when a drag is moved inside the treeview

  dropEvent(event)

    Called automatically when a drop is added to the treeview.

  staticMetaObject = PySide6.QtCore.QMetaObject("DroppableDataLoadWidget" inherits "QTabWidget": )

## sas.qtgui.MainWindow.GuiManager module

class sas.qtgui.MainWindow.GuiManager.GuiManager(parent=None)

  Bases: `object`

  Main SasView window functionality

  actionAbout()

    Open the About box

  actionAcknowledge()

    Open the Acknowledgements widget

  actionAddMult_Models()
  actionAdd_Custom_Model()
  actionArrange_Icons()

    Arranges all iconified windows at the bottom of the workspace

  actionCascade()

    Arranges all the child windows in a cascade pattern.

  actionCategory_Manager()
  actionCheck_for_update()

    Menu Help/Check for Update

  actionClosePlots()

    Closes all Plotters and Plotter2Ds.

  actionCombine_Batch_Fit()
  actionConstrained_Fit()

    Add a new Constrained and Simult. Fit page in the fitting perspective.

  actionCopy()

    Response to copy menu / button trigger

  actionCorfunc()

    Change to the Corfunc perspective

  actionData_Operation()
  actionDensity_Volume_Calculator()
  actionDocumentation()

    Display the documentation

    TODO: use QNetworkAccessManager to assure _helpLocation is valid

  actionEditMask()
  actionEdit_Custom_Model()
  actionExcel()

    Send a signal to the fitting perspective so parameters can be saved to the clipboard

  actionFile_Converter()

    Shows the File Converter widget.

  actionFit_Options()
  actionFit_Results()
  actionFitting()

    Change to the Fitting perspective

  actionFreeze_Theory()

    Convert a child index with data into a separate top level dataset

  actionGPU_Options()

    Load the OpenCL selection dialog if the fitting perspective is active

  actionGeneric_Scattering_Calculator()
  actionHide_DataExplorer()

    Toggle Data Explorer vsibility

  actionHide_LogExplorer()

    Toggle Data Explorer vsibility

  actionHide_Toolbar()

    Toggle toolbar vsibility

  actionImage_Viewer()
  actionInvariant()

    Change to the Invariant perspective

  actionInversion()

    Change to the Inversion perspective

  actionKiessig_Calculator()
  actionLatex()

    Send a signal to the fitting perspective so parameters can be saved to the clipboard

  actionLoadData()

    Menu File/Load Data File(s)

  actionLoad_Data_Folder()

    Menu File/Load Data Folder

  actionManage_Custom_Models()
  actionMarketplace()

    Open the marketplace link in default browser

  actionMinimizePlots()

    Minimizes all Plotters and Plotter2Ds.

  actionMuMag_Fitter()
  actionNew_Fit_Page()

    Add a new, empty Fit page in the fitting perspective.

  actionNext()

    Gives the input focus to the next window in the list of child windows.

  actionOpen_Analysis()
  actionOpen_Preferences()
  actionOpen_Project()

    Menu Open Project

  actionOrientation_Viewer()

    Make sasmodels orientation & jitter viewer available

  actionPaste()

    Response to paste menu / button trigger

  actionPrevious()

    Gives the input focus to the previous window in the list of child windows.

  actionPython_Shell_Editor()

    Display the Jupyter console as a docked widget.

  actionQuit()

    Close the reactor, exit the application.

  actionRedo()
  actionReparameterize_Model()
  actionReport()

    Show the Fit Report dialog.

  actionReset()
  actionSAS_Resolution_Estimator()
  actionSLD_Calculator()
  actionSaveParamsAs()

    Menu Save Params

  actionSave_Analysis()

    Menu File/Save Analysis

  actionSave_Project()

    Menu Save Project

  actionShape2SAS_Calculator()
  actionShow_Grid_Window()
  actionSizeDistribution()

    Change to the Size perspective

  actionSlit_Size_Calculator()
  actionStartup_Settings()
  actionTile()

    Tile workspace windows

  actionTutorial()

    Open the page with tutorial PDF links

  actionUndo()
  actionWelcome()

    Show the Welcome panel

  actionWhatsNew()
  addCallbacks()

    Method defining all signal connections for the gui manager

  static addCategories()

    Make sure categories.json exists and if not compile it and install in ~/.sasview

  addPlotItemsInWindowsMenu(plot)

    Dynamically update the QMenu content and assign signals

  addTriggers()

    Trigger definitions for all menu/toolbar actions.

  addWidgets()

    Populate the main window with widgets

  appendLog(signal)

    Appends a message to the list widget in the Log Explorer. Use this instead of listWidget.insertPlainText() to facilitate auto-scrolling

  checkAnalysisOption(analysisMenuOption)

    Unchecks all the items in the analysis menu and checks the item passed

  checkUpdate()

    Check with the deployment server whether a new version of the application is available. A thread is started for the connecting with the server. The thread calls a call-back method when the current version number has been obtained.

  closeAllPerspectives()
  communicator()

    Accessor for the communicator

  createGuiData(item, p_file=None)

    Access the Data1D -> plottable Data1D conversion

  deleteIntermediateTheoryPlotsByTabId(tab_id)

    Catch the signal to delete items in the Theory item model which correspond to a model ID. Send the request to the DataExplorer for updating the theory model.

  fileWasRead(data)

    Callback for fileDataReceivedSignal

  findItemFromFilename(filename)

    Queries the data explorer for the index corresponding to the filename within

  info(type, value, tb)
  loadAllPerspectives()

    Load all the perspectives

  log_imported_packages()

    Log version number of python packages imported in this instance of SasView.

  log_installed_packages()

    Log version number of locally installed python packages

  perspective()

    Accessor for the perspective

  perspectiveChanged(new_perspective_name: str)

    Respond to change of the perspective signal

  plotSelectedSlot(plot_name)

    Set focus on the selected plot

  processVersion(version_info: tuple[str, str, Version])

    Call-back method for the process of checking for updates. This methods is called by a VersionThread object once the current version number has been obtained. If the check is being done in the background, the user will not be notified unless there’s an update.

    Parameters:

      version_info – tuple of version string, download url, and the

    version object.

  quitApplication()

    Close the reactor and exit nicely.

  removePlotItemsInWindowsMenu(plot)

    Dynamically update the QMenu content and disconnect signals

  saveCustomConfig()

    Save the config file based on current session values

  setData(data)

    Sends data to current perspective

  showBatchOutput(output_data)

    Display/redisplay the batch fit viewer

  showFitResults(output_data)

    Show bumps convergence plots

  classmethod showHelp(url)

    Open a local url in the default browser

  showPlot(plot, id)

    Pass the show plot request to the data explorer

  showPlotFromName(name)

    Pass the show plot request to the data explorer

  showWelcomeMessage()

    Show the Welcome panel, when required

  statusBarSetup()

    Define the status bar. | <message label> …. | Progress Bar |

    Progress bar invisible until explicitly shown

  uncheckAllMenuItems(menuObject)

    Uncheck all options in a given menu

  updateContextMenus(visible=False)

    Modify the View/Data Explorer menu item text on widget visibility

  updateLogContextMenus(visible=False)

    Modify the View/Data Explorer menu item text on widget visibility

  updateModelFromDataOperationPanel(new_item, new_datalist_item)
    Parameters:

      - new_item – item to be added to list of loaded files

      - new_datalist_item

  updatePerspective(data)

    Update perspective with data sent.

  updatePlotItems(graphs)

    Wrapper for adding/removing actions in the windows menu

  updateProgressBar(value)

    Update progress bar with the required value (0-100)

  updateStatusBar(text)

    Set the status bar text

  updateTheoryFromPerspective(index)

    Catch the theory update signal from a perspective Send the request to the DataExplorer for updating the theory model.

  workspace()

    Accessor for the main window workspace

## sas.qtgui.MainWindow.MainWindow module

class sas.qtgui.MainWindow.MainWindow.MainSasViewWindow(parent=None)

  Bases: `QMainWindow`, `Ui_SasView`

  closeEvent(event)
  staticMetaObject = PySide6.QtCore.QMetaObject("MainSasViewWindow" inherits "QMainWindow": )

sas.qtgui.MainWindow.MainWindow.SplashScreen()

  Displays splash screen as soon as humanely possible. The screen will disappear as soon as the event loop starts.

sas.qtgui.MainWindow.MainWindow.get_highdpi_scaling()

sas.qtgui.MainWindow.MainWindow.run_sasview()

## sas.qtgui.MainWindow.NameChanger module

class sas.qtgui.MainWindow.NameChanger.ChangeName(parent=None)

  Bases: `QDialog`, `Ui_ChangeCategoryUI`

  addActions()

    Add actions for buttons

  close(retVal=False)

    Return a value - hide the window for now

  property data
  getNewText()

    Find the radio button that is selected and find its associated textbox

  property model_item
  removeData(data_list=None)

    Safely remove data from the window in the unlikely event a data deletion signal is sent to the modal window

  staticMetaObject = PySide6.QtCore.QMetaObject("ChangeName" inherits "QDialog": )

## sas.qtgui.MainWindow.PackageGatherer module

class sas.qtgui.MainWindow.PackageGatherer.PackageGatherer

  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

  format_no_version_list(modules_dict, no_version_list)

    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()

    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()

    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()

    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)

    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 PySide6.QtWidgets import QMainWindow, QMdiArea lead to both QMainWindow and QMdiArea being keys, when in reality they are both part of PySide6. 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

## sas.qtgui.MainWindow.WelcomePanel module

class sas.qtgui.MainWindow.WelcomePanel.WelcomePanel(parent=None)

  Bases: `QDialog`, `Ui_WelcomePanelUI`

  staticMetaObject = PySide6.QtCore.QMetaObject("WelcomePanel" inherits "QDialog": )

## Module contents