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.
206 lines
12 KiB
206 lines
12 KiB
14 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/extensions/motif/src/qmotifdialog.cpp:167 -->
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>QMotifDialog Class</title>
|
||
|
<style type="text/css"><!--
|
||
|
fn { margin-left: 1cm; text-indent: -1cm; }
|
||
|
a:link { color: #004faf; text-decoration: none }
|
||
|
a:visited { color: #672967; text-decoration: none }
|
||
|
body { background: #ffffff; color: black; }
|
||
|
--></style>
|
||
|
</head>
|
||
|
<body>
|
||
|
|
||
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
|
<tr bgcolor="#E5E5E5">
|
||
|
<td valign=center>
|
||
|
<a href="index.html">
|
||
|
<font color="#004faf">Home</font></a>
|
||
|
| <a href="classes.html">
|
||
|
<font color="#004faf">All Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped Classes</font></a>
|
||
|
| <a href="functions.html">
|
||
|
<font color="#004faf">Functions</font></a>
|
||
|
</td>
|
||
|
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QMotifDialog Class Reference</h1>
|
||
|
|
||
|
<p>The QMotifDialog class provides the QDialog API for Motif-based dialogs.
|
||
|
<a href="#details">More...</a>
|
||
|
<p>This class is part of the <b>Qt Motif Extension</b>.
|
||
|
<p><tt>#include <<a href="qmotifdialog-h.html">qmotifdialog.h</a>></tt>
|
||
|
<p>Inherits <a href="qdialog.html">QDialog</a>.
|
||
|
<p><a href="qmotifdialog-members.html">List of all member functions.</a>
|
||
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn>enum DialogType { Prompt, Selection, Command, FileSelection, Template, Error, Information, Message, Question, Warning, Working } <em>(obsolete)</em></li>
|
||
|
<li class=fn>QMotifDialog ( DialogType dialogtype, Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 ) <em>(obsolete)</em></li>
|
||
|
<li class=fn>QMotifDialog ( Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 ) <em>(obsolete)</em></li>
|
||
|
<li class=fn><a href="#QMotifDialog-3"><b>QMotifDialog</b></a> ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )</li>
|
||
|
<li class=fn><a href="#QMotifDialog-4"><b>QMotifDialog</b></a> ( QWidget * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )</li>
|
||
|
<li class=fn>virtual <a href="#~QMotifDialog"><b>~QMotifDialog</b></a> ()</li>
|
||
|
<li class=fn>Widget <a href="#shell"><b>shell</b></a> () const</li>
|
||
|
<li class=fn>Widget <a href="#dialog"><b>dialog</b></a> () const</li>
|
||
|
</ul>
|
||
|
<h2>Static Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn>void <a href="#acceptCallback"><b>acceptCallback</b></a> ( Widget, XtPointer client_data, XtPointer )</li>
|
||
|
<li class=fn>void <a href="#rejectCallback"><b>rejectCallback</b></a> ( Widget, XtPointer client_data, XtPointer )</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
<p> This class is defined in the <b>Qt <a href="motif-extension.html#Motif">Motif</a> Extension</b>, which can be found in the <tt>qt/extensions</tt> directory. It is not included in the main Qt API.
|
||
|
<p>
|
||
|
|
||
|
The QMotifDialog class provides the <a href="qdialog.html">QDialog</a> API for Motif-based dialogs.
|
||
|
|
||
|
<p>
|
||
|
<p> QMotifDialog provides two separate modes of operation. The
|
||
|
application programmer can use QMotifDialog with an existing
|
||
|
Motif-based dialog and a <a href="qwidget.html">QWidget</a> 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.
|
||
|
<p> Motif-based dialogs must have a <tt>Shell</tt> widget parent with a
|
||
|
single child, due to requirements of the Motif toolkit. The <tt>Shell</tt> widget, which is a special subclass of <tt>XmDialogShell</tt>, is
|
||
|
created during construction. It can be accessed using the <a href="#shell">shell</a>()
|
||
|
member function.
|
||
|
<p> The single child of the <tt>Shell</tt> can be accessed using the
|
||
|
<a href="#dialog">dialog</a>() member function <em>after</em> it has been created.
|
||
|
<p> The <a href="#acceptCallback">acceptCallback</a>() and <a href="#rejectCallback">rejectCallback</a>() functions provide a
|
||
|
convenient way to call <a href="qdialog.html#accept">QDialog::accept</a>() and <a href="qdialog.html#reject">QDialog::reject</a>()
|
||
|
through callbacks. A pointer to the QMotifDialog should be passed
|
||
|
as the <tt>client_data</tt> argument to the callback.
|
||
|
<p> The API and behavior QMotifDialog is identical to that of <a href="qdialog.html">QDialog</a>
|
||
|
when using a custom Qt-based dialog with a Motif-based parent.
|
||
|
The only difference is that a Motif-based <em>parent</em> argument is
|
||
|
passed to the constructor, instead of a <a href="qwidget.html">QWidget</a> parent.
|
||
|
|
||
|
<hr><h2>Member Type Documentation</h2>
|
||
|
<h3 class=fn><a name="DialogType-enum"></a>QMotifDialog::DialogType</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
||
|
<p>
|
||
|
<p> This enum lists the predefined <a href="motif-extension.html#Motif">Motif</a> dialog types.
|
||
|
<ul>
|
||
|
<li><tt>QMotifDialog::Prompt</tt>
|
||
|
<li><tt>QMotifDialog::Selection</tt>
|
||
|
<li><tt>QMotifDialog::Command</tt>
|
||
|
<li><tt>QMotifDialog::FileSelection</tt>
|
||
|
<li><tt>QMotifDialog::Template</tt>
|
||
|
<li><tt>QMotifDialog::Error</tt>
|
||
|
<li><tt>QMotifDialog::Information</tt>
|
||
|
<li><tt>QMotifDialog::Message</tt>
|
||
|
<li><tt>QMotifDialog::Question</tt>
|
||
|
<li><tt>QMotifDialog::Warning</tt>
|
||
|
<li><tt>QMotifDialog::Working</tt>
|
||
|
</ul>
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
|
<h3 class=fn><a name="QMotifDialog"></a>QMotifDialog::QMotifDialog ( <a href="qmotifdialog.html#DialogType-enum">DialogType</a> dialogtype, Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
|
||
|
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
||
|
<p> Creates a QMotifDialog using one of the predefined <a href="motif-extension.html#Motif">Motif</a> dialog
|
||
|
types. The <em>name</em>, <em>modal</em> and <em>flags</em> arguments are passed to
|
||
|
the <a href="qdialog.html">QDialog</a> constructor.
|
||
|
<p> This constructor creates a Shell widget, which is a special
|
||
|
subclass of XmDialogShell. The <em>parent</em>, <em>args</em> and <em>argcount</em>
|
||
|
arguments are passed to XtCreatePopupShell() when creating the
|
||
|
subclass. You can access the Shell widget with the <a href="#shell">shell</a>() member
|
||
|
function.
|
||
|
<p> This constructor also creates the dialog widget with the Shell
|
||
|
widget as its parent. The type of the dialog created is specified
|
||
|
by the <em>dialogtype</em> argument. See the DialogType enum for a list
|
||
|
of available dialog types. You can access the dialog widget with
|
||
|
the <a href="#dialog">dialog</a>() member function.
|
||
|
<p> <b>Warning:</b> QMotifDialog takes ownership of the child widget and
|
||
|
destroys it during destruction. You should not destroy the dialog
|
||
|
widget yourself.
|
||
|
<p> <p>See also <a href="#DialogType-enum">DialogType</a>, <a href="#shell">shell</a>(), and <a href="#dialog">dialog</a>().
|
||
|
|
||
|
<h3 class=fn><a name="QMotifDialog-2"></a>QMotifDialog::QMotifDialog ( Widget parent, ArgList args = NULL, Cardinal argcount = 0, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
|
||
|
</h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
||
|
<p> Creates a QMotifDialog which allows the application programmer to
|
||
|
use the <a href="motif-extension.html#Motif">Motif</a>-based <em>parent</em> for a custom <a href="qdialog.html">QDialog</a>. The <em>name</em>,
|
||
|
<em>modal</em> and <em>flags</em> arguments are passed to the QDialog
|
||
|
constructor.
|
||
|
<p> This constructor creates a Shell widget, which is a special
|
||
|
subclass of XmDialogShell. The <em>args</em> and <em>argcount</em> arguments
|
||
|
are passed to XtCreatePopupShell() when creating the subclass.
|
||
|
You can access the Shell widget with the <a href="#shell">shell</a>() member function.
|
||
|
<p> 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 <a href="#dialog">dialog</a>() member
|
||
|
function.
|
||
|
<p> 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.
|
||
|
<p> <b>Warning:</b> QMotifDialog takes ownership of the child widget and
|
||
|
destroys it during destruction. You should not destroy the dialog
|
||
|
widget yourself.
|
||
|
<p> <p>See also <a href="#shell">shell</a>() and <a href="#dialog">dialog</a>().
|
||
|
|
||
|
<h3 class=fn><a name="QMotifDialog-3"></a>QMotifDialog::QMotifDialog ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
|
||
|
</h3>
|
||
|
Creates a QMotifDialog which allows the application programmer to
|
||
|
use the <a href="motif-extension.html#Motif">Motif</a>-based <em>parent</em> for a custom <a href="qdialog.html">QDialog</a>. The <em>name</em>,
|
||
|
<em>modal</em> and <em>flags</em> arguments are passed to the QDialog
|
||
|
constructor.
|
||
|
<p> This constructor creates a <tt>Shell</tt> widget, which is a special
|
||
|
subclass of <tt>XmDialogShell</tt>. You can access the <tt>Shell</tt> widget
|
||
|
with the <a href="#shell">shell</a>() member function.
|
||
|
<p> <p>See also <a href="#shell">shell</a>().
|
||
|
|
||
|
<h3 class=fn><a name="QMotifDialog-4"></a>QMotifDialog::QMotifDialog ( <a href="qwidget.html">QWidget</a> * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
|
||
|
</h3>
|
||
|
Creates a QMotifDialog which allows the application programmer to
|
||
|
use a <a href="qwidget.html">QWidget</a> parent for an existing <a href="motif-extension.html#Motif">Motif</a>-based dialog. The <em>parent</em>, <em>name</em>, <em>modal</em> and <em>flags</em> arguments are passed to the
|
||
|
<a href="qdialog.html">QDialog</a> constructor.
|
||
|
<p> This constructor creates a <tt>Shell</tt> widget, which is a special
|
||
|
subclass of <tt>XmDialogShell</tt>. You can access the <tt>Shell</tt> widget
|
||
|
with the <a href="#shell">shell</a>() member functon.
|
||
|
<p> 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 <a href="#dialog">dialog</a>() member function.
|
||
|
<p> <b>Warning:</b> QMotifDialog takes ownership of the child widget and
|
||
|
destroys it during destruction. You should not destroy the dialog
|
||
|
widget yourself.
|
||
|
<p> <p>See also <a href="#shell">shell</a>() and <a href="#dialog">dialog</a>().
|
||
|
|
||
|
<h3 class=fn><a name="~QMotifDialog"></a>QMotifDialog::~QMotifDialog ()<tt> [virtual]</tt>
|
||
|
</h3>
|
||
|
Destroys the <a href="qdialog.html">QDialog</a>, dialog widget and <tt>Shell</tt> widget.
|
||
|
|
||
|
<h3 class=fn>void <a name="acceptCallback"></a>QMotifDialog::acceptCallback ( Widget, XtPointer client_data, XtPointer )<tt> [static]</tt>
|
||
|
</h3>
|
||
|
Convenient Xt/Motif callback to accept the QMotifDialog.
|
||
|
<p> The data is passed in <em>client_data</em>.
|
||
|
|
||
|
<h3 class=fn>Widget <a name="dialog"></a>QMotifDialog::dialog () const
|
||
|
</h3>
|
||
|
Returns the <a href="motif-extension.html#Motif">Motif</a> widget embedded in this dialog.
|
||
|
|
||
|
<h3 class=fn>void <a name="rejectCallback"></a>QMotifDialog::rejectCallback ( Widget, XtPointer client_data, XtPointer )<tt> [static]</tt>
|
||
|
</h3>
|
||
|
Convenient Xt/Motif callback to reject the QMotifDialog.
|
||
|
<p> The data is passed in <em>client_data</em>.
|
||
|
|
||
|
<h3 class=fn>Widget <a name="shell"></a>QMotifDialog::shell () const
|
||
|
</h3>
|
||
|
Returns the <tt>Shell</tt> widget embedded in this dialog.
|
||
|
|
||
|
<p>Example: <a href="motif-dialog-example.html#x2707">dialog/mainwindow.cpp</a>.
|
||
|
<!-- eof -->
|
||
|
<hr><p>
|
||
|
This file is part of the <a href="index.html">Qt toolkit</a>.
|
||
|
Copyright © 1995-2007
|
||
|
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
||
|
<table width=100% cellspacing=0 border=0><tr>
|
||
|
<td>Copyright © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>Qt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|