spacr.qt.prefs

Small QSettings wrapper for per-user persistence of “recent” paths.

The organization/application name is set by launch() in spacr.qt.app, so this module works with the platform-appropriate settings backend (macOS plist, Windows registry, Linux INI file).

Attributes

Functions

get_last_source(→ str)

Return the last folder used for a given app, or '' if unknown.

get_recent_sources(→ List[str])

Return the recent-source list (most-recent first).

push_recent_source(→ None)

Insert path at the head of the recent list and de-duplicate.

set_last_source(→ None)

Remember path as the most-recent source folder for app_key.

Module Contents

spacr.qt.prefs.get_last_source(app_key: str) str[source]

Return the last folder used for a given app, or ‘’ if unknown.

spacr.qt.prefs.get_recent_sources(app_key: str, limit: int = 8) List[str][source]

Return the recent-source list (most-recent first).

spacr.qt.prefs.push_recent_source(app_key: str, path: str, limit: int = 8) None[source]

Insert path at the head of the recent list and de-duplicate.

spacr.qt.prefs.set_last_source(app_key: str, path: str) None[source]

Remember path as the most-recent source folder for app_key.

spacr.qt.prefs.APP = 'SpaCR'[source]
spacr.qt.prefs.ORG = 'Olafsson Lab'[source]