157 lines
9.5 KiB
HTML
157 lines
9.5 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<!-- CSTextEntry.qml -->
|
|
<title>CSTextEntry QML Type | CSDataQuick Documentation 1.2</title>
|
|
<link rel="stylesheet" type="text/css" href="style/online.css" />
|
|
<script type="text/javascript">
|
|
(function (i, s, o, g, r, a, m) {
|
|
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
|
(i[r].q = i[r].q || []).push(arguments)
|
|
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
|
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
|
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
|
|
|
ga('create', 'UA-24645639-4', 'qt.io');
|
|
ga('set', 'forceSSL', true);
|
|
ga('send', 'pageview');
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="header" id="header">
|
|
<header id="navbar" class="">
|
|
</header>
|
|
</div>
|
|
<div class="main">
|
|
<div class="main-rounded">
|
|
<div class="navigationbar">
|
|
<ul class="sub-navigation">
|
|
<li><a href="../../CSDataQuick.html">Home</a></li>
|
|
<li><a href="../docs.html" class="active">Documentation</a></li>
|
|
<li><a href="http://github.com/xiaoqiangwang/CSDataQuick/">Code</a></li>
|
|
<li><a href="https://github.com/xiaoqiangwang/CSDataQuick/issues/">Bug Reports</a></li>
|
|
</ul>
|
|
<div id="main_title_bar">
|
|
<h1>CSDataQuick Documentation</h1>
|
|
<div class="search_bar">
|
|
<script>
|
|
(function() {
|
|
var cx = '001693341472456439948:u9v0snkru3q';
|
|
var gcse = document.createElement('script');
|
|
gcse.type = 'text/javascript';
|
|
gcse.async = true;
|
|
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//www.google.com/cse/cse.js?cx=' + cx;
|
|
var s = document.getElementsByTagName('script')[0];
|
|
s.parentNode.insertBefore(gcse, s);
|
|
})();
|
|
</script>
|
|
<gcse:searchbox-only resultsUrl="search-results.html"></gcse:searchbox-only>
|
|
</div></div>
|
|
<ul>
|
|
<li><a href="index.html">CSDataQuick Documentation</a></li>
|
|
<li><a href="csdataquick-qmlmodules.html">QML Types</a></li>
|
|
<li>CSTextEntry QML Type</li>
|
|
</ul>
|
|
</div>
|
|
<div class="content">
|
|
<div class="line">
|
|
<div class="content mainContent">
|
|
<div class="sidebar">
|
|
<div class="toc">
|
|
<h3><a name="toc">Contents</a></h3>
|
|
<ul>
|
|
<li class="level1"><a href="qml-csdataquick-components-cstextentry.html#properties">Properties</a></li>
|
|
<li class="level1"><a href="qml-csdataquick-components-cstextentry.html#details">Detailed Description</a></li>
|
|
</ul>
|
|
</div>
|
|
<div class="sidebar-content" id="sidebar-content"></div></div>
|
|
<div class="context">
|
|
<h1 class="title">CSTextEntry QML Type</h1>
|
|
<span class="subtitle"></span>
|
|
<!-- $$$CSTextEntry-brief -->
|
|
<p>Display an editable text. <a href="qml-csdataquick-components-cstextentry.html#details">More...</a></p>
|
|
<!-- @@@CSTextEntry -->
|
|
<div class="table"><table class="alignedsummary">
|
|
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import CSDataQuick.Components 1.0</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <p><a href="qml-csdataquick-components-cscontrol.html">CSControl</a></p>
|
|
</td></tr></table></div><ul>
|
|
<li><a href="qml-csdataquick-components-cstextentry-members.html">List of all members, including inherited members</a></li>
|
|
</ul>
|
|
<a name="properties"></a>
|
|
<h2 id="properties">Properties</h2>
|
|
<ul>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-components-cstextentry.html#align-prop">align</a></b></b> : enumeration</li>
|
|
<li class="fn"><b><b><a href="qml-csdataquick-components-cstextentry.html#format-prop">format</a></b></b> : int</li>
|
|
</ul>
|
|
<!-- $$$CSTextEntry-description -->
|
|
<a name="details"></a>
|
|
<h2 id="details">Detailed Description</h2>
|
|
<p>The Text Entry provides a means of displaying the value of a process variable in an entry box, where it can be edited and changed. The value is not sent until Return is pressed with the focus in the entry box. If the focus leaves the entry box before Return is pressed, the value of the process variable is not changed and the current value is restored into the entry box. The resulting value of the process variable is shown when and only when the cursor leaves the entry box. The value after leaving the entry box can be used to verify that the input was accepted.</p>
|
|
<p>If the native format of the process variable associated with the Text Entry is DBR_STRING or DBR_CHAR, then the string entered in the Text Entry will be sent to the process variable.</p>
|
|
<p>If the native type is DBR_ENUM, then it will first try to match the entered string to one of the state strings of the process variable. If that fails, it will try to interpret the string as a number representing one of the state strings and send that number to the process variable.</p>
|
|
<p>For the native types for which a number is meaningful, the behavior of the Text Entry will depend on the format of the Text Entry. If the Text Entry has a format of octal, then numbers may be input with or without a leading 0 and will be interpreted as octal. That is, entering either 010 or 10 results in 8 decimal. Entering 8 is an error. The numbers will be displayed with a leading 0 when they are updated. Similarly, if the Text Entry is formatted to hexadecimal, then numbers may be input with or without a leading 0x or 0X and will be interpreted as hexadecimal. In this case, 0x10, 010 or 10 will result in 16 decimal. In all other formats, input values will be interpreted as decimal unless they begin with 0x or 0X, in which case they are interpreted as hexadecimal. Input numbers with a leading 0 in these formats will not be interpreted as octal because of the chance for error or confusion. If you want to input octal, you must format the Text Entry to octal.</p>
|
|
<pre class="qml"><span class="type"><a href="http://doc.qt.io/qt-5/qml-qtquick-column.html">Column</a></span> {
|
|
<span class="type"><a href="qml-csdataquick-components-cstextentry.html">CSTextEntry</a></span> {
|
|
<span class="name">width</span>: <span class="number">80</span>
|
|
<span class="name">height</span>: <span class="number">25</span>
|
|
<span class="name">source</span>: <span class="string">'bo'</span>
|
|
}
|
|
<span class="type"><a href="qml-csdataquick-components-cstextentry.html">CSTextEntry</a></span> {
|
|
<span class="name">width</span>: <span class="number">200</span>
|
|
<span class="name">height</span>: <span class="number">25</span>
|
|
<span class="name">source</span>: <span class="string">'wavec'</span>
|
|
}
|
|
<span class="type"><a href="qml-csdataquick-components-cstextentry.html">CSTextEntry</a></span> {
|
|
<span class="name">width</span>: <span class="number">80</span>
|
|
<span class="name">height</span>: <span class="number">25</span>
|
|
<span class="name">source</span>: <span class="string">'catest'</span>
|
|
<span class="name">format</span>: <span class="name">TextFormat</span>.<span class="name">Decimal</span>
|
|
}
|
|
<span class="type"><a href="qml-csdataquick-components-cstextentry.html">CSTextEntry</a></span> {
|
|
<span class="name">width</span>: <span class="number">80</span>
|
|
<span class="name">height</span>: <span class="number">25</span>
|
|
<span class="name">source</span>: <span class="string">'catest'</span>
|
|
<span class="name">format</span>: <span class="name">TextFormat</span>.<span class="name">Hexadecimal</span>
|
|
}
|
|
<span class="type"><a href="qml-csdataquick-components-cstextentry.html">CSTextEntry</a></span> {
|
|
<span class="name">width</span>: <span class="number">80</span>
|
|
<span class="name">height</span>: <span class="number">25</span>
|
|
<span class="name">source</span>: <span class="string">'catest'</span>
|
|
<span class="name">format</span>: <span class="name">TextFormat</span>.<span class="name">Octal</span>
|
|
}
|
|
}</pre>
|
|
<p class="centerAlign"><img src="images/textentry.png" alt="" /></p><!-- @@@CSTextEntry -->
|
|
<h2>Property Documentation</h2>
|
|
<!-- $$$align -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="align-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="align-prop"></a><span class="name">align</span> : <span class="type">enumeration</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>Sets the horizontal alignment of the text within the item width.</p>
|
|
<p>The valid values for horizontalAlignment are Text.AlignLeft, Text.AlignRight, Text.AlignHCenter and Text.AlignJustify. The font used depends on the item height using function <a href="qml-csdataquick-components-utilsjs.html#getBestFontSize-method">UtilsJS::getBestFontSize</a>.</p>
|
|
</div></div><!-- @@@align -->
|
|
<br/>
|
|
<!-- $$$format -->
|
|
<div class="qmlitem"><div class="qmlproto">
|
|
<div class="table"><table class="qmlname">
|
|
<tr valign="top" class="odd" id="format-prop">
|
|
<td class="tblQmlPropNode"><p>
|
|
<a name="format-prop"></a><span class="name">format</span> : <span class="type">int</span></p></td></tr>
|
|
</table></div>
|
|
</div><div class="qmldoc"><p>This property indicates how the data value is formated to text display.</p>
|
|
<p>For all of the formats, the result depends on the number and the precision in limits.</p>
|
|
<p><b>See also </b><a href="qml-csdataquick-components-textformat.html">TextFormat</a>.</p>
|
|
</div></div><!-- @@@format -->
|
|
<br/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">Copyright (C) 2012-2021 Xiaoqiang Wang, Paul Scherrer Institute.</div>
|
|
</body>
|
|
</html>
|