From 252a2ec8b0f0f9cf20c947737087b24a8185b588 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Wed, 10 Jul 2024 18:56:16 +0900 Subject: Rename IO and network class nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/designer-manual-3.html | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'doc/html/designer-manual-3.html') diff --git a/doc/html/designer-manual-3.html b/doc/html/designer-manual-3.html index 553ea58cb..51e2bb3aa 100644 --- a/doc/html/designer-manual-3.html +++ b/doc/html/designer-manual-3.html @@ -263,7 +263,7 @@ body { background: #ffffff; color: black; }

Adding Includes

-

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 Edit. Use the dialog that pops up to enter "ntqcolor.h" and "tqstring.h". Since we're going to use the clipboard we'll need access to the global clipboard object via TQApplication, so also add "ntqapplication.h" and "ntqclipboard.h". We'll also be doing some drawing (e.g. the color swatches), so add "ntqpainter.h" too, then close the dialog.

+

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 Edit. Use the dialog that pops up to enter "ntqcolor.h" and "tqstring.h". Since we're going to use the clipboard we'll need access to the global clipboard object via TQApplication, so also add "ntqapplication.h" and "tqclipboard.h". We'll also be doing some drawing (e.g. the color swatches), so add "ntqpainter.h" too, then close the dialog.

When entering include files you can include double quotes or angle brackets if you wish; if you don't use either TQt Designer will put in double quotes automatically.

@@ -271,7 +271,7 @@ body { background: #ffffff; color: black; }

Signals and Slots Connections

Most of the signals and slots connections were created automatically by the main window wizard when we created the main form. We have added some new actions since then, and we need to ensure that they are connected to slots so that we can code their behavior.

@@ -318,7 +318,7 @@ body { background: #ffffff; color: black; } const TQString WINDOWS_REGISTRY = "/TQtExamples"; const TQString APP_KEY = "/ColorTool/"; -

We define some useful constants for our form since it's easier to remember "CLIP_AS_RGB" than "2". The two TQStrings are used by TQSettings when we come to load and save user preferences; they're explained when we cover loadOptions() and saveOptions(). Note that we can insert any valid C++ into a .ui.h file including constant declarations as we've done here and #includes, etc.

+

We define some useful constants for our form since it's easier to remember "CLIP_AS_RGB" than "2". The two TQStrings are used by TQSettings when we come to load and save user preferences; they're explained when we cover loadOptions() and saveOptions(). Note that we can insert any valid C++ into a .ui.h file including constant declarations as we've done here and #includes, etc.

Since we're not subclassing if we want to have code executed during construction we must create an init() function; this will be called at the end of the form's constructor.

init()

    void MainForm::init()
@@ -609,7 +609,7 @@ body { background: #ffffff; color: black; }
         if ( ! okToClear() )
             return;
 
-        TQString filename = TQFileDialog::getOpenFileName(
+        TQString filename = TQFileDialog::getOpenFileName(
                                 TQString::null, "Colors (*.txt)", this,
                                 "file open", "Color Tool -- File Open" );
         if ( ! filename.isEmpty() )
@@ -618,18 +618,18 @@ body { background: #ffffff; color: black; }
             statusBar()->message( "File Open abandoned", 2000 );
     }
 
-

If it isn't okay to clear the data (i.e. the user has unsaved changes and clicked Cancel in the message box popped up by okToClear()), we simply return. Otherwise we ask the user for a filename using one of TQFileDialog's static functions, and if we got the filename we attempt to load the file.

-

Since we're using a TQFileDialog we need to include the relevant header. (Right click "Includes (in Implementation)", then click New. Type "ntqfiledialog.h" and press Enter.)

+

If it isn't okay to clear the data (i.e. the user has unsaved changes and clicked Cancel in the message box popped up by okToClear()), we simply return. Otherwise we ask the user for a filename using one of TQFileDialog's static functions, and if we got the filename we attempt to load the file.

+

Since we're using a TQFileDialog we need to include the relevant header. (Right click "Includes (in Implementation)", then click New. Type "tqfiledialog.h" and press Enter.)

You should now have added the following declaration to your includes (in implementation):

-