Files
musrfit/musredit/html/classPGetTheoryBlockDialog.html
T
2026-07-31 18:47:29 +00:00

545 lines
36 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.13.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>musredit: PGetTheoryBlockDialog Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">musredit<span id="projectnumber">&#160;1.0.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.13.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(0); });
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search',false);
$(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-slots">Private Slots</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classPGetTheoryBlockDialog-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">PGetTheoryBlockDialog Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>Dialog for creating THEORY blocks in msr files.
<a href="#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="PGetTheoryBlockDialog_8h_source.html">PGetTheoryBlockDialog.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for PGetTheoryBlockDialog:</div>
<div class="dyncontent">
<div class="center"><img src="classPGetTheoryBlockDialog__inherit__graph.png" border="0" usemap="#aPGetTheoryBlockDialog_inherit__map" alt="Inheritance graph"/></div>
<map name="aPGetTheoryBlockDialog_inherit__map" id="aPGetTheoryBlockDialog_inherit__map">
<area shape="rect" title="Dialog for creating THEORY blocks in msr files." alt="" coords="32,81,198,109"/>
<area shape="rect" title=" " alt="" coords="5,5,76,33"/>
<area shape="poly" title=" " alt="" coords="67,42,104,79,100,82,63,46"/>
<area shape="rect" title=" " alt="" coords="100,5,283,33"/>
<area shape="poly" title=" " alt="" coords="169,46,130,82,127,79,165,42"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for PGetTheoryBlockDialog:</div>
<div class="dyncontent">
<div class="center"><img src="classPGetTheoryBlockDialog__coll__graph.png" border="0" usemap="#aPGetTheoryBlockDialog_coll__map" alt="Collaboration graph"/></div>
<map name="aPGetTheoryBlockDialog_coll__map" id="aPGetTheoryBlockDialog_coll__map">
<area shape="rect" title="Dialog for creating THEORY blocks in msr files." alt="" coords="108,191,274,218"/>
<area shape="rect" title=" " alt="" coords="5,98,76,126"/>
<area shape="poly" title=" " alt="" coords="77,132,170,188,168,192,74,136"/>
<area shape="rect" title=" " alt="" coords="100,98,283,126"/>
<area shape="poly" title=" " alt="" coords="194,141,194,190,188,190,188,141"/>
<area shape="rect" href="classPAdmin.html" title="Central administration class for musredit configuration management." alt="" coords="306,98,375,126"/>
<area shape="poly" title=" " alt="" coords="307,136,214,192,212,188,305,132"/>
<area shape="rect" title=" " alt="" coords="244,5,314,33"/>
<area shape="poly" title=" " alt="" coords="299,44,334,96,330,99,294,47"/>
<area shape="rect" href="structPMsr2DataParam.html" title="Parameter structure for msr2data tool integration." alt="" coords="338,5,463,33"/>
<area shape="poly" title=" " alt="" coords="386,47,351,99,347,96,381,44"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa36eaec3547d973a7602a0784fad86d2" id="r_aa36eaec3547d973a7602a0784fad86d2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa36eaec3547d973a7602a0784fad86d2">PGetTheoryBlockDialog</a> (<a class="el" href="classPAdmin.html">PAdmin</a> *admin=0, const QString helpUrl=&quot;&quot;)</td></tr>
<tr class="memdesc:aa36eaec3547d973a7602a0784fad86d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a dialog for creating THEORY blocks. <br /></td></tr>
<tr class="separator:aa36eaec3547d973a7602a0784fad86d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1202f13c3158731bf87cb6c15ddaf3ec" id="r_a1202f13c3158731bf87cb6c15ddaf3ec"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1202f13c3158731bf87cb6c15ddaf3ec">getTheoryBlock</a> ()</td></tr>
<tr class="memdesc:a1202f13c3158731bf87cb6c15ddaf3ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the complete theory block text. <br /></td></tr>
<tr class="separator:a1202f13c3158731bf87cb6c15ddaf3ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-slots" name="pri-slots"></a>
Private Slots</h2></td></tr>
<tr class="memitem:a1e2df9b59726ce874e296703177aa190" id="r_a1e2df9b59726ce874e296703177aa190"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1e2df9b59726ce874e296703177aa190">getTheoFuncString</a> ()</td></tr>
<tr class="memdesc:a1e2df9b59726ce874e296703177aa190"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates the theory function string for the selected function. <br /></td></tr>
<tr class="separator:a1e2df9b59726ce874e296703177aa190"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a444e0ba744ade36f57b637d59431a363" id="r_a444e0ba744ade36f57b637d59431a363"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a444e0ba744ade36f57b637d59431a363">addPlus</a> ()</td></tr>
<tr class="memdesc:a444e0ba744ade36f57b637d59431a363"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds the selected function followed by a '+' operator. <br /></td></tr>
<tr class="separator:a444e0ba744ade36f57b637d59431a363"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae2242c46e63fa7d2cad70d6d414b0716" id="r_ae2242c46e63fa7d2cad70d6d414b0716"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ae2242c46e63fa7d2cad70d6d414b0716">addMultiply</a> ()</td></tr>
<tr class="memdesc:ae2242c46e63fa7d2cad70d6d414b0716"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds the selected function (multiplication with next line). <br /></td></tr>
<tr class="separator:ae2242c46e63fa7d2cad70d6d414b0716"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa09a7e12009a82477d7011673e0ae758" id="r_aa09a7e12009a82477d7011673e0ae758"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aa09a7e12009a82477d7011673e0ae758">helpContent</a> ()</td></tr>
<tr class="memdesc:aa09a7e12009a82477d7011673e0ae758"><td class="mdescLeft">&#160;</td><td class="mdescRight">Opens the online help for THEORY blocks. <br /></td></tr>
<tr class="separator:aa09a7e12009a82477d7011673e0ae758"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pri-attribs" name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a6074cf6c8ab11b321b6c821881a78831" id="r_a6074cf6c8ab11b321b6c821881a78831"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classPAdmin.html">PAdmin</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a6074cf6c8ab11b321b6c821881a78831">fAdmin</a></td></tr>
<tr class="memdesc:a6074cf6c8ab11b321b6c821881a78831"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pointer to the administration object for accessing theory function definitions. <br /></td></tr>
<tr class="separator:a6074cf6c8ab11b321b6c821881a78831"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a665712aec1635ab7f93ab609afc4b643" id="r_a665712aec1635ab7f93ab609afc4b643"><td class="memItemLeft" align="right" valign="top">QString&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a665712aec1635ab7f93ab609afc4b643">fHelpUrl</a></td></tr>
<tr class="memdesc:a665712aec1635ab7f93ab609afc4b643"><td class="mdescLeft">&#160;</td><td class="mdescRight">URL to the online documentation for THEORY blocks. <br /></td></tr>
<tr class="separator:a665712aec1635ab7f93ab609afc4b643"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Dialog for creating THEORY blocks in msr files. </p>
<p>This dialog allows users to build theory function expressions by selecting from a list of available theory functions. Functions can be combined using addition (+) or multiplication (*) operators. The dialog displays LaTeX-rendered equation icons for visual function identification.</p>
<dl class="section user"><dt>Available Theory Functions:</dt><dd>Theory functions are loaded from the XML configuration file and include:<ul>
<li>Asymmetry functions (asymmetry, simpleGss, simpleLor, etc.)</li>
<li>Relaxation functions (expLF, stretchedExp, etc.)</li>
<li>Oscillation functions (TFieldCos, internFld, etc.)</li>
<li>User-defined functions (userFcn)</li>
</ul>
</dd></dl>
<dl class="section user"><dt>Theory Block Syntax:</dt><dd>Functions on the same line are multiplied; functions preceded by '+' are added: <div class="fragment"><div class="line">THEORY</div>
<div class="line">asymmetry 1</div>
<div class="line">simpleGss 2 (rate)</div>
<div class="line">+</div>
<div class="line">asymmetry 3</div>
<div class="line">simpleLor 4 (rate)</div>
</div><!-- fragment --> This represents: A1 * Gss(t) + A2 * Lor(t)</dd></dl>
<dl class="section user"><dt>Parameter Numbering:</dt><dd>Each function line includes placeholder parameter numbers (1, 2, 3...) that should be replaced with actual parameter references from the FITPARAMETER block or map indices.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPAdmin.html" title="Central administration class for musredit configuration management.">PAdmin</a> For loading and managing theory function definitions </dd>
<dd>
<a class="el" href="structPTheory.html" title="Structure holding information about a musrfit theory function.">PTheory</a> For the structure holding individual theory function data </dd></dl>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8h_source.html#l00091">91</a> of file <a class="el" href="PGetTheoryBlockDialog_8h_source.html">PGetTheoryBlockDialog.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aa36eaec3547d973a7602a0784fad86d2" name="aa36eaec3547d973a7602a0784fad86d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa36eaec3547d973a7602a0784fad86d2">&#9670;&#160;</a></span>PGetTheoryBlockDialog()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">PGetTheoryBlockDialog::PGetTheoryBlockDialog </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classPAdmin.html">PAdmin</a> *</td> <td class="paramname"><span class="paramname"><em>admin</em></span><span class="paramdefsep"> = </span><span class="paramdefval">0</span>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const QString</td> <td class="paramname"><span class="paramname"><em>helpUrl</em></span><span class="paramdefsep"> = </span><span class="paramdefval">&quot;&quot;</span>&#160;)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructs a dialog for creating THEORY blocks. </p>
<p>Constructor - Initializes the THEORY block dialog.</p>
<p>Initializes the dialog with available theory functions from the administration object. Sets up the combo box with function names and LaTeX equation icons loaded from embedded resources. The dialog is configured as modal to ensure user interaction completion.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">admin</td><td>Pointer to the <a class="el" href="classPAdmin.html" title="Central administration class for musredit configuration management.">PAdmin</a> object containing theory function definitions loaded from the XML configuration file. If nullptr, the dialog will not function properly. </td></tr>
<tr><td class="paramname">helpUrl</td><td>URL string pointing to online documentation for THEORY blocks. If empty, help button will show a placeholder message.</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPAdmin.html#a8bd699523cfe232b5ed33ddd9fd11a48" title="Get number of registered theory functions.">PAdmin::getTheoryCounts()</a> For retrieving number of available functions </dd>
<dd>
<a class="el" href="classPAdmin.html#a35b908e12cae5e6591b93b24a8c4166e" title="Get a theory function definition by index.">PAdmin::getTheoryItem()</a> For accessing individual theory function data</dd></dl>
<p>Sets up the user interface and populates the theory function combo box with all available theory functions from the administration object. Each function is displayed with its label and, if available, a LaTeX-rendered equation icon.</p>
<p>The combo box icon size is set to 250x20 pixels to accommodate LaTeX equation images. Icons are loaded from embedded Qt resources (:/latex_images/) based on the pixmap name specified in each theory function definition.</p>
<p>The dialog is configured as modal, requiring user interaction before returning control to the parent window.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">admin</td><td>Pointer to the <a class="el" href="classPAdmin.html" title="Central administration class for musredit configuration management.">PAdmin</a> administration object containing theory function definitions loaded from musrfit_startup.xml. Must not be nullptr for proper operation. </td></tr>
<tr><td class="paramname">helpUrl</td><td>URL string for the online help documentation. If empty, help button will display a placeholder message instead of opening a web browser.</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>The dialog assumes fAdmin is valid and contains at least one theory function. No validation is performed on the admin pointer.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPAdmin.html#a8bd699523cfe232b5ed33ddd9fd11a48" title="Get number of registered theory functions.">PAdmin::getTheoryCounts()</a> Returns the number of available theory functions </dd>
<dd>
<a class="el" href="classPAdmin.html#a35b908e12cae5e6591b93b24a8c4166e" title="Get a theory function definition by index.">PAdmin::getTheoryItem()</a> Retrieves a specific theory function definition </dd>
<dd>
<a class="el" href="structPTheory.html" title="Structure holding information about a musrfit theory function.">PTheory</a> Structure containing function name, parameters, label, and pixmap name </dd></dl>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html#l00084">84</a> of file <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html">PGetTheoryBlockDialog.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae2242c46e63fa7d2cad70d6d414b0716" name="ae2242c46e63fa7d2cad70d6d414b0716"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae2242c46e63fa7d2cad70d6d414b0716">&#9670;&#160;</a></span>addMultiply</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void PGetTheoryBlockDialog::addMultiply </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span><span class="mlabel slot">slot</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds the selected function (multiplication with next line). </p>
<p>Adds the current theory function for multiplication.</p>
<p>Appends the currently selected theory function to the text editor on a new line. In musrfit theory blocks, functions on consecutive lines (without a '+' separator) are multiplied together. This is the default operation for combining functions like asymmetry with relaxation.</p>
<p>Example result in editor: </p><div class="fragment"><div class="line">asymmetry 1</div>
<div class="line">simpleGss 2 (rate)</div>
</div><!-- fragment --><p> Represents: A1 * Gss(t)</p>
<dl class="section note"><dt>Note</dt><dd>Connected to the "Multiply" button click signal in the UI.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#a444e0ba744ade36f57b637d59431a363" title="Adds the selected function followed by a &#39;+&#39; operator.">addPlus()</a> For additive combination</dd></dl>
<p>Retrieves the formatted string for the currently selected theory function and appends it to the theory block text editor on a new line. In musrfit theory block syntax, functions on consecutive lines (without a '+' separator between them) are implicitly multiplied together.</p>
<p>This creates multiplicative terms in the fit model. For example: </p><div class="fragment"><div class="line">asymmetry 1</div>
<div class="line">simpleGss 2 (rate)</div>
<div class="line">TFieldCos 3 4 (phase frequency)</div>
</div><!-- fragment --><p> Represents: A1 * Gss(t) * cos(ωt + φ)</p>
<dl class="section note"><dt>Note</dt><dd>In the code comment "newline == '*'" refers to the implicit multiplication semantics: a newline without '+' means multiply. </dd>
<dd>
This slot is connected to the "Multiply" button in the UI (fMultiply_pushButton).</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#a1e2df9b59726ce874e296703177aa190" title="Generates the theory function string for the selected function.">getTheoFuncString()</a> Generates the theory function string </dd>
<dd>
<a class="el" href="#a444e0ba744ade36f57b637d59431a363" title="Adds the selected function followed by a &#39;+&#39; operator.">addPlus()</a> For additive combination of functions </dd></dl>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html#l00222">222</a> of file <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html">PGetTheoryBlockDialog.cpp</a>.</p>
</div>
</div>
<a id="a444e0ba744ade36f57b637d59431a363" name="a444e0ba744ade36f57b637d59431a363"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a444e0ba744ade36f57b637d59431a363">&#9670;&#160;</a></span>addPlus</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void PGetTheoryBlockDialog::addPlus </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span><span class="mlabel slot">slot</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds the selected function followed by a '+' operator. </p>
<p>Adds the current theory function followed by a '+' operator.</p>
<p>Appends the currently selected theory function to the text editor, followed by a '+' character on a new line. This indicates that the next function should be added (summed) rather than multiplied. In musrfit theory blocks, the '+' operator creates additive terms in the fit function.</p>
<p>Example result in editor: </p><div class="fragment"><div class="line">asymmetry 1</div>
<div class="line">simpleGss 2 (rate)</div>
<div class="line">+</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Connected to the "Plus" button click signal in the UI.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#ae2242c46e63fa7d2cad70d6d414b0716" title="Adds the selected function (multiplication with next line).">addMultiply()</a> For multiplicative combination</dd></dl>
<p>Retrieves the formatted string for the currently selected theory function and appends it to the theory block text editor, followed by a newline and a '+' character. The '+' indicates that the next function should be added (summed) rather than multiplied with the current function.</p>
<p>This creates additive terms in the fit model. For example: </p><div class="fragment"><div class="line">asymmetry 1</div>
<div class="line">simpleGss 2 (rate)</div>
<div class="line">+</div>
<div class="line">asymmetry 3</div>
<div class="line">simpleLor 4 (rate)</div>
</div><!-- fragment --><p> Represents: A1*Gss(t) + A2*Lor(t)</p>
<dl class="section note"><dt>Note</dt><dd>This slot is connected to the "Plus" button in the UI (fPlus_pushButton).</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#a1e2df9b59726ce874e296703177aa190" title="Generates the theory function string for the selected function.">getTheoFuncString()</a> Generates the theory function string </dd>
<dd>
<a class="el" href="#ae2242c46e63fa7d2cad70d6d414b0716" title="Adds the selected function (multiplication with next line).">addMultiply()</a> For multiplicative combination of functions </dd></dl>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html#l00192">192</a> of file <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html">PGetTheoryBlockDialog.cpp</a>.</p>
</div>
</div>
<a id="a1e2df9b59726ce874e296703177aa190" name="a1e2df9b59726ce874e296703177aa190"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e2df9b59726ce874e296703177aa190">&#9670;&#160;</a></span>getTheoFuncString</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">QString PGetTheoryBlockDialog::getTheoFuncString </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span><span class="mlabel slot">slot</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Generates the theory function string for the selected function. </p>
<p>Generates the formatted theory function string for the selected function.</p>
<p>Constructs a formatted string for the currently selected theory function from the combo box. The string includes:</p><ul>
<li>Function name (e.g., "asymmetry", "simpleGss")</li>
<li>For userFcn: library and function names (e.g., "libMyLibrary.so TMyFunction")</li>
<li>Sequential parameter placeholders (1, 2, 3, ...)</li>
<li>Function comment describing parameters</li>
</ul>
<p>Example output: "simpleGss 1 2 (phase frequency)"</p>
<dl class="section return"><dt>Returns</dt><dd>QString containing the formatted theory function line. Returns "????" if no valid theory item is found at the current index.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structPTheory.html" title="Structure holding information about a musrfit theory function.">PTheory</a> For the structure defining theory function properties</dd></dl>
<p>Constructs a complete theory function line suitable for insertion into an msr file THEORY block. The format depends on the function type:</p>
<p>For standard functions: </p><div class="fragment"><div class="line">functionName 1 2 3 ... (comment)</div>
</div><!-- fragment --><p>For user-defined functions (userFcn): </p><div class="fragment"><div class="line">userFcn libMyLibrary.so TMyFunction 1 2 ... (comment)</div>
</div><!-- fragment --><p>The parameter numbers (1, 2, 3, ...) are placeholders that should be replaced with actual FITPARAMETER indices or map references before the msr file is used for fitting.</p>
<dl class="section return"><dt>Returns</dt><dd>QString containing the formatted theory function line with:<ul>
<li>Function name</li>
<li>Library and function names (for userFcn only)</li>
<li>Sequential parameter placeholders (1 to params count)</li>
<li>Parameter comment from theory definition Returns "????" if the theory item cannot be retrieved (invalid index).</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>This is a private slot method typically called by <a class="el" href="#a444e0ba744ade36f57b637d59431a363" title="Adds the selected function followed by a &#39;+&#39; operator.">addPlus()</a> and <a class="el" href="#ae2242c46e63fa7d2cad70d6d414b0716" title="Adds the selected function (multiplication with next line).">addMultiply()</a>.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structPTheory.html#a0789fffc8d1edeb9cf8ad7eebf9fe920" title="Internal function name used in msr files (e.g., &quot;asymmetry&quot;, &quot;simplExpo&quot;).">PTheory::name</a> Function name as defined in XML </dd>
<dd>
<a class="el" href="structPTheory.html#a88a8f08b16a689c5805f12c3d3ad6cdd" title="Number of parameters required by this theory function.">PTheory::params</a> Number of parameters required by the function </dd>
<dd>
<a class="el" href="structPTheory.html#a4f96f6484e98b76c3c5583b973d27198" title="Human-readable description of the theory function.">PTheory::comment</a> Descriptive text explaining the parameters </dd>
<dd>
<a class="el" href="#a444e0ba744ade36f57b637d59431a363" title="Adds the selected function followed by a &#39;+&#39; operator.">addPlus()</a> Uses this method to add functions with addition </dd>
<dd>
<a class="el" href="#ae2242c46e63fa7d2cad70d6d414b0716" title="Adds the selected function (multiplication with next line).">addMultiply()</a> Uses this method to add functions with multiplication </dd></dl>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html#l00145">145</a> of file <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html">PGetTheoryBlockDialog.cpp</a>.</p>
</div>
</div>
<a id="a1202f13c3158731bf87cb6c15ddaf3ec" name="a1202f13c3158731bf87cb6c15ddaf3ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1202f13c3158731bf87cb6c15ddaf3ec">&#9670;&#160;</a></span>getTheoryBlock()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">QString PGetTheoryBlockDialog::getTheoryBlock </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel inline">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the complete theory block text. </p>
<p>Retrieves all theory function expressions entered by the user through the dialog interface. The returned string is formatted according to musrfit msr file specifications and is ready for direct insertion into the THEORY section of an msr file.</p>
<dl class="section return"><dt>Returns</dt><dd>QString containing all theory function lines, with proper formatting including function names, parameter placeholders, comments, and operators ('+' for addition, newline for multiplication).</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The returned string should be parsed and parameter numbers replaced with actual FITPARAMETER references before saving to file. </dd></dl>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8h_source.html#l00130">130</a> of file <a class="el" href="PGetTheoryBlockDialog_8h_source.html">PGetTheoryBlockDialog.h</a>.</p>
</div>
</div>
<a id="aa09a7e12009a82477d7011673e0ae758" name="aa09a7e12009a82477d7011673e0ae758"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa09a7e12009a82477d7011673e0ae758">&#9670;&#160;</a></span>helpContent</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void PGetTheoryBlockDialog::helpContent </td>
<td>(</td>
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span><span class="mlabel slot">slot</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Opens the online help for THEORY blocks. </p>
<p>Opens online help documentation for THEORY blocks.</p>
<p>Attempts to open the help URL in the system's default web browser using QDesktopServices. If the URL is empty, displays a placeholder information message. If the browser cannot be opened, shows an error dialog with the URL for manual access.</p>
<p>The help documentation typically covers:</p><ul>
<li>Available theory functions and their parameters</li>
<li>Syntax for combining functions</li>
<li>Examples of common theory block patterns</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Connected to the help button click signal in the UI.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#aa36eaec3547d973a7602a0784fad86d2" title="Constructs a dialog for creating THEORY blocks.">PGetTheoryBlockDialog::PGetTheoryBlockDialog()</a> Where helpUrl is set</dd></dl>
<p>Attempts to open the help URL in the user's default web browser using QDesktopServices::openUrl(). The help typically provides comprehensive documentation on:</p><ul>
<li>Available theory functions and their physical meanings</li>
<li>Parameter descriptions for each function</li>
<li>Syntax rules for combining functions</li>
<li>Examples of common theory block patterns for µSR data analysis</li>
</ul>
<p>Error handling:</p><ul>
<li>If fHelpUrl is empty: displays an information dialog with a placeholder message</li>
<li>If the browser fails to open: displays a critical error dialog with the URL formatted as a clickable hyperlink for manual access</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>The URL is parsed in TolerantMode to handle various URL formats gracefully. </dd>
<dd>
This slot is connected to the help button in the UI.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="#aa36eaec3547d973a7602a0784fad86d2" title="Constructs a dialog for creating THEORY blocks.">PGetTheoryBlockDialog::PGetTheoryBlockDialog()</a> Where <a class="el" href="#a665712aec1635ab7f93ab609afc4b643" title="URL to the online documentation for THEORY blocks.">fHelpUrl</a> is initialized </dd></dl>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html#l00250">250</a> of file <a class="el" href="PGetTheoryBlockDialog_8cpp_source.html">PGetTheoryBlockDialog.cpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a6074cf6c8ab11b321b6c821881a78831" name="a6074cf6c8ab11b321b6c821881a78831"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6074cf6c8ab11b321b6c821881a78831">&#9670;&#160;</a></span>fAdmin</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classPAdmin.html">PAdmin</a>* PGetTheoryBlockDialog::fAdmin</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Pointer to the administration object for accessing theory function definitions. </p>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8h_source.html#l00214">214</a> of file <a class="el" href="PGetTheoryBlockDialog_8h_source.html">PGetTheoryBlockDialog.h</a>.</p>
</div>
</div>
<a id="a665712aec1635ab7f93ab609afc4b643" name="a665712aec1635ab7f93ab609afc4b643"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a665712aec1635ab7f93ab609afc4b643">&#9670;&#160;</a></span>fHelpUrl</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">QString PGetTheoryBlockDialog::fHelpUrl</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel private">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>URL to the online documentation for THEORY blocks. </p>
<p class="definition">Definition at line <a class="el" href="PGetTheoryBlockDialog_8h_source.html#l00215">215</a> of file <a class="el" href="PGetTheoryBlockDialog_8h_source.html">PGetTheoryBlockDialog.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/workspace/LMU/musrfit/src/musredit_qt6/musredit/<a class="el" href="PGetTheoryBlockDialog_8h_source.html">PGetTheoryBlockDialog.h</a></li>
<li>/workspace/LMU/musrfit/src/musredit_qt6/musredit/<a class="el" href="PGetTheoryBlockDialog_8cpp_source.html">PGetTheoryBlockDialog.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.13.2
</small></address>
</div><!-- doc-content -->
</body>
</html>