From d796c9dd933ab96ec83b9a634feedd5d32e1ba3f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 8 Nov 2011 12:31:36 -0600 Subject: Test conversion to TQt3 from Qt3 8c6fc1f8e35fd264dd01c582ca5e7549b32ab731 --- doc/html/motif-walkthrough-2.html | 101 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 doc/html/motif-walkthrough-2.html (limited to 'doc/html/motif-walkthrough-2.html') diff --git a/doc/html/motif-walkthrough-2.html b/doc/html/motif-walkthrough-2.html new file mode 100644 index 000000000..cbe236daa --- /dev/null +++ b/doc/html/motif-walkthrough-2.html @@ -0,0 +1,101 @@ + + + + + +Preparing to Migrate the User Interface + + + + + + + +
+ +Home + | +All Classes + | +Main Classes + | +Annotated + | +Grouped Classes + | +Functions +

Preparing to Migrate the User Interface

+ + + +[ Previous: Getting Started ] +[ Home ] +[ Next: Using TQt Standard Dialogs ] +

We are ready to start migrating the user interface for our project. +As mentioned in the introduction, we do this in steps, ensuring that +our application is still usable at every step of the migration process. +

The user interface can be viewed as a hierarchy; each top-level window +and dialog depends upon a parent (which is another top-level window or +dialog). When using Motif XmMainWindow widgets, these should be +viewed as two separate entities: the Main Window widget with the +popup-menu hierarchy and the View widget contained in the Main Window widget. The View widget depends on the Main Window +widget. +

We begin migrating the pieces that have no dependencies, and work our +way up the dependency tree until all the pieces have been migrated. +

The hierarchy for this project looks something like this: +

Motif Todo Hierarchy
+

We will begin by migrating and replacing all of the dialogs, then the +Main Window widget with popup-menu hierarchy, and finally the View widget. +

However, we are not ready to begin just yet. The migration process can +be long, but it does not have to be difficult. The Open, Save As, Page Delete and IO Error dialogs use Motif XmFileSelectionBox and XmMessageBox dialogs. TQt provides similar +functionality with TQFileDialog and TQMessageBox, which we can begin +using immediately. +

The Print dialog is special, however. The Print dialog cannot be +replaced until after we have replaced the View widget. TQt provides +a complete printing mechanism with TQPrinter, but we cannot start using +it until we have replaced the View widget. +

Removing the Help Dialog +

+

The Help dialog is also special. Instead of replacing the Help +dialog with a custom TQDialog, we will use the TQt +Help System classes to provide a more advanced online help. +However, we cannot start using classes like TQToolTip and TQWhatsThis +until we replace the Main Window and View widgets. +

The help text included with the original project is very small and +only contains information about the XmNoteBook widget. The use of +tooltips and whats-this text will suffice for this example. If your +migration project has a large online help system, we recommend looking +at the Simple HTML Help Browser +example for information on how to build an rich text help system with +hypertext navigation and full printing capabilities, or using TQt Assistant. +

Removing the existing Help dialog is relatively simple. We remove +the Xmd/Help.h, Xmd/HelpP.h and Xmd/Help.c files from our +project file and regenerate our Makefile. +

The code to create the Help menu and Help dialog is in todo.cpp. We remove the Xmd/Help.h include, the *help_manager +resource string, the help_cb() function forward declaration and the +help_widget global variable. We also need to remove the code that +creates the Help dialog. We will also remove the code to create +the Help menu, since this menu is now empty. Finally, we remove +the help_cb() function implementation. +

The Help dialog is now removed from our project. We cannot add +TQToolTip and TQWhatsThis help at the moment, since we are still using +XmMainWindow for the Main Window widget. Once we have +migrated the Main Window and the popup-menu hierarchy, we can +begin using TQToolTip and TQWhatsThis for online help. +

[ Previous: Getting Started ] +[ Home ] +[ Next: Using TQt Standard Dialogs ] +

+ +


+ +
Copyright © 2007 +TrolltechTrademarks +
TQt 3.3.8
+
+ -- cgit v1.2.1