musredit 1.0.0
Loading...
Searching...
No Matches
PGetMusrFTOptionsDialog Class Reference

Dialog for configuring musrFT Fourier transform tool options. More...

#include <PGetMusrFTOptionsDialog.h>

Inheritance diagram for PGetMusrFTOptionsDialog:
Collaboration diagram for PGetMusrFTOptionsDialog:

Public Slots

void helpContent ()
 Opens the online help for musrFT.
 

Public Member Functions

 PGetMusrFTOptionsDialog (QString currentMsrFile, QStringList &prevCmd, const QString helpUrl)
 Constructs the musrFT options dialog.
 
QStringList getMusrFTOptions ()
 Builds and returns the musrFT command-line options.
 

Private Slots

void resetAll ()
 Resets all dialog options to their default values.
 
File Selection Slots

Slots for handling file selection changes.

void currentMsrFileTagChanged (int state)
 Handles current msr-file checkbox state change.
 
void allMsrFileTagChanged (int state)
 Handles all msr-files checkbox state change.
 
void selectMsrFileNames ()
 Opens file dialog to select msr-files.
 
void clearMsrFileNames ()
 Clears the msr-file selection.
 
void selectDataFileNames ()
 Opens file dialog to select data files.
 
void clearDataFileNames ()
 Clears the data file selection.
 
void createMsrFileChanged (int state)
 Handles create msr-file checkbox state change.
 
View Option Slots

Slots for handling averaging options.

void averagedAll (int state)
 Handles average-all checkbox (mutually exclusive with per-dataset).
 
void averagedPerDataSet (int state)
 Handles average-per-dataset checkbox (mutually exclusive with all).
 

Private Attributes

QString fCreateMsrFileName
 Full path-name for msr-file creation output.
 
QString fCurrentMsrFileName
 Full path-name of the currently active msr-file in musredit.
 
QString fHelpUrl
 URL to the online documentation for musrFT.
 
File Path Storage

Lists for storing selected file paths and names.

QStringList fMsrFilePaths
 Directory paths for selected msr-files.
 
QStringList fMsrFileNames
 File names (without path) for selected msr-files.
 
QStringList fDataFilePaths
 Directory paths for selected data files.
 
QStringList fDataFileNames
 File names (without path) for selected data files.
 

Detailed Description

Dialog for configuring musrFT Fourier transform tool options.

This dialog provides a comprehensive interface for configuring all command-line options for the musrFT tool, which performs Fourier transforms on muon spin rotation data. The dialog remembers previous settings and can restore them on subsequent invocations.

Supported Options:
  • File Selection: Current msr-file, multiple msr-files, or data files
  • Fourier Options: Plot type (real, imag, power, phase), apodization, units
  • Range Settings: Time range, Fourier range, background range
  • Data Processing: Packing, histogram selection, t0 values, lifetime correction
  • Output Options: Averaged views, msr-file creation, custom title
Command-Line Options Generated:
Option Description
-fo Fourier option (real, imag, power, phase)
-ap Apodization (weak, medium, strong)
-u Units (Gauss, Tesla, MHz, Mc/s)
-fp Fourier power (zero-padding)
-fr Fourier range
-tr Time range
-br Background range (bins)
-pa Packing factor
-a Average all data
-ad Average per data set
-lc Lifetime correction
–histo Histogram list
–t0 T0 values
–title Plot title
–create-msr-file Create msr-file from Fourier
Usage:
QStringList prevCmd; // previous command (empty or from last call)
PGetMusrFTOptionsDialog dialog(currentMsrFile, prevCmd, helpUrl);
if (dialog.exec() == QDialog::Accepted) {
QStringList options = dialog.getMusrFTOptions();
// Execute musrFT with options...
}
PGetMusrFTOptionsDialog(QString currentMsrFile, QStringList &prevCmd, const QString helpUrl)
Constructs the musrFT options dialog.
See also
PGetFourierBlockDialog For static FOURIER blocks in msr files

Definition at line 102 of file PGetMusrFTOptionsDialog.h.

Constructor & Destructor Documentation

◆ PGetMusrFTOptionsDialog()

PGetMusrFTOptionsDialog::PGetMusrFTOptionsDialog ( QString currentMsrFile,
QStringList & prevCmd,
const QString helpUrl )

Constructs the musrFT options dialog.

Initializes the dialog UI, sets up input validators for numeric fields, parses any previous command to restore settings, and connects all signal/slot pairs for UI interaction. The dialog is created as modal.

