66#include <QFileSystemWatcher>
76class QFileSystemWatcher;
450 void load(
const QString &f,
const int index=-1 );
653 void fileClose(
const bool check =
true );
1021 QStringList
getRunList(QString runListStr,
bool &ok);
Administration and configuration management for musredit.
Central administration class for musredit configuration management.
Enhanced text editor for msr file editing with block insertion support.
void exitStatusMusrWiz(int exitCode, QProcess::ExitStatus exitStatus)
Slot: Handles exit status of musrWiz process.
void insertTheoryBlock()
Slot: Inserts a THEORY block into the current editor.
int getEditH()
Gets the configured editor height.
void replaceAll()
Slot: Replaces all occurrences without prompting.
QMap< QString, QAction * > fActions
QString fLastDirInUse
string holding the path from where the last file was loaded.
void setupFileActions()
Initializes File menu and toolbar actions.
std::unique_ptr< QComboBox > fComboSize
combo box for the font size
void musrView()
Slot: Launches musrView for viewing fit results.
PMsr2DataParam * fMsr2DataParam
structure holding the necessary input information for msr2data
QStringList getRunList(QString runListStr, bool &ok)
Parses a run list string into individual run numbers.
QTimer fFileSystemWatcherTimeout
timer used to re-enable file system watcher. Needed to delay the re-enabling
bool fileAlreadyOpen(QFileInfo &finfo, int &idx)
Checks if a file is already open in a tab.
void editUndo()
Slot: Undo last edit operation.
void fileCloseAll()
Slot: Closes all open tabs.
void editComment()
Slot: Comments out selected lines.
std::unique_ptr< QComboBox > fComboFont
combo box for the font selector
void musrDump()
Slot: Dumps raw histogram data from run files.
void applyFontSettings(int)
Slot: Applies font settings when tab changes.
void fileSystemWatcherActivation()
Manages file system watcher activation state.
void musrWiz()
Slot: Launches musrWiz (msr file creation wizard).
bool fFileSystemWatcherActive
flag to enable/disable the file system watcher
void fileSaveAs()
Slot: Saves the current file with a new name.
void close()
Signal: Emitted when the main window is closing.
void load(const QString &f, const int index=-1)
Loads a file into the editor.
void editCut()
Slot: Cut selected text to clipboard.
void fontChanged(const QFont &f)
Slot: Responds to font changes in editor.
PTextEdit(QWidget *parent=nullptr)
Constructs the main musredit window.
void setupHelpActions()
Initializes Help menu actions.
bool fFontChanging
flag needed to prevent some textChanged feature to occure when only the font changed
void aboutToQuit()
Slot: Cleanup handler called before application quits.
void fileSavePrefs()
Slot: Saves the preferences file.
PFindReplaceData * fFindReplaceData
structure holding the ncessary input for find/replace
void musrCalcChisq()
Slot: Calculates chi-square for current msr file.
void insertFunctionBlock()
Slot: Inserts a FUNCTIONS block into the current editor.
QMap< PSubTextEdit *, QString > fFilenames
mapper between tab widget object and filename
void fillRecentFiles()
Populates the Recent Files menu.
bool getTheme()
Detects the current system theme.
void textChanged(const bool forced=false)
Slot: Responds to text changes in editor.
void musrSetSteps()
Slot: Launches musrStep for setting fit step sizes.
std::unique_ptr< QFileSystemWatcher > fFileSystemWatcher
checks if msr-files are changing on the disk while being open in musredit.
void fileSave()
Slot: Saves the current file.
void musrFit()
Slot: Executes fit with current msr file.
void helpContents()
Slot: Opens online documentation.
void helpAboutQt()
Slot: Displays Qt About dialog.
QAction * fRecentFilesAction[MAX_RECENT_FILES]
array of the recent file actions
int getEditW()
Gets the configured editor width.
bool fDarkToolBarIcon
flag indicating if a dark or plain icon shall be used in the toolbar
QStringList fMusrFTPrevCmd
void fileOpenPrefs()
Slot: Opens the preferences file in a new tab.
void fileCloseAllOthers()
Slot: Closes all tabs except the current one.
void setupMusrActions()
Initializes Musr menu and toolbar actions.
void setupTextActions()
Initializes Text menu and toolbar actions.
void editUncomment()
Slot: Uncomments selected lines.
void insertTheoryFunction(QAction *a)
Slot: Inserts a specific theory function into the current editor.
void switchToolbarIcons()
Switches toolbar icons between dark and plain variants.
void editRedo()
Slot: Redo previously undone edit operation.
void insertParameterBlock()
Slot: Inserts a FITPARAMETER block into the current editor.
void insertCommandBlock()
Slot: Inserts a COMMANDS block into the current editor.
void fileChanged(const QString &fileName)
Slot: Handles file system watcher notifications.
std::unique_ptr< PAdmin > fAdmin
pointer to the xml-startup file informations. Needed for different purposes like default working- and...
void insertTitle()
Slot: Inserts a title block into the current editor.
void helpAbout()
Slot: Displays musredit About dialog.
void editSelectAll()
Slot: Select all text in current editor.
void fileExit()
Slot: Exits the application.
void editFindAndReplace()
Slot: Opens find and replace dialog.
void musrSwapMsrMlog()
Slot: Swaps between .msr and .mlog files.
void setFileSystemWatcherActive()
Slot: Re-enables file system watcher after delay.
PSubTextEdit * currentEditor() const
Gets the currently active editor widget.
void insertPlotBlock()
Slot: Inserts a PLOT block into the current editor.
void insertNonMusrRunBlock()
Slot: Inserts a non-µSR RUN block into the current editor.
std::unique_ptr< QComboBox > fJumpToBlock
combo box used to jump to the msr-file blocks
void editFindNext()
Slot: Finds next occurrence of search text.
void musrView2Dat()
Slot: Launches musrView in 2-data file mode.
void replace()
Slot: Replaces current match and finds next occurrence.
void mupp()
Slot: Launches mupp (muon parameter plot).
void textFamily(const QString &f)
Slot: Changes font family for current editor.
void setupEditActions()
Initializes Edit menu and toolbar actions.
void editFind()
Slot: Opens find dialog.
std::unique_ptr< QAction > fMusrT0Action
void currentCursorPosition()
Slot: Updates status bar with current cursor position.
void setupJumpToBlock()
Initializes the Jump to Block combo box.
void musrFT()
Slot: Opens Fourier transform dialog.
void fileReload()
Slot: Reloads the current file from disk.
void filePrint()
Slot: Prints the current file.
void editFindPrevious()
Slot: Finds previous occurrence of search text.
void editCopy()
Slot: Copy selected text to clipboard.
void musrPrefs()
Slot: Opens preferences dialog.
void insertAsymRunBlock()
Slot: Inserts an asymmetry RUN block into the current editor.
void fileOpen()
Slot: Opens a file dialog to load an msr file.
void insertSingleHistRunBlock()
Slot: Inserts a single histogram RUN block into the current editor.
void insertStatisticBlock()
Slot: Inserts a STATISTIC block into the current editor.
void switchMenuIcons()
Switches menu icons between dark and plain variants.
void insertFourierBlock()
Slot: Inserts a FOURIER block into the current editor.
void fileOpenRecent()
Slot: Opens a recently used file.
void textSize(const QString &p)
Slot: Changes font size for current editor.
void exitStatusMusrSetSteps(int exitCode, QProcess::ExitStatus exitStatus)
Slot: Handles exit status of musrSetSteps process.
void jumpToBlock(int idx)
Slot: Jumps cursor to selected msr file block.
void musrT0()
Slot: Opens musrT0 dialog for determining t0 timing parameter.
bool fDarkMenuIcon
flag indicating if a dark or plain icon shall be used in the menu pull-downs
void musrMsr2Data()
Slot: Opens msr2data conversion dialog.
std::unique_ptr< QTabWidget > fTabWidget
tab widget in which the text editor(s) are placed
void editPaste()
Slot: Paste text from clipboard at cursor position.
void doConnections(PSubTextEdit *e)
Establishes signal-slot connections for an editor.
void fileClose(const bool check=true)
Slot: Closes the current tab.
QMenu * fRecentFilesMenu
recent file menu
void fileNew()
Slot: Creates a new empty msr file in a new tab.
void replaceAndClose()
Slot: Replaces current match and closes replace dialog.
Common definitions and data structures for the musredit application.
#define MAX_RECENT_FILES
Maximum number of recently opened files to track.
Configuration structure for find and replace operations.
Parameter structure for msr2data tool integration.