From d35eedcd87d59e716c6d49bbb6b634ef1a7660c5 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 24 Aug 2024 20:19:50 +0900 Subject: Rename style nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/html/motif-walkthrough-5.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'doc/html/motif-walkthrough-5.html') diff --git a/doc/html/motif-walkthrough-5.html b/doc/html/motif-walkthrough-5.html index d6ad1178e..31b1aebf9 100644 --- a/doc/html/motif-walkthrough-5.html +++ b/doc/html/motif-walkthrough-5.html @@ -41,7 +41,7 @@ have converted the View widget. The Print dialog will be removed once we have finished our migration, since we will use TQPrinter instead. Based on this information, we decide that it is not worth replacing the Print dialog with a custom TQDialog replacement. -Instead, we will keep the Motif based dialog and use TQMotifDialog to +Instead, we will keep the Motif based dialog and use TQMotifDialog to integrate the dialog with the application.

Modality Requirements

@@ -74,7 +74,7 @@ function:


 

Integrating the Print Dialog

-

Now that the Print dialog has the appropriate accept and reject callbacks, we can use TQMotifDialog. First we need to include +

Now that the Print dialog has the appropriate accept and reject callbacks, we can use TQMotifDialog. First we need to include the TQMotifDialog header in todo.cpp.

@@ -82,19 +82,19 @@ the TQMotifDialog header in todo.cpp.

We add a ShowPrintDialog() function which will create and execute the print dialog.


-

We change the Print menu item callback to call the new ShowPrintDialog() function. We pass the top-level TQMotifWidget, which +

We change the Print menu item callback to call the new ShowPrintDialog() function. We pass the top-level TQMotifWidget, which we will use as the parent for the dialog.


 

The ShowPrintDialog() function creates the Print dialog and executes it. We use the XmdNprintCallback callback to accept the dialog and the XmNcancelCallback callback to reject the dialog. We -can do this easily by using the TQMotifDialog::acceptCallback() and -TQMotifDialog::rejectCallback() functions, respectively. We also +can do this easily by using the TQMotifDialog::acceptCallback() and +TQMotifDialog::rejectCallback() functions, respectively. We also ensure that the print callback continues to call the Print() function as before.


 

After we build the project, the application runs and operates as expected. There is no visual or behavioral difference, even though -the Print dialog is using TQMotifDialog. +the Print dialog is using TQMotifDialog.

[ Previous: Using Custom TQDialogs ] [ Home ] [ Next: Using TQt Main Window Classes ] -- cgit v1.2.1