spacr.qt.widgets.settings_advisor_dialog¶
Review data-dependent regression-setting recommendations.
The first page asks only for information that cannot be inferred from the
tables. The second compares each proposed value with the current value and
explains the evidence for the change. No setting is written until the user
selects Apply. Calculations are provided by spacr.settings_advisor.
Classes¶
What would change, with the current value beside the new one. |
|
The questions the data cannot answer, and why each one matters. |
|
Questions, then proposal, then -- only on Apply -- the settings. |
Module Contents¶
- class spacr.qt.widgets.settings_advisor_dialog.ProposalPage(parent: PySide6.QtWidgets.QWidget | None = None)[source]¶
Bases:
PySide6.QtWidgets.QWidgetWhat would change, with the current value beside the new one.
- Parameters:
parent – parent widget.
Build the page showing the proposed settings and what stayed undecided.
- Parameters:
parent – parent widget, or
None.
- retranslate_dynamic_content(language: str) None[source]¶
Refresh proposal chrome after the application language changes.
- Parameters:
language – the new application language, used to re-render the summary, table and undecided list; nothing is drawn before a proposal has been shown.
- show_the_proposal(advice: spacr.settings_advisor.Advice, current: Dict[str, Any]) None[source]¶
Display proposed values, current values, and supporting reasons.
- Parameters:
advice – the advisor’s proposal: its reading fills the summary, its chosen values the table and its undecided settings the list below it.
current – the settings in effect now, by key; copied, and shown beside each proposed value so unchanged ones can be greyed out.
- class spacr.qt.widgets.settings_advisor_dialog.QuestionsPage(reading: spacr.settings_advisor.Reading, parent: PySide6.QtWidgets.QWidget | None = None)[source]¶
Bases:
PySide6.QtWidgets.QWidgetThe questions the data cannot answer, and why each one matters.
- Parameters:
reading – what was measured from the data. The questions are what it could NOT answer, so this decides which rows exist – a reading that answered everything builds an empty page rather than a page of questions with answers already in them.
parent – parent widget.
Build the page asking only what the tables cannot answer.
Each question carries why it matters underneath it: a user who cannot see what an answer buys cannot answer it well, and the alternative is a number typed to make the dialog go away.
- Parameters:
reading – what was measured from the data.
parent – parent widget, or
None.
- class spacr.qt.widgets.settings_advisor_dialog.SettingsAdvisorDialog(reading: spacr.settings_advisor.Reading, current: Dict[str, Any], parent: PySide6.QtWidgets.QWidget | None = None)[source]¶
Bases:
PySide6.QtWidgets.QDialogQuestions, then proposal, then – only on Apply – the settings.
- Parameters:
reading – what was measured from the user’s data, which is what the questions are derived from.
current – the settings as they stand. Copied, not held: nothing is written back until Apply, which is the promise in the summary above.
parent – parent widget.
Build the two-page advisor: the questions, then the proposal.
- Parameters:
reading – what was measured from the data.
current – the module’s current settings, so the proposal can show what would change.
parent – parent widget, or
None.
- accepted_settings() Dict[str, Any][source]¶
What to write. Empty until the proposal has actually been seen.
- advice() spacr.settings_advisor.Advice | None[source]¶
Return the most recently displayed proposal, if any.
- show_the_proposal() spacr.settings_advisor.Advice[source]¶
Compute the advice from the answers and show it.