sas.qtgui.Utilities.WhatsNew package

Subpackages

Submodules

sas.qtgui.Utilities.WhatsNew.WhatsNew module

class sas.qtgui.Utilities.WhatsNew.WhatsNew.WhatsNew(parent=None, strictly_newer=True)

Bases: QDialog

What’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\nIt will find all files in messages.[version] if [version] is newer than the last time\nthe "don\'t show me again" option was chosen\n\nTo add new messages, just dump a (self-contained) html file into the appropriate folder\n\n'
__firstlineno__ = 90
__init__(parent=None, strictly_newer=True)
__module__ = 'sas.qtgui.Utilities.WhatsNew.WhatsNew'
__static_attributes__ = ('all_messages', 'browser', 'buttonBar', 'buttonLayout', 'closeButton', 'current_index', 'mainLayout', 'max_index', 'nextButton', 'showAgain')
close_me()
has_new_messages() bool

Should the window be shown?

next_file()
show_file()
staticMetaObject = PySide6.QtCore.QMetaObject("WhatsNew" inherits "QDialog": )
class sas.qtgui.Utilities.WhatsNew.WhatsNew.WhatsNewBrowser(parent=None)

Bases: QTextBrowser

__doc__ = None
__firstlineno__ = 51
__init__(parent=None)
__module__ = 'sas.qtgui.Utilities.WhatsNew.WhatsNew'
__static_attributes__ = ('css_data',)
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(strictly_newer=True)

Accumulate all files that are newer than the value in the config

Parameters:

strictly_newer – 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”

Module contents