Input Validators:
  • Integer validators: background range bins, packing, Fourier power
  • Double validators: time range, lifetime correction, Fourier range
Previous Command Parsing:
If prevCmd contains a previous musrFT command, the dialog will parse it and restore all settings. Recognized options include: -fo, -ap, -fp, -u, -fr, -tr, -br, -pa, -a, -ad, -lc, -df, –histo, –t0, –title, –create-msr-file.
Parameters
currentMsrFileFull path-name of the currently active msr-file in musredit.
prevCmdQStringList containing the previous musrFT command arguments (can be empty for fresh start).
helpUrlURL to the online documentation for musrFT.

Definition at line 112 of file PGetMusrFTOptionsDialog.cpp.

Member Function Documentation

◆ allMsrFileTagChanged

void PGetMusrFTOptionsDialog::allMsrFileTagChanged ( int state)
privateslot

Handles all msr-files checkbox state change.

Slot called when the "all msr-files" checkbox state changes.

When checked, unchecks the "current msr-file" option to maintain mutual exclusivity between these two file selection modes.

Parameters
stateThe new checkbox state (Qt::Checked or Qt::Unchecked).

Definition at line 490 of file PGetMusrFTOptionsDialog.cpp.

◆ averagedAll

void PGetMusrFTOptionsDialog::averagedAll ( int state)
privateslot

Handles average-all checkbox (mutually exclusive with per-dataset).

Slot called when the "average all" checkbox state changes.

Ensures mutual exclusivity with the "average per data set" option. When this option is checked, the per-data-set averaging is automatically unchecked since both options cannot be active simultaneously.

Parameters
stateThe new checkbox state (Qt::Checked or Qt::Unchecked).

Definition at line 681 of file PGetMusrFTOptionsDialog.cpp.

◆ averagedPerDataSet

void PGetMusrFTOptionsDialog::averagedPerDataSet ( int state)
privateslot

Handles average-per-dataset checkbox (mutually exclusive with all).

Slot called when the "average per data set" checkbox state changes.

Ensures mutual exclusivity with the "average all" option. When this option is checked, the all-data averaging is automatically unchecked since both options cannot be active simultaneously.

Parameters
stateThe new checkbox state (Qt::Checked or Qt::Unchecked).

Definition at line 697 of file PGetMusrFTOptionsDialog.cpp.

◆ clearDataFileNames

void PGetMusrFTOptionsDialog::clearDataFileNames ( )
privateslot

Clears the data file selection.

Slot to clear the data file selection.

Clears the data file selector line edit and empties both the fDataFilePaths and fDataFileNames lists.

Definition at line 604 of file PGetMusrFTOptionsDialog.cpp.

◆ clearMsrFileNames

void PGetMusrFTOptionsDialog::clearMsrFileNames ( )
privateslot

Clears the msr-file selection.

Slot to clear the msr-file selection.

Clears the msr-file selector line edit and empties both the fMsrFilePaths and fMsrFileNames lists.

Definition at line 547 of file PGetMusrFTOptionsDialog.cpp.

◆ createMsrFileChanged

void PGetMusrFTOptionsDialog::createMsrFileChanged ( int state)
privateslot

Handles create msr-file checkbox state change.

Slot called when the "create msr-file" checkbox state changes.

When checked, opens a file save dialog to specify the output msr-file name. If the user cancels the dialog, the checkbox is automatically unchecked. When unchecked, clears the stored create msr-file name.

Parameters
stateThe new checkbox state (Qt::Checked or Qt::Unchecked).

Definition at line 621 of file PGetMusrFTOptionsDialog.cpp.

◆ currentMsrFileTagChanged

void PGetMusrFTOptionsDialog::currentMsrFileTagChanged ( int state)
privateslot

Handles current msr-file checkbox state change.

Slot called when the "current msr-file" checkbox state changes.

When checked, this option uses the currently active msr-file in musredit instead of a manually selected file list. Checking this option will uncheck the "all msr-files" option and clear any previously selected msr-files and data files.

Parameters
stateThe new checkbox state (Qt::Checked or Qt::Unchecked).

Definition at line 466 of file PGetMusrFTOptionsDialog.cpp.

◆ getMusrFTOptions()

QStringList PGetMusrFTOptionsDialog::getMusrFTOptions ( )

Builds and returns the musrFT command-line options.

Builds and returns the complete musrFT command-line options.

Returns
QStringList containing all configured command-line arguments ready to be passed to musrFT.

