summaryrefslogtreecommitdiffstats
path: root/doc/html/designer-manual-6.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/designer-manual-6.html')
-rw-r--r--doc/html/designer-manual-6.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/html/designer-manual-6.html b/doc/html/designer-manual-6.html
index ee8677c36..2ab181dcb 100644
--- a/doc/html/designer-manual-6.html
+++ b/doc/html/designer-manual-6.html
@@ -79,7 +79,7 @@ FORMS = settingsformbase.ui
<h5><a name="1-3-2"></a>Creating the Test Harness</h5>
<!-- index Forms!Creating Test Harnesses --><!-- index Creating Test Harnesses for Forms --><!-- index Subclassing --><p>Although we intend our dialog to be used within an application it is useful to create a test harness so that we can develop and test it stand-alone. Click <b>File|New</b> to invoke the 'New File' dialog, then click 'C++ Source', then click <b>OK</b>. In the editor window that pops up, enter the following code:</p>
<pre>
-#include &lt;ntqapplication.h&gt;
+#include &lt;tqapplication.h&gt;
#include "creditformbase.h"
int main( int argc, char *argv[] )
@@ -135,18 +135,18 @@ int main( int argc, char *argv[] )
</pre>
<p>We call <tt>setAmount()</tt> in the constructor to ensure that the correct amount is shown when the form starts based on whichever radio button we checked in <em>TQt Designer</em>. In <tt>setAmount()</tt> we set the amount if the standard or none radio button is checked. If the user has checked the special radio button they are free to change the amount themselves.</p>
<!-- index Makefiles --><!-- index qmake!HEADERS --><!-- index qmake!SOURCES --><p>To be able to test our subclass we change<!-- index main.cpp --> <tt>main.cpp</tt> to include <tt>creditform.h</tt> rather than <tt>creditformbase.h</tt> and change the instantiation of the creditForm object:</p>
-<pre> #include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+<pre> #include &lt;<a href="tqapplication-h.html">tqapplication.h</a>&gt;
#include "creditform.h"
int main( int argc, char *argv[] )
{
- <a href="ntqapplication.html">TQApplication</a> app( argc, argv );
+ <a href="tqapplication.html">TQApplication</a> app( argc, argv );
CreditForm creditForm;
- app.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &amp;creditForm );
+ app.<a href="tqapplication.html#setMainWidget">setMainWidget</a>( &amp;creditForm );
creditForm.show();
- return app.<a href="ntqapplication.html#exec">exec</a>();
+ return app.<a href="tqapplication.html#exec">exec</a>();
}
</pre>
<p>If you created the <tt>creditform.h</tt> and <tt>creditform.cpp</tt> files in <em>TQt Designer</em>, they are already in the project file, but if you created them manually you must also update the project file by adding these two new lines at the end:</p>
@@ -176,18 +176,18 @@ INCLUDEPATH += $(TQTDIR)/tools/designer/uilib
<p>We do <em>not</em> include the <tt>creditformbase.ui</tt> file since this file will be read at runtime, as we'll see shortly. We must include the <tt>tqui</tt> library since the functionality we require is not part of the standard TQt library.</p>
<h4><a name="2-2"></a>Creating main.cpp</h4>
<p>The<!-- index main.cpp --> <tt>main.cpp</tt> is quite standard. It will invoke the form we're going to create in <em>TQt Designer</em> as its main form. This form will then load and execute the dynamic dialog.</p>
-<pre> #include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
+<pre> #include &lt;<a href="tqapplication-h.html">tqapplication.h</a>&gt;
#include "mainform.h"
int main( int argc, char *argv[] )
{
- <a href="ntqapplication.html">TQApplication</a> app( argc, argv );
+ <a href="tqapplication.html">TQApplication</a> app( argc, argv );
MainForm *mainForm = new MainForm;
- app.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( mainForm );
+ app.<a href="tqapplication.html#setMainWidget">setMainWidget</a>( mainForm );
mainForm-&gt;show();
- return app.<a href="ntqapplication.html#exec">exec</a>();
+ return app.<a href="tqapplication.html#exec">exec</a>();
}
</pre>
<p>We create a new instance of our MainForm class, set it to be the main widget, show it and enter the event loop in the <tt>app.exec()</tt> call.</p>