summaryrefslogtreecommitdiffstats
path: root/doc/html/qmotifdialog.html
blob: 95cf6bf28748a9ce4b6de957d37aa371558d43a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!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&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;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 &lt;<a href="qmotifdialog-h.html">qmotifdialog.h</a>&gt;</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 } &nbsp;<em>(obsolete)</em></li>
<li class=fn>QMotifDialog ( DialogType&nbsp;dialogtype, Widget&nbsp;parent, ArgList&nbsp;args = NULL, Cardinal&nbsp;argcount = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 ) &nbsp;<em>(obsolete)</em></li>
<li class=fn>QMotifDialog ( Widget&nbsp;parent, ArgList&nbsp;args = NULL, Cardinal&nbsp;argcount = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 ) &nbsp;<em>(obsolete)</em></li>
<li class=fn><a href="#QMotifDialog-3"><b>QMotifDialog</b></a> ( Widget&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;flags = 0 )</li>
<li class=fn><a href="#QMotifDialog-4"><b>QMotifDialog</b></a> ( QWidget&nbsp;*&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;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&nbsp;client_data, XtPointer )</li>
<li class=fn>void <a href="#rejectCallback"><b>rejectCallback</b></a> ( Widget, XtPointer&nbsp;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>&nbsp;dialogtype, Widget&nbsp;parent, ArgList&nbsp;args = NULL, Cardinal&nbsp;argcount = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;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&nbsp;parent, ArgList&nbsp;args = NULL, Cardinal&nbsp;argcount = 0, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;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&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;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>&nbsp;*&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;name = 0, bool&nbsp;modal = FALSE, WFlags&nbsp;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&nbsp;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&nbsp;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 &copy; 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 &copy; 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>