diff options
Diffstat (limited to 'doc/html/designer-manual-3.html')
-rw-r--r-- | doc/html/designer-manual-3.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/doc/html/designer-manual-3.html b/doc/html/designer-manual-3.html index 1c25ddd04..46dc87d3e 100644 --- a/doc/html/designer-manual-3.html +++ b/doc/html/designer-manual-3.html @@ -262,14 +262,14 @@ body { background: #ffffff; color: black; } <ul><li><p>class TQString;</p> <li><p>class TQColor;</p> </ul><h4><a name="6-3"></a>Adding Includes</h4> -<p>Our form will also need some included files. Includes may be added in the declaration, or (for preference) in the implementation. Right click "Includes (in Implementation)", then click <b>Edit</b>. Use the dialog that pops up to enter "tqcolor.h" and "tqstring.h". Since we're going to use the clipboard we'll need access to the global clipboard object via <a href="ntqapplication.html">TQApplication</a>, so also add "ntqapplication.h" and "tqclipboard.h". We'll also be doing some drawing (e.g. the color swatches), so add "tqpainter.h" too, then close the dialog.</p> +<p>Our form will also need some included files. Includes may be added in the declaration, or (for preference) in the implementation. Right click "Includes (in Implementation)", then click <b>Edit</b>. Use the dialog that pops up to enter "tqcolor.h" and "tqstring.h". Since we're going to use the clipboard we'll need access to the global clipboard object via <a href="tqapplication.html">TQApplication</a>, so also add "tqapplication.h" and "tqclipboard.h". We'll also be doing some drawing (e.g. the color swatches), so add "tqpainter.h" too, then close the dialog.</p> <p align="center"><img align="middle" src="mw-editincimp.png" width="339" height="327"> </p> <p>When entering include files you can include double quotes or angle brackets if you wish; if you don't use either <em>TQt Designer</em> will put in double quotes automatically.</p> <p>You should now have added the following includes (in implementation):</p> <ul><li><p>"tqcolor.h"</p> <li><p>"tqstring.h"</p> -<li><p>"ntqapplication.h"</p> +<li><p>"tqapplication.h"</p> <li><p>"tqclipboard.h"</p> <li><p>"tqpainter.h"</p> </ul><h4><a name="6-4"></a>Signals and Slots Connections</h4> @@ -322,7 +322,7 @@ body { background: #ffffff; color: black; } <h4><a name="6-7"></a>init()</h4> <pre> void MainForm::init() { - clipboard = TQApplication::<a href="ntqapplication.html#clipboard">clipboard</a>(); + clipboard = TQApplication::<a href="tqapplication.html#clipboard">clipboard</a>(); if ( clipboard->supportsSelection() ) clipboard->setSelectionMode( TRUE ); @@ -460,15 +460,15 @@ body { background: #ffffff; color: black; } <h4><a name="6-12"></a>Creating main.cpp</h4> <p>Now that we've entered some of the code it would be nice to build and run the application to get a feel for the progress we've made. To do this we need to create a <tt>main()</tt> function. In TQt we typically create a small <tt>main.cpp</tt> file for the <tt>main()</tt> function. We can ask <em>TQt Designer</em> to create this file for us.</p> <p>Click <b>File|New</b> to invoke the <em>New File</em> dialog. Click "C++ Main-File", then click OK. The <em>Configure Main-File</em> dialog appears, listing the all the forms in the project. We've only got one form, "MainForm", so it is already highlighted. Click <b>OK</b> to create a <tt>main.cpp</tt> file that loads our MainForm.</p> -<pre> #include <<a href="qapplication-h.html">ntqapplication.h</a>> +<pre> #include <<a href="tqapplication-h.html">tqapplication.h</a>> #include "mainform.h" int main( int argc, char ** argv ) { - <a href="ntqapplication.html">TQApplication</a> a( argc, argv ); + <a href="tqapplication.html">TQApplication</a> a( argc, argv ); MainForm *w = new MainForm; w->show(); - return a.<a href="ntqapplication.html#exec">exec</a>(); + return a.<a href="tqapplication.html#exec">exec</a>(); } </pre> <p>When <em>TQt Designer</em> generates a <tt>main.cpp</tt> file it includes this line:</p> @@ -486,7 +486,7 @@ body { background: #ffffff; color: black; } <p>Now, whatever the user clicks to close the application, our <tt>fileExit()</tt> slot will be called. We'll code the <tt>fileExit()</tt> slot right now:</p> <pre> void MainForm::fileExit() { - TQApplication::<a href="ntqapplication.html#exit">exit</a>( 0 ); + TQApplication::<a href="tqapplication.html#exit">exit</a>( 0 ); } </pre> <p>This ensures that our application will cleanly terminate. Later we'll revise this function to give the user the opportunity to save any unsaved data.</p> @@ -754,7 +754,7 @@ Captures: cap(1) cap(2) cap(3) cap(4) <pre> void MainForm::fileExit() { if ( okToClear() ) { - TQApplication::<a href="ntqapplication.html#exit">exit</a>( 0 ); + TQApplication::<a href="tqapplication.html#exit">exit</a>( 0 ); } } </pre> |