sas.qtgui.Utilities.WhatsNew package¶
Subpackages¶
Submodules¶
sas.qtgui.Utilities.WhatsNew.WhatsNew module¶
- class sas.qtgui.Utilities.WhatsNew.WhatsNew.WhatsNew(parent=None, only_recent=True)¶
Bases:
QDialogWhat’s New window: displays messages about what is new in this version of SasView
It will find all files in messages.[version] if [version] is newer than the last time the “don’t show me again” option was chosen
To add new messages, just dump a (self-contained) html file into the appropriate folder
- __doc__ = ' What\'s New window: displays messages about what is new in this version of SasView\n\n It will find all files in messages.[version] if [version] is newer than the last time\n the "don\'t show me again" option was chosen\n\n To add new messages, just dump a (self-contained) html file into the appropriate folder\n\n '¶
- __init__(self, /, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags), *, sizeGripEnabled: bool | None = None, modal: bool | None = None) None¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Utilities.WhatsNew.WhatsNew'¶
- close_me()¶
Close action, needs to save the state for showing
- has_new_messages() bool¶
Should the window be shown?
- next_file()¶
Show the next available file (increment counter, show)
- prev_file()¶
Go to next file
- set_enable_disable_prev_next()¶
Set the appropriate enable state on the navigation buttons
- show_file()¶
Set the text of the window to the file with the current index
- staticMetaObject = PySide6.QtCore.QMetaObject("WhatsNew" inherits "QDialog": )¶
- class sas.qtgui.Utilities.WhatsNew.WhatsNew.WhatsNewBrowser(parent=None)¶
Bases:
QTextBrowser- __doc__ = None¶
- __init__(self, /, parent: PySide6.QtWidgets.QWidget | None = None, *, source: PySide6.QtCore.QUrl | None = None, sourceType: PySide6.QtGui.QTextDocument.ResourceType | None = None, searchPaths: collections.abc.Sequence[str] | None = None, openExternalLinks: bool | None = None, openLinks: bool | None = None) None¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Utilities.WhatsNew.WhatsNew'¶
- loadResource(kind: int, url: QUrl | str)¶
Override the resource discovery to get the images we need
- setHtml(text: str) None¶
Overriden to inject CSS into HTML files - very, very ugly
- staticMetaObject = PySide6.QtCore.QMetaObject("WhatsNewBrowser" inherits "QTextBrowser": )¶
- sas.qtgui.Utilities.WhatsNew.WhatsNew.main()¶
Demo/testing window
- sas.qtgui.Utilities.WhatsNew.WhatsNew.whats_new_messages(only_recent=True)¶
Accumulate all files that are newer than the value in the config
- Parameters:
only_recent – require strictly newer stuff, strictness is needed for showing new things when there is an update, non-strictness is needed for the menu access.
sas.qtgui.Utilities.WhatsNew.newer module¶
- sas.qtgui.Utilities.WhatsNew.newer.newest(version_a: str, version_b: str) str¶
Return the newest of two versions by the comparison used in the what’s new box, if they are equally new, return the first one.
- sas.qtgui.Utilities.WhatsNew.newer.reduced_version(version_string: str) tuple[int, int, int]¶
Convert a version string into the three numbers we care about for the purposes of the WhatsNew dialog (i.e. strip a,b suffixes etc, make into three ints
- sas.qtgui.Utilities.WhatsNew.newer.strictly_newer_than(version_a: str, version_b: str) bool¶
Is the version string “version_a” string strictly newer than “version_b”