[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/extensions/motif/src/qmotifdialog.cpp:167 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QMotifDialog Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <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>
|
---|
| 33 |
|
---|
| 34 | <p>The QMotifDialog class provides the QDialog API for Motif-based dialogs.
|
---|
| 35 | <a href="#details">More...</a>
|
---|
| 36 | <p>This class is part of the <b>Qt Motif Extension</b>.
|
---|
| 37 | <p><tt>#include <<a href="qmotifdialog-h.html">qmotifdialog.h</a>></tt>
|
---|
| 38 | <p>Inherits <a href="qdialog.html">QDialog</a>.
|
---|
| 39 | <p><a href="qmotifdialog-members.html">List of all member functions.</a>
|
---|
| 40 | <h2>Public Members</h2>
|
---|
| 41 | <ul>
|
---|
| 42 | <li class=fn>enum DialogType { Prompt, Selection, Command, FileSelection, Template, Error, Information, Message, Question, Warning, Working } <em>(obsolete)</em></li>
|
---|
| 43 | <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>
|
---|
| 44 | <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>
|
---|
| 45 | <li class=fn><a href="#QMotifDialog-3"><b>QMotifDialog</b></a> ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )</li>
|
---|
| 46 | <li class=fn><a href="#QMotifDialog-4"><b>QMotifDialog</b></a> ( QWidget * parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )</li>
|
---|
| 47 | <li class=fn>virtual <a href="#~QMotifDialog"><b>~QMotifDialog</b></a> ()</li>
|
---|
| 48 | <li class=fn>Widget <a href="#shell"><b>shell</b></a> () const</li>
|
---|
| 49 | <li class=fn>Widget <a href="#dialog"><b>dialog</b></a> () const</li>
|
---|
| 50 | </ul>
|
---|
| 51 | <h2>Static Public Members</h2>
|
---|
| 52 | <ul>
|
---|
| 53 | <li class=fn>void <a href="#acceptCallback"><b>acceptCallback</b></a> ( Widget, XtPointer client_data, XtPointer )</li>
|
---|
| 54 | <li class=fn>void <a href="#rejectCallback"><b>rejectCallback</b></a> ( Widget, XtPointer client_data, XtPointer )</li>
|
---|
| 55 | </ul>
|
---|
| 56 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 57 | <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.
|
---|
| 58 | <p>
|
---|
| 59 |
|
---|
| 60 | The QMotifDialog class provides the <a href="qdialog.html">QDialog</a> API for Motif-based dialogs.
|
---|
| 61 |
|
---|
| 62 | <p>
|
---|
| 63 | <p> QMotifDialog provides two separate modes of operation. The
|
---|
| 64 | application programmer can use QMotifDialog with an existing
|
---|
| 65 | Motif-based dialog and a <a href="qwidget.html">QWidget</a> parent, or the application
|
---|
| 66 | programmer can use QMotifDialog with a custom Qt-based dialog and
|
---|
| 67 | a Motif-based parent. Modality continues to work as expected.
|
---|
| 68 | <p> Motif-based dialogs must have a <tt>Shell</tt> widget parent with a
|
---|
| 69 | single child, due to requirements of the Motif toolkit. The <tt>Shell</tt> widget, which is a special subclass of <tt>XmDialogShell</tt>, is
|
---|
| 70 | created during construction. It can be accessed using the <a href="#shell">shell</a>()
|
---|
| 71 | member function.
|
---|
| 72 | <p> The single child of the <tt>Shell</tt> can be accessed using the
|
---|
| 73 | <a href="#dialog">dialog</a>() member function <em>after</em> it has been created.
|
---|
| 74 | <p> The <a href="#acceptCallback">acceptCallback</a>() and <a href="#rejectCallback">rejectCallback</a>() functions provide a
|
---|
| 75 | convenient way to call <a href="qdialog.html#accept">QDialog::accept</a>() and <a href="qdialog.html#reject">QDialog::reject</a>()
|
---|
| 76 | through callbacks. A pointer to the QMotifDialog should be passed
|
---|
| 77 | as the <tt>client_data</tt> argument to the callback.
|
---|
| 78 | <p> The API and behavior QMotifDialog is identical to that of <a href="qdialog.html">QDialog</a>
|
---|
| 79 | when using a custom Qt-based dialog with a Motif-based parent.
|
---|
| 80 | The only difference is that a Motif-based <em>parent</em> argument is
|
---|
| 81 | passed to the constructor, instead of a <a href="qwidget.html">QWidget</a> parent.
|
---|
| 82 |
|
---|
| 83 | <hr><h2>Member Type Documentation</h2>
|
---|
| 84 | <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.
|
---|
| 85 | <p>
|
---|
| 86 | <p> This enum lists the predefined <a href="motif-extension.html#Motif">Motif</a> dialog types.
|
---|
| 87 | <ul>
|
---|
| 88 | <li><tt>QMotifDialog::Prompt</tt>
|
---|
| 89 | <li><tt>QMotifDialog::Selection</tt>
|
---|
| 90 | <li><tt>QMotifDialog::Command</tt>
|
---|
| 91 | <li><tt>QMotifDialog::FileSelection</tt>
|
---|
| 92 | <li><tt>QMotifDialog::Template</tt>
|
---|
| 93 | <li><tt>QMotifDialog::Error</tt>
|
---|
| 94 | <li><tt>QMotifDialog::Information</tt>
|
---|
| 95 | <li><tt>QMotifDialog::Message</tt>
|
---|
| 96 | <li><tt>QMotifDialog::Question</tt>
|
---|
| 97 | <li><tt>QMotifDialog::Warning</tt>
|
---|
| 98 | <li><tt>QMotifDialog::Working</tt>
|
---|
| 99 | </ul>
|
---|
| 100 | <hr><h2>Member Function Documentation</h2>
|
---|
| 101 | <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 )
|
---|
| 102 | </h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 103 | <p> Creates a QMotifDialog using one of the predefined <a href="motif-extension.html#Motif">Motif</a> dialog
|
---|
| 104 | types. The <em>name</em>, <em>modal</em> and <em>flags</em> arguments are passed to
|
---|
| 105 | the <a href="qdialog.html">QDialog</a> constructor.
|
---|
| 106 | <p> This constructor creates a Shell widget, which is a special
|
---|
| 107 | subclass of XmDialogShell. The <em>parent</em>, <em>args</em> and <em>argcount</em>
|
---|
| 108 | arguments are passed to XtCreatePopupShell() when creating the
|
---|
| 109 | subclass. You can access the Shell widget with the <a href="#shell">shell</a>() member
|
---|
| 110 | function.
|
---|
| 111 | <p> This constructor also creates the dialog widget with the Shell
|
---|
| 112 | widget as its parent. The type of the dialog created is specified
|
---|
| 113 | by the <em>dialogtype</em> argument. See the DialogType enum for a list
|
---|
| 114 | of available dialog types. You can access the dialog widget with
|
---|
| 115 | the <a href="#dialog">dialog</a>() member function.
|
---|
| 116 | <p> <b>Warning:</b> QMotifDialog takes ownership of the child widget and
|
---|
| 117 | destroys it during destruction. You should not destroy the dialog
|
---|
| 118 | widget yourself.
|
---|
| 119 | <p> <p>See also <a href="#DialogType-enum">DialogType</a>, <a href="#shell">shell</a>(), and <a href="#dialog">dialog</a>().
|
---|
| 120 |
|
---|
| 121 | <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 )
|
---|
| 122 | </h3> <b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
|
---|
| 123 | <p> Creates a QMotifDialog which allows the application programmer to
|
---|
| 124 | 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>,
|
---|
| 125 | <em>modal</em> and <em>flags</em> arguments are passed to the QDialog
|
---|
| 126 | constructor.
|
---|
| 127 | <p> This constructor creates a Shell widget, which is a special
|
---|
| 128 | subclass of XmDialogShell. The <em>args</em> and <em>argcount</em> arguments
|
---|
| 129 | are passed to XtCreatePopupShell() when creating the subclass.
|
---|
| 130 | You can access the Shell widget with the <a href="#shell">shell</a>() member function.
|
---|
| 131 | <p> The dialog widget is not created by the constructor. You must
|
---|
| 132 | create the dialog widget as a child of the the widget returned by
|
---|
| 133 | shell(). You can access the child widget with the <a href="#dialog">dialog</a>() member
|
---|
| 134 | function.
|
---|
| 135 | <p> A dialog widget is not created by this constructor. Instead, you
|
---|
| 136 | should create the dialog widget as a child of this
|
---|
| 137 | dialog. QMotifDialog will take ownership of your custom dialog,
|
---|
| 138 | and you can access it with the dialog() member function.
|
---|
| 139 | <p> <b>Warning:</b> QMotifDialog takes ownership of the child widget and
|
---|
| 140 | destroys it during destruction. You should not destroy the dialog
|
---|
| 141 | widget yourself.
|
---|
| 142 | <p> <p>See also <a href="#shell">shell</a>() and <a href="#dialog">dialog</a>().
|
---|
| 143 |
|
---|
| 144 | <h3 class=fn><a name="QMotifDialog-3"></a>QMotifDialog::QMotifDialog ( Widget parent, const char * name = 0, bool modal = FALSE, WFlags flags = 0 )
|
---|
| 145 | </h3>
|
---|
| 146 | Creates a QMotifDialog which allows the application programmer to
|
---|
| 147 | 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>,
|
---|
| 148 | <em>modal</em> and <em>flags</em> arguments are passed to the QDialog
|
---|
| 149 | constructor.
|
---|
| 150 | <p> This constructor creates a <tt>Shell</tt> widget, which is a special
|
---|
| 151 | subclass of <tt>XmDialogShell</tt>. You can access the <tt>Shell</tt> widget
|
---|
| 152 | with the <a href="#shell">shell</a>() member function.
|
---|
| 153 | <p> <p>See also <a href="#shell">shell</a>().
|
---|
| 154 |
|
---|
| 155 | <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 )
|
---|
| 156 | </h3>
|
---|
| 157 | Creates a QMotifDialog which allows the application programmer to
|
---|
| 158 | 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
|
---|
| 159 | <a href="qdialog.html">QDialog</a> constructor.
|
---|
| 160 | <p> This constructor creates a <tt>Shell</tt> widget, which is a special
|
---|
| 161 | subclass of <tt>XmDialogShell</tt>. You can access the <tt>Shell</tt> widget
|
---|
| 162 | with the <a href="#shell">shell</a>() member functon.
|
---|
| 163 | <p> A dialog widget is not created by this constructor. Instead, you
|
---|
| 164 | should create the dialog widget as a child of this
|
---|
| 165 | dialog. QMotifDialog will take ownership of your custom dialog,
|
---|
| 166 | and you can access it with the <a href="#dialog">dialog</a>() member function.
|
---|
| 167 | <p> <b>Warning:</b> QMotifDialog takes ownership of the child widget and
|
---|
| 168 | destroys it during destruction. You should not destroy the dialog
|
---|
| 169 | widget yourself.
|
---|
| 170 | <p> <p>See also <a href="#shell">shell</a>() and <a href="#dialog">dialog</a>().
|
---|
| 171 |
|
---|
| 172 | <h3 class=fn><a name="~QMotifDialog"></a>QMotifDialog::~QMotifDialog ()<tt> [virtual]</tt>
|
---|
| 173 | </h3>
|
---|
| 174 | Destroys the <a href="qdialog.html">QDialog</a>, dialog widget and <tt>Shell</tt> widget.
|
---|
| 175 |
|
---|
| 176 | <h3 class=fn>void <a name="acceptCallback"></a>QMotifDialog::acceptCallback ( Widget, XtPointer client_data, XtPointer )<tt> [static]</tt>
|
---|
| 177 | </h3>
|
---|
| 178 | Convenient Xt/Motif callback to accept the QMotifDialog.
|
---|
| 179 | <p> The data is passed in <em>client_data</em>.
|
---|
| 180 |
|
---|
| 181 | <h3 class=fn>Widget <a name="dialog"></a>QMotifDialog::dialog () const
|
---|
| 182 | </h3>
|
---|
| 183 | Returns the <a href="motif-extension.html#Motif">Motif</a> widget embedded in this dialog.
|
---|
| 184 |
|
---|
| 185 | <h3 class=fn>void <a name="rejectCallback"></a>QMotifDialog::rejectCallback ( Widget, XtPointer client_data, XtPointer )<tt> [static]</tt>
|
---|
| 186 | </h3>
|
---|
| 187 | Convenient Xt/Motif callback to reject the QMotifDialog.
|
---|
| 188 | <p> The data is passed in <em>client_data</em>.
|
---|
| 189 |
|
---|
| 190 | <h3 class=fn>Widget <a name="shell"></a>QMotifDialog::shell () const
|
---|
| 191 | </h3>
|
---|
| 192 | Returns the <tt>Shell</tt> widget embedded in this dialog.
|
---|
| 193 |
|
---|
| 194 | <p>Example: <a href="motif-dialog-example.html#x2707">dialog/mainwindow.cpp</a>.
|
---|
| 195 | <!-- eof -->
|
---|
| 196 | <hr><p>
|
---|
| 197 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 198 | Copyright © 1995-2007
|
---|
| 199 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 200 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 201 | <td>Copyright © 2007
|
---|
| 202 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 203 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 204 | </table></div></address></body>
|
---|
| 205 | </html>
|
---|