From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/motif-walkthrough-6.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc/html/motif-walkthrough-6.html') diff --git a/doc/html/motif-walkthrough-6.html b/doc/html/motif-walkthrough-6.html index ec9ce6a47..abc558802 100644 --- a/doc/html/motif-walkthrough-6.html +++ b/doc/html/motif-walkthrough-6.html @@ -52,7 +52,7 @@ is then compiled and linked into our application.

TQt Designer also created the mainwindow.ui.h file. We need to add the implementation for our Main Window to this skeleton implementation. -

We begin by adding the necessary includes for TQApplication +

We begin by adding the necessary includes for TQApplication and TQMotifWidget.

@@ -69,7 +69,7 @@ existing callback functions found in todo.cpp and actions.cpp. Save MainWindow::fileSave() calls the SaveIt() callback Save As MainWindow::fileSaveAs() calls the Save() callback Print MainWindow::filePrint() calls the ShowPrintDialog() callback - Exit MainWindow::fileExit() calls TQApplication::quit() + Exit MainWindow::fileExit() calls TQApplication::quit() Selected menu Properties MainWindow::selProperties() calls the EditPage() callback New MainWindow::selNewPage() calls the NewPage() callback @@ -85,9 +85,9 @@ Each slot implementation is a single line calling the related callback function. The code is not very interesting and would just take up space, so we've omitted it.

There are four exceptions to the above. The Open(), Save(), EditPage() and DeletePage() callbacks accept a pointer to the -toplevel TQWidget as argument 2 (the client_data argument). For +toplevel TQWidget as argument 2 (the client_data argument). For these four functions, we pass this as the second argument, which is -a toplevel MainWindow derived from TQMainWindow. +a toplevel MainWindow derived from TQMainWindow.

Replacing the Main Window

The next step is to use the new Main Window in our application. @@ -112,7 +112,7 @@ either. We remove it and all references to it in the New(), Save()

We remove all of the code used to create the Motif menus. The remaining code in main() is self-explanatory.


-

Our application is now using TQMainWindow instead of XmMainWindow. +

Our application is now using TQMainWindow instead of XmMainWindow. After we build the project, the application runs and operates as expected.

[ Previous: Using Existing Dialogs with TQMotifDialog ] -- cgit v1.2.1