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.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
-
class
sas.qtgui.MainWindow.AboutBox.
AboutBox
(parent=None)[source] Bases:
PyQt5.QtWidgets.QDialog
,sas.qtgui.MainWindow.UI.AboutUI.Ui_AboutUI
-
addActions
()[source] Add actions to the logo push buttons
-
addText
()[source] Modify the labels so the text corresponds to the current version
-
sas.qtgui.MainWindow.CategoryManager module
-
class
sas.qtgui.MainWindow.CategoryManager.
Categories
[source] Bases:
object
Container class for accessing model categories
-
categoryDict
()[source] Getter for the category dict
-
categoryList
()[source] Getter for the category list
-
modelDict
()[source] Getter for the model list
-
modelToCategory
()[source] Getter for the model->category dict
-
readCategoryInfo
()[source] Reads the categories in from file
-
regenerateMasterDict
()[source] regenerates self.master_category_dict from self.by_model_dict and self.model_enabled_dict
-
regenerateModelDict
()[source] 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
()[source] Serializes categorization info to file
-
setupModelDict
()[source] create a dictionary for model->category mapping
-
-
class
sas.qtgui.MainWindow.CategoryManager.
CategoryManager
(parent=None, manager=None)[source] Bases:
PyQt5.QtWidgets.QDialog
,sas.qtgui.MainWindow.UI.CategoryManagerUI.Ui_CategoryManagerUI
-
initializeGlobals
()[source] Initialize global variables used in this class
-
initializeModelList
()[source] Model category combo setup
-
initializeModels
()[source] Set up models and views
-
initializeSignals
()[source] - Returns
-
onClose
()[source] Save the category file before exiting
-
onEnableAll
(isChecked)[source] Respond to the Enable/Disable All checkbox
-
onListSelection
()[source] Respond to row selection and update GUI
-
onModify
()[source] Show the Change Category dialog - modal
-
onReset
()[source] Reload the saved categories
-
onSearch
()[source] Respond to text entered in search field
-
selectedModels
()[source] Returns a list of selected models
-
setTableProperties
(table)[source] Setting table properties
-
-
class
sas.qtgui.MainWindow.CategoryManager.
ChangeCategory
(parent=None, categories=None, model=None)[source] Bases:
PyQt5.QtWidgets.QDialog
,sas.qtgui.MainWindow.UI.ChangeCategoryUI.Ui_ChangeCategoryUI
Dialog for adding/removing categories for a single model
-
initializeElements
()[source] Initialize local GUI elements with information from the Categories object
-
initializeList
()[source] Initialize the category list for the given model
-
initializeSignals
()[source] Initialize signals for UI elements
-
listCategories
()[source] Returns the list of categories from the QListWidget
-
onAdd
()[source] Add the chosen category to the list
-
onAddChoice
()[source] Respond to the type selection for new category
-
onListSelection
()[source] Respond to selection in the category list view
-
onOK
()[source] Accept the new categories for the model
-
onRemove
()[source] Remove selected categories in the list
-
selectedModels
()[source] Returns a list of selected models
-
-
class
sas.qtgui.MainWindow.CategoryManager.
ToolTippedItemModel
(parent=None)[source] Bases:
PyQt5.QtGui.QStandardItemModel
Subclass from QStandardItemModel to allow displaying tooltips in QTableView model.
-
headerData
(section, orientation, role=0)[source] Displays tooltip for each column’s header :param section: :param orientation: :param role: :return:
-
sas.qtgui.MainWindow.DataExplorer module
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
[source] Bases:
object
Manage a list of data
-
add_data
(data_list)[source] receive a list of data items for storage
-
assign
(other)[source]
-
create_gui_data
(data, path=None)[source] Receive data from loader and create a data to use for guiframe
-
delete_by_id
(id_list=None)[source] save data and path
-
delete_by_name
(name_list=None)[source] save data and path
-
delete_data
(data_id, theory_id=None, delete_all=False)[source]
-
delete_theory
(data_id, theory_id)[source]
-
freeze
(theory_id)[source]
-
freeze_theory
(data_id, theory_id)[source]
-
get_all_data
()[source] return list of all available data
-
get_by_id
(id_list=None)[source]
-
get_by_name
(name_list=None)[source] return a list of data given a list of data names
-
get_data_state
(data_id)[source] Send list of selected data
-
get_message
()[source] return message
-
load_from_readable
(fp)[source] load content from tp to stored_data (a .read()-supporting file-like object)
-
rename
(name)[source] rename data
-
save_to_writable
(fp)[source] save content of stored_data to fp (a .write()-supporting file-like object)
-
update_data
(prev_data, new_data)[source]
-
update_stored_data
(name_list=None)[source] update stored data after deleting files in Data Explorer
-
update_theory
(theory, data_id=None, state=None)[source]
-
sas.qtgui.MainWindow.DataState module
-
class
sas.qtgui.MainWindow.DataState.
DataState
(data=None, parent=None)[source] Bases:
object
Store information about data
-
clone
()[source]
-
get_data
()[source]
-
get_message
()[source] return message
-
get_name
()[source]
-
get_path
()[source] return the path of the loaded data
-
get_theory
()[source]
-
set_data
(data)[source]
-
set_name
(name)[source]
-
set_path
(path)[source] Set the path of the loaded data
-
set_theory
(theory_data, theory_state=None)[source]
-
sas.qtgui.MainWindow.DroppableDataLoadWidget module
-
class
sas.qtgui.MainWindow.DroppableDataLoadWidget.
DroppableDataLoadWidget
(parent=None, guimanager=None)[source] Bases:
PyQt5.QtWidgets.QTabWidget
,sas.qtgui.MainWindow.UI.DataExplorerUI.Ui_DataLoadWidget
Overwrite drag and drop methods in the base class so users can drop files directly onto the Data Explorer
-
closeEvent
(event)[source] Overwrite the close event - no close!
-
dragEnterEvent
(event)[source] Called automatically on a drag into the treeview
-
dragIsOK
(event)[source] Return True if the event contain URLs
-
dragMoveEvent
(event)[source] Called automatically when a drag is moved inside the treeview
-
dropEvent
(event)[source] Called automatically when a drop is added to the treeview.
-
sas.qtgui.MainWindow.GuiManager module
-
class
sas.qtgui.MainWindow.GuiManager.
Acknowledgements
(parent=None)[source] Bases:
PyQt5.QtWidgets.QDialog
,sas.qtgui.MainWindow.UI.AcknowledgementsUI.Ui_Acknowledgements
-
class
sas.qtgui.MainWindow.GuiManager.
GuiManager
(parent=None)[source] Bases:
object
Main SasView window functionality
-
actionAbout
()[source] Open the About box
-
actionAcknowledge
()[source] Open the Acknowledgements widget
-
actionAddMult_Models
()[source]
-
actionAdd_Custom_Model
()[source]
-
actionArrange_Icons
()[source] Arranges all iconified windows at the bottom of the workspace
-
actionCascade
()[source] Arranges all the child windows in a cascade pattern.
-
actionCategory_Manager
()[source]
-
actionCheck_for_update
()[source] Menu Help/Check for Update
-
actionClosePlots
()[source] Closes all Plotters and Plotter2Ds.
-
actionCombine_Batch_Fit
()[source]
-
actionConstrained_Fit
()[source] Add a new Constrained and Simult. Fit page in the fitting perspective.
-
actionCopy
()[source] Send a signal to the fitting perspective so parameters can be saved to the clipboard
-
actionCorfunc
()[source] Change to the Corfunc perspective
-
actionData_Operation
()[source]
-
actionDensity_Volume_Calculator
()[source]
-
actionDocumentation
()[source] Display the documentation
TODO: use QNetworkAccessManager to assure _helpLocation is valid
-
actionEditMask
()[source]
-
actionEdit_Custom_Model
()[source]
-
actionExcel
()[source] Send a signal to the fitting perspective so parameters can be saved to the clipboard
-
actionFile_Converter
()[source] Shows the File Converter widget.
-
actionFit_Options
()[source]
-
actionFit_Results
()[source]
-
actionFitting
()[source] Change to the Fitting perspective
-
actionFreeze_Theory
()[source] Convert a child index with data into a separate top level dataset
-
actionGPU_Options
()[source] Load the OpenCL selection dialog if the fitting perspective is active
-
actionGeneric_Scattering_Calculator
()[source]
-
actionHide_DataExplorer
()[source] Toggle Data Explorer vsibility
-
actionHide_LogExplorer
()[source] Toggle Data Explorer vsibility
-
actionHide_Toolbar
()[source] Toggle toolbar vsibility
-
actionImage_Viewer
()[source]
-
actionInvariant
()[source] Change to the Invariant perspective
-
actionInversion
()[source] Change to the Inversion perspective
-
actionKiessig_Calculator
()[source]
-
actionLatex
()[source] Send a signal to the fitting perspective so parameters can be saved to the clipboard
-
actionLoadData
()[source] Menu File/Load Data File(s)
-
actionLoad_Data_Folder
()[source] Menu File/Load Data Folder
-
actionManage_Custom_Models
()[source]
-
actionMarketplace
()[source] Open the marketplace link in default browser
-
actionMinimizePlots
()[source] Minimizes all Plotters and Plotter2Ds.
-
actionNew_Fit_Page
()[source] Add a new, empty Fit page in the fitting perspective.
-
actionNext
()[source] Gives the input focus to the next window in the list of child windows.
-
actionOpen_Analysis
()[source]
-
actionOpen_Project
()[source] Menu Open Project
-
actionOrientation_Viewer
()[source] Make sasmodels orientation & jitter viewer available
-
actionPaste
()[source] Send a signal to the fitting perspective so parameters from the clipboard can be used to modify the fit state
-
actionPrevious
()[source] Gives the input focus to the previous window in the list of child windows.
-
actionPython_Shell_Editor
()[source] Display the Jupyter console as a docked widget.
-
actionQuit
()[source] Close the reactor, exit the application.
-
actionRedo
()[source]
-
actionReport
()[source] Show the Fit Report dialog.
-
actionReset
()[source]
-
actionSAS_Resolution_Estimator
()[source]
-
actionSLD_Calculator
()[source]
-
actionSaveParamsAs
()[source] Menu Save Params
-
actionSave_Analysis
()[source] Menu File/Save Analysis
-
actionSave_Project
()[source] Menu Save Project
-
actionShow_Grid_Window
()[source]
-
actionSlit_Size_Calculator
()[source]
-
actionStartup_Settings
()[source]
-
actionTile
()[source] Tile workspace windows
-
actionTutorial
()[source] Open the page with tutorial PDF links
-
actionUndo
()[source]
-
actionWelcome
()[source] Show the Welcome panel
-
addCallbacks
()[source] Method defining all signal connections for the gui manager
-
addCategories
()[source] Make sure categories.json exists and if not compile it and install in ~/.sasview
-
addPlotItemsInWindowsMenu
(plot)[source] Dynamically update the QMenu content and assign signals
-
addTriggers
()[source] Trigger definitions for all menu/toolbar actions.
-
addWidgets
()[source] Populate the main window with widgets
-
appendLog
(msg)[source] Appends a message to the list widget in the Log Explorer. Use this instead of listWidget.insertPlainText() to facilitate auto-scrolling
-
checkAnalysisOption
(analysisMenuOption)[source] Unchecks all the items in the analysis menu and checks the item passed
-
checkUpdate
()[source] 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.
-
clearPerspectiveMenubarOptions
(perspective)[source] When closing a perspective, clears the menu bar
-
communicator
()[source] Accessor for the communicator
-
createGuiData
(item, p_file=None)[source] Access the Data1D -> plottable Data1D conversion
-
customSaveOpenCL
(config_content)[source] Update the config module with current session OpenCL choice Returns True if update was done, False, otherwise
-
customSavePaths
(config_content)[source] Update the config module with current session paths Returns True if update was done, False, otherwise
-
deleteIntermediateTheoryPlotsByModelID
(model_id)[source] 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)[source] Callback for fileDataReceivedSignal
-
findItemFromFilename
(filename)[source] Queries the data explorer for the index corresponding to the filename within
-
info
(type, value, tb)[source]
-
perspective
()[source] Accessor for the perspective
-
perspectiveChanged
(perspective_name)[source] Respond to change of the perspective signal
-
plotSelectedSlot
(plot_name)[source] Set focus on the selected plot
-
processVersion
(version_info)[source] 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 – version string
-
quitApplication
()[source] Close the reactor and exit nicely.
-
removePlotItemsInWindowsMenu
(plot)[source] Dynamically update the QMenu content and disconnect signals
-
saveCustomConfig
()[source] Save the config file based on current session values
-
setData
(data)[source] Sends data to current perspective
-
setupPerspectiveMenubarOptions
(perspective)[source] When setting a perspective, sets up the menu bar
-
showBatchOutput
(output_data)[source] Display/redisplay the batch fit viewer
-
showFitResults
(output_data)[source] Show bumps convergence plots
-
showHelp
(url)[source] Open a local url in the default browser
-
showPlot
(plot, id)[source] Pass the show plot request to the data explorer
-
showPlotFromFilename
(filename)[source] Pass the show plot request to the data explorer
-
showWelcomeMessage
()[source] Show the Welcome panel, when required
-
statusBarSetup
()[source] Define the status bar. | <message label> …. | Progress Bar |
Progress bar invisible until explicitly shown
-
uncheckAllMenuItems
(menuObject)[source] Uncheck all options in a given menu
-
updateContextMenus
(visible=False)[source] Modify the View/Data Explorer menu item text on widget visibility
-
updateLogContextMenus
(visible=False)[source] Modify the View/Data Explorer menu item text on widget visibility
-
updateModelFromDataOperationPanel
(new_item, new_datalist_item)[source] - Parameters
new_item – item to be added to list of loaded files
new_datalist_item –
-
updatePerspective
(data)[source] Update perspective with data sent.
-
updatePlotItems
(graphs)[source] Wrapper for adding/removing actions in the windows menu
-
updateProgressBar
(value)[source] Update progress bar with the required value (0-100)
-
updateStatusBar
(text)[source] Set the status bar text
-
updateTheoryFromPerspective
(index)[source] Catch the theory update signal from a perspective Send the request to the DataExplorer for updating the theory model.
-
workspace
()[source] Accessor for the main window workspace
-
writeCustomConfig
(config)[source] Write custom configuration
-
sas.qtgui.MainWindow.MainWindow module
-
class
sas.qtgui.MainWindow.MainWindow.
MainSasViewWindow
(screen_resolution, parent=None)[source] Bases:
PyQt5.QtWidgets.QMainWindow
,sas.qtgui.MainWindow.UI.MainWindowUI.Ui_SasView
-
closeEvent
(self, QCloseEvent)[source]
-
-
sas.qtgui.MainWindow.MainWindow.
SplashScreen
()[source] Displays splash screen as soon as humanely possible. The screen will disappear as soon as the event loop starts.
-
sas.qtgui.MainWindow.MainWindow.
run_sasview
()[source]
sas.qtgui.MainWindow.WelcomePanel module
-
class
sas.qtgui.MainWindow.WelcomePanel.
WelcomePanel
(parent=None)[source] Bases:
PyQt5.QtWidgets.QDialog
,sas.qtgui.MainWindow.UI.WelcomePanelUI.Ui_WelcomePanelUI