343 lines
19 KiB
HTML
343 lines
19 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: PGetFunctionsBlockDialog 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"> 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&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&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&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&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> |
|
|
<a href="#pri-slots">Private Slots</a> |
|
|
<a href="#pri-attribs">Private Attributes</a> |
|
|
<a href="classPGetFunctionsBlockDialog-members.html">List of all members</a> </div>
|
|
<div class="headertitle"><div class="title">PGetFunctionsBlockDialog Class Reference</div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Dialog for creating FUNCTIONS blocks in msr files.
|
|
<a href="#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="PGetFunctionsBlockDialog_8h_source.html">PGetFunctionsBlockDialog.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for PGetFunctionsBlockDialog:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classPGetFunctionsBlockDialog__inherit__graph.png" border="0" usemap="#aPGetFunctionsBlockDialog_inherit__map" alt="Inheritance graph"/></div>
|
|
<map name="aPGetFunctionsBlockDialog_inherit__map" id="aPGetFunctionsBlockDialog_inherit__map">
|
|
<area shape="rect" title="Dialog for creating FUNCTIONS blocks in msr files." alt="" coords="29,81,212,109"/>
|
|
<area shape="rect" title=" " alt="" coords="5,5,76,33"/>
|
|
<area shape="poly" title=" " alt="" coords="68,42,108,79,105,83,64,46"/>
|
|
<area shape="rect" title=" " alt="" coords="100,5,301,33"/>
|
|
<area shape="poly" title=" " alt="" coords="177,46,136,83,133,79,173,42"/>
|
|
</map>
|
|
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
|
|
<div class="dynheader">
|
|
Collaboration diagram for PGetFunctionsBlockDialog:</div>
|
|
<div class="dyncontent">
|
|
<div class="center"><img src="classPGetFunctionsBlockDialog__coll__graph.png" border="0" usemap="#aPGetFunctionsBlockDialog_coll__map" alt="Collaboration graph"/></div>
|
|
<map name="aPGetFunctionsBlockDialog_coll__map" id="aPGetFunctionsBlockDialog_coll__map">
|
|
<area shape="rect" title="Dialog for creating FUNCTIONS blocks in msr files." alt="" coords="29,81,212,109"/>
|
|
<area shape="rect" title=" " alt="" coords="5,5,76,33"/>
|
|
<area shape="poly" title=" " alt="" coords="68,42,108,79,105,83,64,46"/>
|
|
<area shape="rect" title=" " alt="" coords="100,5,301,33"/>
|
|
<area shape="poly" title=" " alt="" coords="177,46,136,83,133,79,173,42"/>
|
|
</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:aa4bcd04947f4a5674943b318d96cbc67" id="r_aa4bcd04947f4a5674943b318d96cbc67"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa4bcd04947f4a5674943b318d96cbc67">PGetFunctionsBlockDialog</a> (const QString helpUrl="")</td></tr>
|
|
<tr class="memdesc:aa4bcd04947f4a5674943b318d96cbc67"><td class="mdescLeft"> </td><td class="mdescRight">Constructs the FUNCTIONS block dialog. <br /></td></tr>
|
|
<tr class="separator:aa4bcd04947f4a5674943b318d96cbc67"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a047996be513690813c82a93083773df0" id="r_a047996be513690813c82a93083773df0"><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#a047996be513690813c82a93083773df0">getFunctionsBlock</a> ()</td></tr>
|
|
<tr class="memdesc:a047996be513690813c82a93083773df0"><td class="mdescLeft"> </td><td class="mdescRight">Returns the complete FUNCTIONS block text. <br /></td></tr>
|
|
<tr class="separator:a047996be513690813c82a93083773df0"><td class="memSeparator" colspan="2"> </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:a0061cec3221b07f77fd80003302e9863" id="r_a0061cec3221b07f77fd80003302e9863"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0061cec3221b07f77fd80003302e9863">addFunction</a> ()</td></tr>
|
|
<tr class="memdesc:a0061cec3221b07f77fd80003302e9863"><td class="mdescLeft"> </td><td class="mdescRight">Validates and adds a function to the FUNCTIONS block. <br /></td></tr>
|
|
<tr class="separator:a0061cec3221b07f77fd80003302e9863"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae803665ee11f06c1217000c617d322d4" id="r_ae803665ee11f06c1217000c617d322d4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae803665ee11f06c1217000c617d322d4">helpContent</a> ()</td></tr>
|
|
<tr class="memdesc:ae803665ee11f06c1217000c617d322d4"><td class="mdescLeft"> </td><td class="mdescRight">Opens the online help for FUNCTIONS blocks. <br /></td></tr>
|
|
<tr class="separator:ae803665ee11f06c1217000c617d322d4"><td class="memSeparator" colspan="2"> </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:a0f6cf9ff6fdce930f8bf686485f23f1d" id="r_a0f6cf9ff6fdce930f8bf686485f23f1d"><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0f6cf9ff6fdce930f8bf686485f23f1d">fHelpUrl</a></td></tr>
|
|
<tr class="memdesc:a0f6cf9ff6fdce930f8bf686485f23f1d"><td class="mdescLeft"> </td><td class="mdescRight">URL to the online documentation for FUNCTIONS blocks. <br /></td></tr>
|
|
<tr class="separator:a0f6cf9ff6fdce930f8bf686485f23f1d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Dialog for creating FUNCTIONS blocks in msr files. </p>
|
|
<p>This dialog allows users to define mathematical functions that combine fit parameters. Functions are used in musrfit to create derived quantities from the basic fit parameters, enabling complex relationships between parameters without modifying the theory function.</p>
|
|
<dl class="section user"><dt>Function Syntax:</dt><dd>Functions follow the format "funX = expression" where:<ul>
|
|
<li>X is a positive integer (function number)</li>
|
|
<li>expression can contain: parN (parameters), mapN (mapped parameters), mathematical operators (+, -, *, /), and standard functions (cos, sin, exp, etc.)</li>
|
|
</ul>
|
|
</dd></dl>
|
|
<dl class="section user"><dt>Validation Rules:</dt><dd>The dialog performs basic syntax validation:<ul>
|
|
<li>Function must start with "fun" prefix</li>
|
|
<li>Function must contain "funX =" format where X is a number</li>
|
|
<li>A function definition cannot reference other functions (no "funN" in expression)</li>
|
|
</ul>
|
|
</dd></dl>
|
|
<dl class="section user"><dt>Example Functions:</dt><dd><div class="fragment"><div class="line">FUNCTIONS</div>
|
|
<div class="line">fun1 = par1 * cos(par2 * 0.017453)</div>
|
|
<div class="line">fun2 = par3 + par4</div>
|
|
<div class="line">fun3 = map1 * par5</div>
|
|
</div><!-- fragment --></dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>The validation is basic and does not perform full syntax/semantic checking. Complex expressions should be verified by running musrfit.</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classPGetParameterBlockDialog.html" title="Dialog for creating FITPARAMETER blocks in msr files.">PGetParameterBlockDialog</a> For defining fit parameters used in functions </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PGetFunctionsBlockDialog_8h_source.html#l00087">87</a> of file <a class="el" href="PGetFunctionsBlockDialog_8h_source.html">PGetFunctionsBlockDialog.h</a>.</p>
|
|
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="aa4bcd04947f4a5674943b318d96cbc67" name="aa4bcd04947f4a5674943b318d96cbc67"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa4bcd04947f4a5674943b318d96cbc67">◆ </a></span>PGetFunctionsBlockDialog()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">PGetFunctionsBlockDialog::PGetFunctionsBlockDialog </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">""</span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Constructs the FUNCTIONS block dialog. </p>
|
|
<p>Initializes the dialog UI and sets focus to the function input field. The dialog is created as modal.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">helpUrl</td><td>URL to the online documentation for FUNCTIONS blocks. Defaults to empty string if not provided. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PGetFunctionsBlockDialog_8cpp_source.html#l00065">65</a> of file <a class="el" href="PGetFunctionsBlockDialog_8cpp_source.html">PGetFunctionsBlockDialog.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a0061cec3221b07f77fd80003302e9863" name="a0061cec3221b07f77fd80003302e9863"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0061cec3221b07f77fd80003302e9863">◆ </a></span>addFunction</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void PGetFunctionsBlockDialog::addFunction </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>Validates and adds a function to the FUNCTIONS block. </p>
|
|
<p>Validates and adds a function definition to the FUNCTIONS block.</p>
|
|
<p>Performs basic syntax checking before adding the function to the text display.</p>
|
|
<p>Performs basic syntax validation on the user's input before adding it to the FUNCTIONS block text area. This is a primitive validation that checks for common errors but is not a complete syntax/semantic checker.</p>
|
|
<dl class="section user"><dt>Validation Steps:</dt><dd><ol type="1">
|
|
<li>Checks that input is not empty</li>
|
|
<li>Verifies the function starts with "fun" prefix</li>
|
|
<li>Uses regex to confirm "funX =" format where X is a positive number</li>
|
|
<li>Ensures no function references appear in the expression (functions cannot reference other functions in musrfit)</li>
|
|
</ol>
|
|
</dd></dl>
|
|
<dl class="section user"><dt>Error Handling:</dt><dd>If validation fails, an error dialog is displayed describing the problem and the function is not added. The input field is preserved so the user can correct the error.</dd></dl>
|
|
<dl class="section note"><dt>Note</dt><dd>On successful validation, the function is appended to the text display and the input field is cleared for the next entry. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PGetFunctionsBlockDialog_8cpp_source.html#l00097">97</a> of file <a class="el" href="PGetFunctionsBlockDialog_8cpp_source.html">PGetFunctionsBlockDialog.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a047996be513690813c82a93083773df0" name="a047996be513690813c82a93083773df0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a047996be513690813c82a93083773df0">◆ </a></span>getFunctionsBlock()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">QString PGetFunctionsBlockDialog::getFunctionsBlock </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 FUNCTIONS block text. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>All function definitions entered by the user, ready for insertion into an msr file. </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PGetFunctionsBlockDialog_8h_source.html#l00099">99</a> of file <a class="el" href="PGetFunctionsBlockDialog_8h_source.html">PGetFunctionsBlockDialog.h</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae803665ee11f06c1217000c617d322d4" name="ae803665ee11f06c1217000c617d322d4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae803665ee11f06c1217000c617d322d4">◆ </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 PGetFunctionsBlockDialog::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 FUNCTIONS blocks. </p>
|
|
<p>Opens the online help documentation for FUNCTIONS blocks.</p>
|
|
<p>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. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PGetFunctionsBlockDialog_8cpp_source.html#l00145">145</a> of file <a class="el" href="PGetFunctionsBlockDialog_8cpp_source.html">PGetFunctionsBlockDialog.cpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Data Documentation</h2>
|
|
<a id="a0f6cf9ff6fdce930f8bf686485f23f1d" name="a0f6cf9ff6fdce930f8bf686485f23f1d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0f6cf9ff6fdce930f8bf686485f23f1d">◆ </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 PGetFunctionsBlockDialog::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 FUNCTIONS blocks. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="PGetFunctionsBlockDialog_8h_source.html#l00115">115</a> of file <a class="el" href="PGetFunctionsBlockDialog_8h_source.html">PGetFunctionsBlockDialog.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="PGetFunctionsBlockDialog_8h_source.html">PGetFunctionsBlockDialog.h</a></li>
|
|
<li>/workspace/LMU/musrfit/src/musredit_qt6/musredit/<a class="el" href="PGetFunctionsBlockDialog_8cpp_source.html">PGetFunctionsBlockDialog.cpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by <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>
|