summaryrefslogtreecommitdiffstats
path: root/doc/html/designer-manual-8.html
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-06-05 19:02:23 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-06-05 19:02:23 +0900
commit1f0ce8533cc837aa2d4155b5fc17d2004bed0197 (patch)
treed62f4174c0e58e1aa895fc71484d068b614cd6de /doc/html/designer-manual-8.html
parent8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 (diff)
downloadtqt3-1f0ce8533cc837aa2d4155b5fc17d2004bed0197.tar.gz
tqt3-1f0ce8533cc837aa2d4155b5fc17d2004bed0197.zip
Rename template library nt* related files to equivalent tq*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/designer-manual-8.html')
-rw-r--r--doc/html/designer-manual-8.html8
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/html/designer-manual-8.html b/doc/html/designer-manual-8.html
index 25db3e6b6..38b207de7 100644
--- a/doc/html/designer-manual-8.html
+++ b/doc/html/designer-manual-8.html
@@ -344,7 +344,7 @@ bool createConnections()
}
</pre>
<p>Firstly we look up the book's author and secondly we iterate through the <em>ComboBox</em>'s items until we find the author and set the <em>ComboBox</em>'s current item to the matching author.</p>
-</ul></ol><p>If the author name has changed or been deleted the query will fail and no author id will be inserted into the buffer causing the <tt>INSERT</tt> to fail. An alternative is to record the author id's as we populate the <em>ComboBox</em> and store them in a <a href="ntqmap.html">TQMap</a> which we can then look up as required. This approach requires changes to the<!-- index init() --> <tt>init()</tt>, <tt>beforeUpdateBook()</tt> and <tt>primeInsertBook()</tt> functions and the addition of a new function, <tt>mapAuthor()</tt>. The relevant code from <tt>qt/tools/designer/examples/book/book8/editbook.ui</tt> is shown below.</p>
+</ul></ol><p>If the author name has changed or been deleted the query will fail and no author id will be inserted into the buffer causing the <tt>INSERT</tt> to fail. An alternative is to record the author id's as we populate the <em>ComboBox</em> and store them in a <a href="tqmap.html">TQMap</a> which we can then look up as required. This approach requires changes to the<!-- index init() --> <tt>init()</tt>, <tt>beforeUpdateBook()</tt> and <tt>primeInsertBook()</tt> functions and the addition of a new function, <tt>mapAuthor()</tt>. The relevant code from <tt>qt/tools/designer/examples/book/book8/editbook.ui</tt> is shown below.</p>
<ol type=1><li><p>First we need to create a class variable to map author names to author id's. Click in the Members tab of the Object Explorer, then right click the Class Variables item and click <b>New</b>. Type in 'TQMap&lt;TQString,int&gt; authorMap;'.</p>
<li><p>We now record the author id's in the<!-- index init() --> <tt>init()</tt> function.</p>
<pre> void EditBookForm::init()
@@ -357,8 +357,8 @@ bool createConnections()
}
}
</pre>
- <p>After inserting each author's name into the <em>ComboBox</em> we populate a <a href="ntqmap.html">TQMap</a> with the author's name and id.</p>
-<li><p>Instead of looking up the author's id in the database we look it up in the <a href="ntqmap.html">TQMap</a>.</p>
+ <p>After inserting each author's name into the <em>ComboBox</em> we populate a <a href="tqmap.html">TQMap</a> with the author's name and id.</p>
+<li><p>Instead of looking up the author's id in the database we look it up in the <a href="tqmap.html">TQMap</a>.</p>
<pre> void EditBookForm::beforeUpdateBook( <a href="tqsqlrecord.html">TQSqlRecord</a> * buffer )
{
int id;
@@ -375,7 +375,7 @@ bool createConnections()
id = authorMap[ name ];
}
</pre>
- <p>If the populate flag is TRUE, we store the author's name and id in the <a href="ntqmap.html">TQMap</a>, otherwise we look up the given author name and set id appropriately.</p>
+ <p>If the populate flag is TRUE, we store the author's name and id in the <a href="tqmap.html">TQMap</a>, otherwise we look up the given author name and set id appropriately.</p>
<li><p>Before we perform an update we must ensure that the author combobox shows the right author.</p>
<pre> void EditBookForm::primeUpdateBook( <a href="tqsqlrecord.html">TQSqlRecord</a> * buffer )
{