Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions | ![]() |
The QMotifDialog class provides the QDialog API for Motif dialogs. More...
This class is part of the Qt Motif Extension.
#include <qmotifdialog.h>
Inherits QDialog.
This class is defined in the Qt Motif Extension, which can be found in the qt/extensions directory. It is not included in the main Qt API.
The QMotifDialog class provides the QDialog API for Motif dialogs.
QMotifDialog provides the QDialog API for Motif dialogs. Applications moving to Qt will need to not only rewrite Motif dialogs in Qt, they will also need tom move to the Qt modailty semantics. QMotifDialog ensures that modal Motif dialogs continue to work when used in a Qt application.
For the purpose of the QMotif extension, Motif has 2 types of dialogs: predefined dialogs and custom dialogs. The predefined Motif dialogs are:
QMotifDialog provides a constructor for the predefined Motif dialog types, which creates a dialog shell and the dialog widget itself.
Example usage QMotifDialog to create a predefined Motif dialog:
... XmString message = XmStringCreateLocalized( "This is a Message dialog.", XmSTRING_DEFAULT_CHARSET ); Arg args[1]; XtSetArg( args[0], XmNmessageString, message ); // parent is an ApplicationShell created earlier in the application QMotifDialog dailog( QMotifDialog::Message, parent, args, 1, "motif message dialog", TRUE ); XtAddCallback( dialog.dialog(), XmNokCallback, (XtCallbackProc) QMotifDialog::acceptCallback, &dialog ); XtAddCallback( dialog.dialog(), XmNcancelCallback, (XtCallbackProc) QMotifDialog::rejectCallback, &dialog ); dialog.exec(); XmStringFree( message ); ...
QMotifDialog also provides a constructor for custom Motif dialogs, which creates only the dialog shell. The application programmer can create a custom dialog using the QMotifDialog shell as the parent.
QMotifDialog can be used with either an Xt/Motif or a QWidget parent.
This enum covers the predefined Motif dialog types.
The arguments are passed in args, and the number of arguments in argcount. The name, modal and flags arguments are passed on to the QDialog constructor.
Creates a Shell widget which is a special subclass of XmDialogShell. This allows applications to use the QDialog API with existing Motif dialogs. This allows appilications to have proper modality handling through the QMotif extension. You can access the Shell widget with the shell() member function.
Creates a dialog widget with the Shell widget as it's parent. The type of the dialog created is specified by the dtype argument. See the DialogType enum for a list of available dialog types. You can access the dialog widget with the dialog() member function.
Warning: When QMotifDialog is destroyed, the Shell widget and the dialog widget are destroyed. You should not destroy the dialog widget yourself.
The dialog's parent is parent. The arguments are passed in args and the number of arguments in argcount. The name, modal and flags arguments are passed on to the QDialog constructor.
Creates a Shell widget which is a special subclass of XmDialogShell. This allows applications to use the QDialog API with existing Motif dialogs. This allows appilications to have proper modality handling through the QMotif extension. You can access the Shell widget with the shell() member function.
A dialog widget is not created by this constructor. Instead, you should create the dialog widget as a child of this dialog. Once you do this, QMotifDialog will take over ownership of your custom dialog, and you can access it with the dialog() member function.
Warning: When QMotifDialog is destroyed, the Shell widget and the dialog widget are destroyed. You should not destroy the dialog widget yourself.
The widget is passed in widget and the data in client_data.
Example: dialog/mainwindow.cpp.
The widget is passed in widget and the data in client_data.
Example: dialog/mainwindow.cpp.
This file is part of the Qt toolkit. Copyright © 1995-2002 Trolltech. All Rights Reserved.
Copyright © 2002 Trolltech | Trademarks | Qt version 3.1.0-b1
|