Collects all user-configured options from the dialog widgets and assembles them into a QStringList suitable for passing to musrFT. The method handles the logic for mutually exclusive options (e.g., current file vs. file list) and only includes options that have been explicitly set.

Generated Options:
The returned list may include any combination of:
  • msr-file names (or current msr-file if that option is selected)
  • -df followed by data file names
  • -br start end (background range)
  • -fo option (Fourier option: real, imag, power, phase)
  • -ap option (apodization: weak, medium, strong)
  • -fp value (Fourier power)
  • -u units (Gauss, Tesla, MHz, Mc/s)
  • -fr start end (Fourier range)
  • -tr start end (time range)
  • –histo list (histogram numbers)
  • -a (average all)
  • -ad (average per data set)
  • –t0 list (t0 values)
  • -pa value (packing)
  • –title text
  • –create-msr-file filename
  • -lc value (lifetime correction)
Returns
QStringList containing the complete command-line arguments for musrFT.

Definition at line 328 of file PGetMusrFTOptionsDialog.cpp.

◆ helpContent

void PGetMusrFTOptionsDialog::helpContent ( )
slot

Opens the online help for musrFT.

Opens the online help documentation for musrFT.

Attempts to open the help URL in the system's default web browser using QDesktopServices. If the URL is empty, displays an informational message. If the browser fails to open, displays an error message with a clickable link.

Definition at line 711 of file PGetMusrFTOptionsDialog.cpp.

◆ resetAll

void PGetMusrFTOptionsDialog::resetAll ( )
privateslot

Resets all dialog options to their default values.

Slot to reset all dialog options to default values.

Clears all input fields, unchecks all checkboxes, and resets all combo boxes to their undefined/default state. This provides a clean slate for configuring new musrFT options.

Definition at line 640 of file PGetMusrFTOptionsDialog.cpp.

◆ selectDataFileNames

void PGetMusrFTOptionsDialog::selectDataFileNames ( )
privateslot

Opens file dialog to select data files.

Slot to open file dialog for selecting data files.

Opens a multi-file selection dialog filtered for data files (.root, .bin, .msr, .nxs, .mdu). Selected files are split into path and name components and stored separately in fDataFilePaths and fDataFileNames. The file names are displayed in the corresponding line edit widget.

Definition at line 563 of file PGetMusrFTOptionsDialog.cpp.

◆ selectMsrFileNames

void PGetMusrFTOptionsDialog::selectMsrFileNames ( )
privateslot

Opens file dialog to select msr-files.

Slot to open file dialog for selecting msr-files.

Opens a multi-file selection dialog filtered for .msr files. Selected files are split into path and name components and stored separately in fMsrFilePaths and fMsrFileNames. The file names are displayed in the corresponding line edit widget.

Definition at line 506 of file PGetMusrFTOptionsDialog.cpp.

Member Data Documentation

◆ fCreateMsrFileName

QString PGetMusrFTOptionsDialog::fCreateMsrFileName
private

Full path-name for msr-file creation output.

Definition at line 160 of file PGetMusrFTOptionsDialog.h.

◆ fCurrentMsrFileName

QString PGetMusrFTOptionsDialog::fCurrentMsrFileName
private

Full path-name of the currently active msr-file in musredit.

Definition at line 161 of file PGetMusrFTOptionsDialog.h.

◆ fDataFileNames

QStringList PGetMusrFTOptionsDialog::fDataFileNames
private

File names (without path) for selected data files.

Definition at line 157 of file PGetMusrFTOptionsDialog.h.

◆ fDataFilePaths

QStringList PGetMusrFTOptionsDialog::fDataFilePaths
private

Directory paths for selected data files.

Definition at line 156 of file PGetMusrFTOptionsDialog.h.

◆ fHelpUrl

QString PGetMusrFTOptionsDialog::fHelpUrl
private

URL to the online documentation for musrFT.

Definition at line 162 of file PGetMusrFTOptionsDialog.h.

◆ fMsrFileNames

QStringList PGetMusrFTOptionsDialog::fMsrFileNames
private

File names (without path) for selected msr-files.

Definition at line 155 of file PGetMusrFTOptionsDialog.h.

◆ fMsrFilePaths

QStringList PGetMusrFTOptionsDialog::fMsrFilePaths
private

Directory paths for selected msr-files.

Definition at line 154 of file PGetMusrFTOptionsDialog.h.


The documentation for this class was generated from the following files: