📄 qmotifdialog.3qt
字号:
'\" t.TH QMotifDialog 3qt "9 December 2002" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS. All rights reserved. See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQMotifDialog \- The QDialog API for Motif dialogs.SH SYNOPSISThis class is part of the \fBQt Motif Extension\fR..PP\fC#include <qmotifdialog.h>\fR.PPInherits QDialog..PP.SS "Public Members".in +1c.ti -1c.BI "enum \fBDialogType\fR { Prompt, Selection, Command, FileSelection, Template, Error, Information, Message, Question, Warning, Working }".br.ti -1c.BI "\fBQMotifDialog\fR ( DialogType dtype, Widget parent = NULL, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )".br.ti -1c.BI "\fBQMotifDialog\fR ( Widget parent = NULL, ArgList args = NULL, Cardinal argcount = 0, 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 DESCRIPTIONThis 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..PPThe QMotifDialog class provides the QDialog API for Motif dialogs..PPWhen migrating Motif applications to Qt, developers will want to rewrite their Motif dialogs using Qt, and switch to using Qt's modality semantics. QMotifDialog ensures that modal Motif dialogs continue to work properly when used in a Qt application..PPFor the purpose of the Motif extension, Motif has two types of dialogs: predefined dialogs and custom dialogs. The predefined Motif dialogs are:.TPPrompt.TPSelection.TPCommand.TPFileSelection.TPTemplate.TPError.TPInformation.TPMessage.TPQuestion.TPWarning.TPWorking.PPQMotifDialog provides a constructor for the predefined Motif dialog types, which creates a dialog shell and the dialog widget itself..PPExample usage QMotifDialog to create a predefined Motif dialog:.PP.nf.br ....br XmString message = XmStringCreateLocalized( "This is a Message dialog.",.br XmSTRING_DEFAULT_CHARSET );.br Arg args[1];.br XtSetArg( args[0], XmNmessageString, message );.br.br // parent is an ApplicationShell created earlier in the application.br QMotifDialog dailog( QMotifDialog::Message, parent, args, 1,.br "motif message dialog", TRUE );.br XtAddCallback( dialog.dialog(), XmNokCallback,.br (XtCallbackProc) QMotifDialog::acceptCallback, &dialog );.br XtAddCallback( dialog.dialog(), XmNcancelCallback,.br (XtCallbackProc) QMotifDialog::rejectCallback, &dialog );.br dialog.exec();.br.br XmStringFree( message );.br ....br.fi.PPQMotifDialog also provides a constructor for custom Motif dialogs, which only creates the dialog shell. The application programmer can create a custom dialog using the QMotifDialog shell as its parent..PPQMotifDialogs can be used with either an Xt/Motif or a QWidget parent..SS "Member Type Documentation".SH "QMotifDialog::DialogType"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 dtype, Widget parent = NULL, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )"Creates a predefined Motif dialog of type \fIdtype\fR with a Motif widget \fIparent\fR..PPThe arguments are passed in \fIargs\fR, and the number of arguments in \fIargcount\fR. The \fIname\fR, \fImodal\fR and \fIflags\fR arguments are passed on to the QDialog constructor..PPCreates a Shell widget which is a special subclass of XmDialogShell. This allows applications to use the QDialog API with existing Motif dialogs. It also means that applications can properly handle modality with the QMotif extension. You can access the Shell widget with the shell() member function..PPCreates a dialog widget with the Shell widget as it's parent. The type of the dialog created is specified by the \fIdtype\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 When QMotifDialog is destroyed, the Shell widget and the dialog widget are destroyed. You should not destroy the dialog widget yourself..SH "QMotifDialog::QMotifDialog ( Widget parent = NULL, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )"Creates a QMotifDialog for use in a custom Motif dialog..PPThe dialog's parent is \fIparent\fR. The arguments are passed in \fIargs\fR and the number of arguments in \fIargcount\fR. The \fIname\fR, \fImodal\fR and \fIflags\fR arguments are passed on to the QDialog constructor..PPCreates a Shell widget which is a special subclass of XmDialogShell. This allows applications to use the QDialog API with existing Motif dialogs. It also means that applications can properly handle modality with the QMotif extension. You can access the Shell widget with the shell() member function..PPA 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 ownership of your custom dialog, and you can access it with the dialog() member function..PP\fBWarning:\fR When QMotifDialog is destroyed, the Shell widget and the dialog widget are destroyed. You should not destroy the dialog widget yourself..SH "QMotifDialog::~QMotifDialog ()\fC [virtual]\fR"Destroys the QDialog, dialog widget and shell widget..SH "void QMotifDialog::acceptCallback ( Widget, XtPointer client_data, XtPointer )\fC [static]\fR"Convenient Xt/Motif callback to accept the QMotifDialog..PPThe data is passed in \fIclient_data\fR..SH "Widget QMotifDialog::dialog () const"Returns the Motif widget embedded in this dialog..PPExample: dialog/mainwindow.cpp..SH "void QMotifDialog::rejectCallback ( Widget, XtPointer client_data, XtPointer )\fC [static]\fR"Convenient Xt/Motif callback to reject the QMotifDialog..PPThe data is passed in \fIclient_data\fR..SH "Widget QMotifDialog::shell () const"Returns the Shell widget embedded in this dialog..PPExample: dialog/mainwindow.cpp..SH "SEE ALSO".BR http://doc.trolltech.com/qmotifdialog.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com. See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf 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..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf 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 Qtversion (3.1.1).
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -