You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tqt3/doc/man/man3/qmotifdialog.3qt

179 lines
9.3 KiB

'\" t
.TH QMotifDialog 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QMotifDialog \- The QDialog API for Motif-based dialogs
.SH SYNOPSIS
This class is part of the \fBQt Motif Extension\fR.
.PP
\fC#include <qmotifdialog.h>\fR
.PP
Inherits QDialog.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "enum DialogType { Prompt, Selection, Command, FileSelection, Template, Error, Information, Message, Question, Warning, Working } \fI(obsolete)\fR"
.br
.ti -1c
.BI "QMotifDialog ( DialogType dialogtype, Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 ) \fI(obsolete)\fR"
.br
.ti -1c
.BI "QMotifDialog ( Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 ) \fI(obsolete)\fR"
.br
.ti -1c
.BI "\fBQMotifDialog\fR ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )"
.br
.ti -1c
.BI "\fBQMotifDialog\fR ( QWidget * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )"
.br
.ti -1c
.BI "virtual \fB~QMotifDialog\fR ()"
.br
.ti -1c
.BI "Widget \fBshell\fR () const"
.br
.ti -1c
.BI "Widget \fBdialog\fR () const"
.br
.in -1c
.SS "Static Public Members"
.in +1c
.ti -1c
.BI "void \fBacceptCallback\fR ( Widget, XtPointer client_data, XtPointer )"
.br
.ti -1c
.BI "void \fBrejectCallback\fR ( Widget, XtPointer client_data, XtPointer )"
.br
.in -1c
.SH DESCRIPTION
This class is defined in the \fBQt Motif Extension\fR, which can be found in the \fCqt/extensions\fR directory. It is not included in the main Qt API.
.PP
The QMotifDialog class provides the QDialog API for Motif-based dialogs.
.PP
QMotifDialog provides two separate modes of operation. The application programmer can use QMotifDialog with an existing Motif-based dialog and a QWidget parent, or the application programmer can use QMotifDialog with a custom Qt-based dialog and a Motif-based parent. Modality continues to work as expected.
.PP
Motif-based dialogs must have a \fCShell\fR widget parent with a single child, due to requirements of the Motif toolkit. The \fCShell\fR widget, which is a special subclass of \fCXmDialogShell\fR, is created during construction. It can be accessed using the shell() member function.
.PP
The single child of the \fCShell\fR can be accessed using the dialog() member function \fIafter\fR it has been created.
.PP
The acceptCallback() and rejectCallback() functions provide a convenient way to call QDialog::accept() and QDialog::reject() through callbacks. A pointer to the QMotifDialog should be passed as the \fCclient_data\fR argument to the callback.
.PP
The API and behavior QMotifDialog is identical to that of QDialog when using a custom Qt-based dialog with a Motif-based parent. The only difference is that a Motif-based \fIparent\fR argument is passed to the constructor, instead of a QWidget parent.
.SS "Member Type Documentation"
.SH "QMotifDialog::DialogType"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
This enum lists the predefined Motif dialog types.
.TP
\fCQMotifDialog::Prompt\fR
.TP
\fCQMotifDialog::Selection\fR
.TP
\fCQMotifDialog::Command\fR
.TP
\fCQMotifDialog::FileSelection\fR
.TP
\fCQMotifDialog::Template\fR
.TP
\fCQMotifDialog::Error\fR
.TP
\fCQMotifDialog::Information\fR
.TP
\fCQMotifDialog::Message\fR
.TP
\fCQMotifDialog::Question\fR
.TP
\fCQMotifDialog::Warning\fR
.TP
\fCQMotifDialog::Working\fR
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QMotifDialog::QMotifDialog ( DialogType dialogtype, Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Creates a QMotifDialog using one of the predefined Motif dialog types. The \fIname\fR, \fImodal\fR and \fIflags\fR arguments are passed to the QDialog constructor.
.PP
This constructor creates a Shell widget, which is a special subclass of XmDialogShell. The \fIparent\fR, \fIargs\fR and \fIargcount\fR arguments are passed to XtCreatePopupShell() when creating the subclass. You can access the Shell widget with the shell() member function.
.PP
This constructor also creates the dialog widget with the Shell widget as its parent. The type of the dialog created is specified by the \fIdialogtype\fR argument. See the DialogType enum for a list of available dialog types. You can access the dialog widget with the dialog() member function.
.PP
\fBWarning:\fR QMotifDialog takes ownership of the child widget and destroys it during destruction. You should not destroy the dialog widget yourself.
.PP
See also DialogType, shell(), and dialog().
.SH "QMotifDialog::QMotifDialog ( Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )"
\fBThis function is obsolete.\fR It is provided to keep old source working. We strongly advise against using it in new code.
.PP
Creates a QMotifDialog which allows the application programmer to use the Motif-based \fIparent\fR for a custom QDialog. The \fIname\fR, \fImodal\fR and \fIflags\fR arguments are passed to the QDialog constructor.
.PP
This constructor creates a Shell widget, which is a special subclass of XmDialogShell. The \fIargs\fR and \fIargcount\fR arguments are passed to XtCreatePopupShell() when creating the subclass. You can access the Shell widget with the shell() member function.
.PP
The dialog widget is not created by the constructor. You must create the dialog widget as a child of the the widget returned by shell(). You can access the child widget with the dialog() member function.
.PP
A dialog widget is not created by this constructor. Instead, you should create the dialog widget as a child of this dialog. QMotifDialog will take ownership of your custom dialog, and you can access it with the dialog() member function.
.PP
\fBWarning:\fR QMotifDialog takes ownership of the child widget and destroys it during destruction. You should not destroy the dialog widget yourself.
.PP
See also shell() and dialog().
.SH "QMotifDialog::QMotifDialog ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )"
Creates a QMotifDialog which allows the application programmer to use the Motif-based \fIparent\fR for a custom QDialog. The \fIname\fR, \fImodal\fR and \fIflags\fR arguments are passed to the QDialog constructor.
.PP
This constructor creates a \fCShell\fR widget, which is a special subclass of \fCXmDialogShell\fR. You can access the \fCShell\fR widget with the shell() member function.
.PP
See also shell().
.SH "QMotifDialog::QMotifDialog ( QWidget * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )"
Creates a QMotifDialog which allows the application programmer to use a QWidget parent for an existing Motif-based dialog. The \fIparent\fR, \fIname\fR, \fImodal\fR and \fIflags\fR arguments are passed to the QDialog constructor.
.PP
This constructor creates a \fCShell\fR widget, which is a special subclass of \fCXmDialogShell\fR. You can access the \fCShell\fR widget with the shell() member functon.
.PP
A dialog widget is not created by this constructor. Instead, you should create the dialog widget as a child of this dialog. QMotifDialog will take ownership of your custom dialog, and you can access it with the dialog() member function.
.PP
\fBWarning:\fR QMotifDialog takes ownership of the child widget and destroys it during destruction. You should not destroy the dialog widget yourself.
.PP
See also shell() and dialog().
.SH "QMotifDialog::~QMotifDialog ()\fC [virtual]\fR"
Destroys the QDialog, dialog widget and \fCShell\fR widget.
.SH "void QMotifDialog::acceptCallback ( Widget, XtPointer client_data, XtPointer )\fC [static]\fR"
Convenient Xt/Motif callback to accept the QMotifDialog.
.PP
The data is passed in \fIclient_data\fR.
.SH "Widget QMotifDialog::dialog () const"
Returns the Motif widget embedded in this dialog.
.SH "void QMotifDialog::rejectCallback ( Widget, XtPointer client_data, XtPointer )\fC [static]\fR"
Convenient Xt/Motif callback to reject the QMotifDialog.
.PP
The data is passed in \fIclient_data\fR.
.SH "Widget QMotifDialog::shell () const"
Returns the \fCShell\fR widget embedded in this dialog.
.PP
Example: dialog/mainwindow.cpp.
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qmotifdialog.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive Qt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using Qt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (qmotifdialog.3qt) and the Qt
version (3.3.8).