|
musredit 1.0.0
|
Dialog for configuring msr2data batch processing parameters. More...
#include <PMsr2DataDialog.h>


Public Slots | |
| void | runListEntered (const QString &) |
| Handles run list text field activation. | |
| void | runListFileNameEntered (const QString &) |
| Handles run list file name text field activation. | |
| void | templateRunEntered (const QString &) |
| Handles template run number text field activation. | |
| void | createMsrFileOnlyChanged (int) |
| Handles "Create msr-File only" checkbox state changes. | |
| void | fitOnlyChanged (int) |
| Handles "Fit Only" checkbox state changes. | |
| void | helpContent () |
| Opens online help for msr2data. | |
Public Member Functions | |
| PMsr2DataDialog (PMsr2DataParam *msr2DataParam, const QString helpUrl) | |
| Constructs the msr2data configuration dialog. | |
| virtual int | getRunTag () |
| Returns the run input method tag. | |
| virtual PMsr2DataParam * | getMsr2DataParam () |
| Retrieves all msr2data parameters from the dialog. | |
Private Slots | |
| void | globalOptionSet (bool checked) |
| Enforces mutual exclusivity between global and global+ options. | |
| void | globalPlusOptionSet (bool checked) |
| Enforces mutual exclusivity between global+ and global options. | |
Private Attributes | |
| int | fRunTag |
| Run input method: -1=invalid, 0=direct list, 1=file name. | |
| PMsr2DataParam * | fMsr2DataParam |
| Pointer to parameter structure for msr2data configuration. | |
| QString | fHelpUrl |
| URL to online msr2data documentation. | |
Dialog for configuring msr2data batch processing parameters.
This dialog collects all necessary input parameters for B.M. Wojek's msr2data program, which automates the fitting of multiple µSR data runs. The tool uses a template msr file to generate individual fit files for each run and optionally extracts fit results to database or column files.
Definition at line 97 of file PMsr2DataDialog.h.
| PMsr2DataDialog::PMsr2DataDialog | ( | PMsr2DataParam * | msr2DataParam, |
| const QString | helpUrl ) |
Constructs the msr2data configuration dialog.
Constructor - Initializes the msr2data configuration dialog.
Initializes the dialog with existing msr2data parameters and sets up all UI controls including text fields, checkboxes, and validators. The dialog is configured as modal and establishes signal-slot connections for option interdependencies.
| msr2DataParam | Pointer to the parameter structure containing previously saved msr2data settings. The dialog will populate fields with these values and update them when the user accepts the dialog. |
| helpUrl | URL string pointing to online msr2data documentation. If empty, the help button will show a placeholder message. |
Sets up the complete user interface for msr2data parameter configuration. The initialization process includes:
The dialog handles a comprehensive set of msr2data parameters:
Run Input:
Output Configuration:
Processing Options:
Advanced Options:
| msr2DataParam | Pointer to PMsr2DataParam structure containing previously saved msr2data settings. Must not be nullptr. The dialog will populate UI controls from this structure and update it when accepted. |
| helpUrl | URL string for online msr2data documentation. If empty, the help button will display a placeholder message. |
Definition at line 114 of file PMsr2DataDialog.cpp.
|
slot |
Handles "Create msr-File only" checkbox state changes.
Slot: Handles "Create msr-File only" checkbox changes.
Called when the create-only checkbox is toggled. If checked, automatically unchecks "Fit Only" since these modes are mutually exclusive.
| buttonState | Qt checkbox state (Qt::Checked or Qt::Unchecked). |
Called when the user toggles the create-msr-file-only checkbox. This mode generates msr files from the template without performing fits, which is useful for reviewing generated files before batch fitting.
Since creating files only and fitting only are mutually exclusive operations, checking this option automatically unchecks "Fit Only".
Workflow for create-only mode:
| buttonState | Qt checkbox state (Qt::Checked or Qt::Unchecked). |
Definition at line 386 of file PMsr2DataDialog.cpp.
|
slot |
Handles "Fit Only" checkbox state changes.
Slot: Handles "Fit Only" checkbox changes.
Called when the fit-only checkbox is toggled. If checked, automatically unchecks "Create msr-File only" and clears the template run number since fitting existing files doesn't require a template.
| buttonState | Qt checkbox state (Qt::Checked or Qt::Unchecked). |
Called when the user toggles the fit-only checkbox. This mode fits existing msr files without generating new ones, which is useful for refitting after manual msr file modifications or after initial create-only generation.
When fit-only mode is enabled:
Fit-only mode workflow:
This is particularly useful for:
| buttonState | Qt checkbox state (Qt::Checked or Qt::Unchecked). |
Definition at line 421 of file PMsr2DataDialog.cpp.
|
virtual |
Retrieves all msr2data parameters from the dialog.
Retrieves all msr2data parameters from dialog UI controls.
Collects values from all UI controls and updates the internal PMsr2DataParam structure. This includes:
This method is typically called after the dialog is accepted to obtain the complete configuration for launching msr2data.
Collects values from all text fields and checkboxes in the dialog and updates the internal PMsr2DataParam structure. This method provides a complete snapshot of the user's msr2data configuration.
The collected parameters include:
Run Specification:
Output Configuration:
Processing Control:
Advanced Options:
Definition at line 222 of file PMsr2DataDialog.cpp.
|
inlinevirtual |
Returns the run input method tag.
Indicates which method was used to specify the run list:
This tag helps the caller determine how to interpret the run information when processing the dialog results.
Definition at line 138 of file PMsr2DataDialog.h.
|
privateslot |
Enforces mutual exclusivity between global and global+ options.
Private slot: Enforces global/global+ mutual exclusivity (global side).
Called when the "global" checkbox is toggled. If global is checked, automatically unchecks global+ since these fitting modes cannot be used simultaneously.
| checked | true if the global checkbox is now checked. |
Called when the "global" checkbox state changes. Global and global+ are mutually exclusive fitting modes that cannot be used simultaneously:
When global is checked, this method automatically unchecks global+ to prevent conflicting mode selection.
| checked | true if the global checkbox is now checked, false otherwise. |
Definition at line 498 of file PMsr2DataDialog.cpp.
|
privateslot |
Enforces mutual exclusivity between global+ and global options.
Private slot: Enforces global/global+ mutual exclusivity (global+ side).
Called when the "global+" checkbox is toggled. If global+ is checked, automatically unchecks global since these fitting modes cannot be used simultaneously.
| checked | true if the global+ checkbox is now checked. |
Called when the "global+" checkbox state changes. Global and global+ are mutually exclusive fitting modes that cannot be used simultaneously:
When global+ is checked, this method automatically unchecks global to prevent conflicting mode selection.
| checked | true if the global+ checkbox is now checked, false otherwise. |
Definition at line 530 of file PMsr2DataDialog.cpp.
|
slot |
Opens online help for msr2data.
Opens online help documentation for msr2data.
Attempts to open the msr2data documentation in the default web browser. The documentation covers command-line options, template system usage, global fitting, and output formats.
Attempts to open the msr2data help URL in the user's default web browser using QDesktopServices::openUrl(). The documentation typically covers:
Error handling:
The URL is parsed in TolerantMode to handle various URL formats flexibly.
Definition at line 461 of file PMsr2DataDialog.cpp.
|
slot |
Handles run list text field activation.
Slot: Handles direct run list entry.
Called when the user enters text in the direct run list field. Clears the run list file name field to ensure only one input method is active, and sets the run tag to indicate direct list entry.
| str | The run list string (e.g., "123,125-130,145"). |
Called when the user enters text in the direct run list field. Ensures that only one run input method is active by clearing the run list file name field if it contains text. Sets the run tag to 0 to indicate direct list input mode.
The run list accepts various formats:
| str | The run list string entered by the user. Empty strings are ignored. |
Definition at line 276 of file PMsr2DataDialog.cpp.
|
slot |
Handles run list file name text field activation.
Slot: Handles run list file name entry.
Called when the user enters a file name containing run numbers. Clears the direct run list field to ensure only one input method is active, and sets the run tag to indicate file-based input.
| str | Path to the run list file. |
Called when the user enters a file path in the run list file name field. Ensures that only one run input method is active by clearing the direct run list field if it contains text. Sets the run tag to 1 to indicate file-based input mode.
The run list file should contain run numbers in simple format:
Example run list file:
| str | The file path entered by the user. Empty strings are ignored. |
Definition at line 320 of file PMsr2DataDialog.cpp.
|
slot |
Handles template run number text field activation.
Slot: Handles template run number entry.
Called when the user enters a template run number. Automatically disables the "Fit Only" checkbox since a template implies msr file creation.
| str | The template run number string. |
Called when the user enters a template run number. The template run specifies an existing msr file that will be used as a pattern for generating msr files for all runs in the run list.
Since providing a template implies the intent to create new msr files, this method automatically unchecks the "Fit Only" checkbox to ensure consistency. The fit-only mode assumes existing msr files and doesn't use templates.
The template run number must correspond to an existing, valid msr file. The template's structure (FITPARAMETER, THEORY, RUN blocks) will be preserved, with RUN block numbers updated for each processed run.
| str | The template run number string. Must be a valid integer. Non-empty values automatically disable fit-only mode. |
Definition at line 356 of file PMsr2DataDialog.cpp.
|
private |
URL to online msr2data documentation.
Definition at line 272 of file PMsr2DataDialog.h.
|
private |
Pointer to parameter structure for msr2data configuration.
Definition at line 271 of file PMsr2DataDialog.h.
|
private |
Run input method: -1=invalid, 0=direct list, 1=file name.
Definition at line 270 of file PMsr2DataDialog.h.