|
musredit 1.0.0
|
Preferences dialog for configuring musredit and musrfit settings. More...
#include <PPrefsDialog.h>


Public Slots | |
| void | dumpAscii () |
| Slot: Handles ASCII dump checkbox selection. | |
| void | dumpRoot () |
| Slot: Handles ROOT dump checkbox selection. | |
| void | handleDefaultPaths () |
| Slot: Opens the default paths configuration dialog. | |
| void | numberOfThreadsChanged (int idx) |
| Slot: called when the current index of the number of threads to be used has changed. | |
Public Member Functions | |
| PPrefsDialog (PAdmin *admin) | |
| Constructs the preferences dialog. | |
| bool | getMusrviewShowFourierFlag () |
| Returns the musrview Fourier display preference. | |
| bool | getMusrviewShowAvgFlag () |
| Returns the musrview average display preference. | |
| bool | getMusrviewShowOneToOneFlag () |
| Returns the musrview one-to-one plotting preference. | |
| bool | getKeepMinuit2OutputFlag () |
| Returns the MINUIT2 output preservation preference. | |
| bool | getTitleFromDataFileFlag () |
| Returns the title-from-data-file preference. | |
| bool | getEnableMusrT0Flag () |
| Returns the musrT0 enablement preference. | |
| bool | getKeepRunPerBlockChisqFlag () |
| Returns the per-run chi-square preference. | |
| bool | getEstimateN0Flag () |
| Returns the N0 estimation preference. | |
| bool | getYamlOutFlag () |
| Returns the YAML output preference. | |
| bool | getIgnoreThemeAutoDetection () |
| Returns the theme auto-detection override preference. | |
| bool | getDarkThemeIconsMenuFlag () |
| Returns the dark theme menu icons preference. | |
| bool | getDarkThemeIconsToolbarFlag () |
| Returns the dark theme toolbar icons preference. | |
| bool | getOneToOneFlag () |
| Returns the one-to-one plotting preference. | |
| int | getDump () |
| Returns the dump format preference. | |
| int | getTimeout () |
| Returns the fitting timeout preference. | |
Private Attributes | |
| PAdmin * | fAdmin |
| Pointer to global administration object storing all preferences. | |
Preferences dialog for configuring musredit and musrfit settings.
This dialog provides a centralized interface for managing all application preferences. Settings are organized into several categories:
All preferences are stored in the PAdmin global administration object and persisted across application sessions.
Definition at line 102 of file PPrefsDialog.h.
| PPrefsDialog::PPrefsDialog | ( | PAdmin * | admin | ) |
Constructs the preferences dialog.
Constructor - Initializes the preferences dialog.
Initializes the dialog with current preference values from the PAdmin administration object. Sets up UI controls, validators, and signal-slot connections for option interdependencies.
| admin | Pointer to the global PAdmin object containing current preference values. Must not be nullptr. The dialog reads from and writes to this object. |
Sets up the preferences dialog user interface and populates all controls with current preference values from the PAdmin administration object. The initialization process includes:
Preference Categories and Initialization:
Theme Preferences:
Fitting Options:
Output Options:
Data Processing:
Visualization (musrview):
Dump Format Logic: The dump format checkboxes are handled with special logic to ensure mutual exclusivity:
| admin | Pointer to the global PAdmin administration object containing all current preference values. If nullptr, the constructor returns early without initializing the dialog (defensive programming). |
Definition at line 116 of file PPrefsDialog.cpp.
|
slot |
Slot: Handles ASCII dump checkbox selection.
Called when the "Dump ASCII" checkbox is toggled. If checked, automatically unchecks "Dump ROOT" since these formats are mutually exclusive.
Called when the "Dump ASCII" checkbox state changes. Enforces mutual exclusivity between ASCII and ROOT dump formats by automatically unchecking the ROOT dump checkbox when ASCII dump is selected.
ASCII Dump Format Details:
Mutual Exclusivity Rationale: Only one dump format can be active because musrfit's –dump option accepts a single format specification. Allowing both would create ambiguity about which format to use.
Definition at line 254 of file PPrefsDialog.cpp.
|
slot |
Slot: Handles ROOT dump checkbox selection.
Called when the "Dump ROOT" checkbox is toggled. If checked, automatically unchecks "Dump ASCII" since these formats are mutually exclusive.
Called when the "Dump ROOT" checkbox state changes. Enforces mutual exclusivity between ROOT and ASCII dump formats by automatically unchecking the ASCII dump checkbox when ROOT dump is selected.
ROOT Dump Format Details:
ROOT Dump Advantages:
Mutual Exclusivity Rationale: Only one dump format can be active because musrfit's –dump option accepts a single format specification. Allowing both would create ambiguity about which format to use.
Definition at line 296 of file PPrefsDialog.cpp.
|
inline |
Returns the dark theme menu icons preference.
Indicates whether dark-themed icon variants should be used in application menus for better visibility on dark backgrounds.
Definition at line 230 of file PPrefsDialog.h.
|
inline |
Returns the dark theme toolbar icons preference.
Indicates whether dark-themed icon variants should be used in the application toolbar for better visibility on dark backgrounds.
Definition at line 240 of file PPrefsDialog.h.
| int PPrefsDialog::getDump | ( | ) |
Returns the dump format preference.
Returns the selected dump format preference.
Determines the format for dumping fitted data using musrfit's –dump option. The values are:
Determines which data dump format is currently selected in the preferences dialog. This corresponds to musrfit's –dump command-line option, which controls how fitted data is exported for external analysis.
Return Values:
Use Cases:
The dump formats are mutually exclusive - only one can be active at a time. This exclusivity is enforced by the dumpAscii() and dumpRoot() slot methods.
Definition at line 214 of file PPrefsDialog.cpp.
|
inline |
Returns the musrT0 enablement preference.
Indicates whether the musrT0 tool should be used for automatic t0 (time zero) determination from data files.
Definition at line 180 of file PPrefsDialog.h.
|
inline |
Returns the N0 estimation preference.
Indicates whether initial asymmetry (N0) should be automatically estimated from data rather than using msr file values.
Definition at line 200 of file PPrefsDialog.h.
|
inline |
Returns the theme auto-detection override preference.
Indicates whether automatic system theme detection should be ignored, allowing manual theme configuration.
Definition at line 220 of file PPrefsDialog.h.
|
inline |
Returns the MINUIT2 output preservation preference.
Indicates whether detailed MINUIT2 fitting output files should be kept after fits complete. Useful for debugging fit convergence issues.
Definition at line 160 of file PPrefsDialog.h.
|
inline |
Returns the per-run chi-square preference.
Indicates whether chi-square values for individual runs (in multi-run fits) should be calculated and reported separately.
Definition at line 190 of file PPrefsDialog.h.
|
inline |
Returns the musrview average display preference.
Indicates whether averaged data plots should be shown by default when opening data files in musrview.
Definition at line 140 of file PPrefsDialog.h.
|
inline |
Returns the musrview Fourier display preference.
Indicates whether Fourier transform plots should be shown by default when opening data files in musrview.
Definition at line 130 of file PPrefsDialog.h.
|
inline |
Returns the musrview one-to-one plotting preference.
Indicates whether one-to-one (direct data-to-theory comparison) plotting mode should be used by default in musrview.
Definition at line 150 of file PPrefsDialog.h.
|
inline |
Returns the one-to-one plotting preference.
Alias for getMusrviewShowOneToOneFlag(). Indicates whether one-to-one plotting mode should be enabled.
Definition at line 252 of file PPrefsDialog.h.
|
inline |
Returns the fitting timeout preference.
Returns the maximum time (in seconds) that a fit should be allowed to run before being terminated. This prevents infinite loops or extremely slow fits from hanging the application.
Definition at line 283 of file PPrefsDialog.h.
|
inline |
Returns the title-from-data-file preference.
Indicates whether msr file titles should be automatically extracted from data file headers when available.
Definition at line 170 of file PPrefsDialog.h.
|
inline |
Returns the YAML output preference.
Indicates whether fit results should be exported in YAML format in addition to standard output formats.
Definition at line 210 of file PPrefsDialog.h.
|
slot |
Slot: Opens the default paths configuration dialog.
Slot: Opens the default search paths configuration dialog.
Called when the "Change Default Search Paths" button is clicked. Launches the PChangeDefaultPathsDialog to allow users to configure the directories where musrfit searches for data files.
Called when the "Change Default Search Paths" button is clicked. Launches the PChangeDefaultPathsDialog which allows users to configure the list of directories where musrfit searches for data files when run numbers are specified without full paths.
Default Search Paths Purpose: When an msr file specifies a run number (e.g., "RUN 2024 PSI" without a full path), musrfit searches through the default path list to locate the corresponding data file. This eliminates the need to specify full paths in every msr file.
Typical Search Path Examples:
Dialog Workflow:
The dialog is created using std::unique_ptr for automatic memory management. When the dialog goes out of scope, it is automatically destroyed.
Definition at line 344 of file PPrefsDialog.cpp.
|
slot |
Slot: called when the current index of the number of threads to be used has changed.
Slot: keeps the number of threads to be used for fitting.
| idx | index of the comboBox |
Definition at line 359 of file PPrefsDialog.cpp.
|
private |
Pointer to global administration object storing all preferences.
Definition at line 329 of file PPrefsDialog.h.