~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qdatetimeedit.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/gui/widgets/qdatetimeedit.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QDateTimeEdit Class Reference</title>
 
8
    <style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
 
9
a:link { color: #004faf; text-decoration: none }
 
10
a:visited { color: #672967; text-decoration: none }
 
11
td.postheader { font-family: sans-serif }
 
12
tr.address { font-family: sans-serif }
 
13
body { background: #ffffff; color: black; }</style>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
 
19
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
 
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QDateTimeEdit Class Reference</h1>
 
21
<p>The QDateTimeEdit class provides a widget for editing dates and times. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QDateTimeEdit&gt;</pre><p>Part of the <a href="qtgui.html">QtGui</a> module.</p>
 
23
<p>Inherits <a href="qabstractspinbox.html">QAbstractSpinBox</a>.</p>
 
24
<p>Inherited by <a href="qdateedit.html">QDateEdit</a> and <a href="qtimeedit.html">QTimeEdit</a>.</p>
 
25
<ul>
 
26
<li><a href="qdatetimeedit-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="public-types"></a>
 
29
<h3>Public Types</h3>
 
30
<ul>
 
31
<li><div class="fn"/>enum <b><a href="qdatetimeedit.html#Section-enum">Section</a></b> { NoSection, AmPmSection, MSecSection, SecondSection, ..., YearSection }</li>
 
32
<li><div class="fn"/>flags <b><a href="qdatetimeedit.html#Section-enum">Sections</a></b></li>
 
33
</ul>
 
34
<a name="properties"></a>
 
35
<h3>Properties</h3>
 
36
<table width="100%" border="0" cellpadding="0" cellspacing="0">
 
37
<tr><td width="45%" valign="top"><ul>
 
38
<li><div class="fn"/><b><a href="qdatetimeedit.html#currentSection-prop">currentSection</a></b> : Section</li>
 
39
<li><div class="fn"/><b><a href="qdatetimeedit.html#date-prop">date</a></b> : QDate</li>
 
40
<li><div class="fn"/><b><a href="qdatetimeedit.html#dateTime-prop">dateTime</a></b> : QDateTime</li>
 
41
<li><div class="fn"/><b><a href="qdatetimeedit.html#displayFormat-prop">displayFormat</a></b> : QString</li>
 
42
<li><div class="fn"/><b><a href="qdatetimeedit.html#displayedSections-prop">displayedSections</a></b> : const Sections</li>
 
43
</ul></td><td valign="top"><ul>
 
44
<li><div class="fn"/><b><a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a></b> : QDate</li>
 
45
<li><div class="fn"/><b><a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a></b> : QTime</li>
 
46
<li><div class="fn"/><b><a href="qdatetimeedit.html#minimumDate-prop">minimumDate</a></b> : QDate</li>
 
47
<li><div class="fn"/><b><a href="qdatetimeedit.html#minimumTime-prop">minimumTime</a></b> : QTime</li>
 
48
<li><div class="fn"/><b><a href="qdatetimeedit.html#time-prop">time</a></b> : QTime</li>
 
49
</ul>
 
50
</td></tr>
 
51
</table>
 
52
<ul>
 
53
<li><div class="fn"/>7 properties inherited from <a href="qabstractspinbox.html#properties">QAbstractSpinBox</a></li>
 
54
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
55
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
56
</ul>
 
57
<a name="public-functions"></a>
 
58
<h3>Public Functions</h3>
 
59
<ul>
 
60
<li><div class="fn"/><b><a href="qdatetimeedit.html#QDateTimeEdit">QDateTimeEdit</a></b> ( QWidget * <i>parent</i> = 0 )</li>
 
61
<li><div class="fn"/><b><a href="qdatetimeedit.html#QDateTimeEdit-2">QDateTimeEdit</a></b> ( const QDateTime &amp; <i>datetime</i>, QWidget * <i>parent</i> = 0 )</li>
 
62
<li><div class="fn"/><b><a href="qdatetimeedit.html#QDateTimeEdit-3">QDateTimeEdit</a></b> ( const QDate &amp; <i>date</i>, QWidget * <i>parent</i> = 0 )</li>
 
63
<li><div class="fn"/><b><a href="qdatetimeedit.html#QDateTimeEdit-4">QDateTimeEdit</a></b> ( const QTime &amp; <i>time</i>, QWidget * <i>parent</i> = 0 )</li>
 
64
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#maximumDate-prop">clearMaximumDate</a></b> ()</li>
 
65
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#maximumTime-prop">clearMaximumTime</a></b> ()</li>
 
66
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#minimumDate-prop">clearMinimumDate</a></b> ()</li>
 
67
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#minimumTime-prop">clearMinimumTime</a></b> ()</li>
 
68
<li><div class="fn"/>Section <b><a href="qdatetimeedit.html#currentSection-prop">currentSection</a></b> () const</li>
 
69
<li><div class="fn"/>QDate <b><a href="qdatetimeedit.html#date-prop">date</a></b> () const</li>
 
70
<li><div class="fn"/>QDateTime <b><a href="qdatetimeedit.html#dateTime-prop">dateTime</a></b> () const</li>
 
71
<li><div class="fn"/>QString <b><a href="qdatetimeedit.html#displayFormat-prop">displayFormat</a></b> () const</li>
 
72
<li><div class="fn"/>Sections <b><a href="qdatetimeedit.html#displayedSections-prop">displayedSections</a></b> () const</li>
 
73
<li><div class="fn"/>QDate <b><a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a></b> () const</li>
 
74
<li><div class="fn"/>QTime <b><a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a></b> () const</li>
 
75
<li><div class="fn"/>QDate <b><a href="qdatetimeedit.html#minimumDate-prop">minimumDate</a></b> () const</li>
 
76
<li><div class="fn"/>QTime <b><a href="qdatetimeedit.html#minimumTime-prop">minimumTime</a></b> () const</li>
 
77
<li><div class="fn"/>QString <b><a href="qdatetimeedit.html#sectionText">sectionText</a></b> ( Section <i>section</i> ) const</li>
 
78
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#currentSection-prop">setCurrentSection</a></b> ( Section <i>section</i> )</li>
 
79
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#setDateRange">setDateRange</a></b> ( const QDate &amp; <i>min</i>, const QDate &amp; <i>max</i> )</li>
 
80
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#displayFormat-prop">setDisplayFormat</a></b> ( const QString &amp; <i>format</i> )</li>
 
81
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a></b> ( const QDate &amp; <i>max</i> )</li>
 
82
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a></b> ( const QTime &amp; <i>max</i> )</li>
 
83
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a></b> ( const QDate &amp; <i>min</i> )</li>
 
84
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a></b> ( const QTime &amp; <i>min</i> )</li>
 
85
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#setTimeRange">setTimeRange</a></b> ( const QTime &amp; <i>min</i>, const QTime &amp; <i>max</i> )</li>
 
86
<li><div class="fn"/>QTime <b><a href="qdatetimeedit.html#time-prop">time</a></b> () const</li>
 
87
</ul>
 
88
<ul>
 
89
<li><div class="fn"/>17 public functions inherited from <a href="qabstractspinbox.html#public-functions">QAbstractSpinBox</a></li>
 
90
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
91
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
92
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
93
</ul>
 
94
<a name="public-slots"></a>
 
95
<h3>Public Slots</h3>
 
96
<ul>
 
97
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#date-prop">setDate</a></b> ( const QDate &amp; <i>date</i> )</li>
 
98
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#dateTime-prop">setDateTime</a></b> ( const QDateTime &amp; <i>dateTime</i> )</li>
 
99
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#time-prop">setTime</a></b> ( const QTime &amp; <i>time</i> )</li>
 
100
</ul>
 
101
<ul>
 
102
<li><div class="fn"/>4 public slots inherited from <a href="qabstractspinbox.html#public-slots">QAbstractSpinBox</a></li>
 
103
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
104
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
105
</ul>
 
106
<a name="signals"></a>
 
107
<h3>Signals</h3>
 
108
<ul>
 
109
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#dateChanged">dateChanged</a></b> ( const QDate &amp; <i>date</i> )</li>
 
110
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#dateTimeChanged">dateTimeChanged</a></b> ( const QDateTime &amp; <i>datetime</i> )</li>
 
111
<li><div class="fn"/>void <b><a href="qdatetimeedit.html#timeChanged">timeChanged</a></b> ( const QTime &amp; <i>time</i> )</li>
 
112
</ul>
 
113
<ul>
 
114
<li><div class="fn"/>1 signal inherited from <a href="qabstractspinbox.html#signals">QAbstractSpinBox</a></li>
 
115
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
116
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
117
</ul>
 
118
<a name="protected-functions"></a>
 
119
<h3>Protected Functions</h3>
 
120
<ul>
 
121
<li><div class="fn"/>virtual QDateTime <b><a href="qdatetimeedit.html#dateTimeFromText">dateTimeFromText</a></b> ( const QString &amp; <i>text</i> ) const</li>
 
122
<li><div class="fn"/>virtual QString <b><a href="qdatetimeedit.html#textFromDateTime">textFromDateTime</a></b> ( const QDateTime &amp; <i>dateTime</i> ) const</li>
 
123
</ul>
 
124
<ul>
 
125
<li><div class="fn"/>3 protected functions inherited from <a href="qabstractspinbox.html#protected-functions">QAbstractSpinBox</a></li>
 
126
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
127
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
128
</ul>
 
129
<h3>Additional Inherited Members</h3>
 
130
<ul>
 
131
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
132
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
133
</ul>
 
134
<a name="details"></a>
 
135
<hr />
 
136
<h2>Detailed Description</h2>
 
137
<p>The QDateTimeEdit class provides a widget for editing dates and times.</p>
 
138
<p>QDateTimeEdit allows the user to edit dates by using the keyboard or the arrow keys to increase and decrease date and time values. The arrow keys can be used to move from section to section within the QDateTimeEdit box. Dates and times appear in accordance with the format set; see <a href="qdatetimeedit.html#displayFormat-prop">setDisplayFormat</a>().</p>
 
139
<pre>&nbsp;   QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate());
 
140
    dateEdit-&gt;setMinimumDate(QDate::currentDate().addDays(-365));
 
141
    dateEdit-&gt;setMaximumDate(QDate::currentDate().addDays(365));
 
142
    dateEdit-&gt;setDisplayFormat(&quot;yyyy.MM.dd&quot;);</pre>
 
143
<p>Here we've created a new QDateTimeEdit object initialized with today's date, and restricted the valid date range to today plus or minus 365 days. We've set the order to month, day, year.</p>
 
144
<p>The maximum and minimum values for a date value in the date editor default to the maximum and minimum values for a <a href="qdate.html">QDate</a>. You can change this by calling <a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(), <a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(), <a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a>(), and <a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a>().</p>
 
145
<hr />
 
146
<h2>Member Type Documentation</h2>
 
147
<h3 class="flags"><a name="Section-enum"></a>enum QDateTimeEdit::Section<br />flags QDateTimeEdit::Sections</h3>
 
148
<table border="1" cellpadding="2" cellspacing="1" width="40%">
 
149
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
 
150
<tr><td valign="top"><tt>QDateTimeEdit::NoSection</tt></td><td align="center" valign="top"><tt>0x0000</tt></td></tr>
 
151
<tr><td valign="top"><tt>QDateTimeEdit::AmPmSection</tt></td><td align="center" valign="top"><tt>0x0001</tt></td></tr>
 
152
<tr><td valign="top"><tt>QDateTimeEdit::MSecSection</tt></td><td align="center" valign="top"><tt>0x0002</tt></td></tr>
 
153
<tr><td valign="top"><tt>QDateTimeEdit::SecondSection</tt></td><td align="center" valign="top"><tt>0x0004</tt></td></tr>
 
154
<tr><td valign="top"><tt>QDateTimeEdit::MinuteSection</tt></td><td align="center" valign="top"><tt>0x0008</tt></td></tr>
 
155
<tr><td valign="top"><tt>QDateTimeEdit::HourSection</tt></td><td align="center" valign="top"><tt>0x0010</tt></td></tr>
 
156
<tr><td valign="top"><tt>QDateTimeEdit::DaySection</tt></td><td align="center" valign="top"><tt>0x0100</tt></td></tr>
 
157
<tr><td valign="top"><tt>QDateTimeEdit::MonthSection</tt></td><td align="center" valign="top"><tt>0x0200</tt></td></tr>
 
158
<tr><td valign="top"><tt>QDateTimeEdit::YearSection</tt></td><td align="center" valign="top"><tt>0x0400</tt></td></tr>
 
159
</table>
 
160
<p>The Sections type is a typedef for <a href="qflags.html">QFlags</a>&lt;Section&gt;. It stores an OR combination of Section values.</p>
 
161
<hr />
 
162
<h2>Property Documentation</h2>
 
163
<h3 class="fn"><a name="currentSection-prop"></a>currentSection : <a href="qdatetimeedit.html#Section-enum">Section</a></h3>
 
164
<p>This property holds the current section of the spinbox setCurrentSection().</p>
 
165
<p>Access functions:</p>
 
166
<ul>
 
167
<li><div class="fn"/><b>Section currentSection () const</b></li>
 
168
<li><div class="fn"/><b>void setCurrentSection ( Section <i>section</i> )</b></li>
 
169
</ul>
 
170
<h3 class="fn"><a name="date-prop"></a>date : <a href="qdate.html">QDate</a></h3>
 
171
<p>This property holds the QDate that is set in the QDateTimeEdit.</p>
 
172
<p>Access functions:</p>
 
173
<ul>
 
174
<li><div class="fn"/><b>QDate date () const</b></li>
 
175
<li><div class="fn"/><b>void setDate ( const QDate &amp; <i>date</i> )</b></li>
 
176
</ul>
 
177
<p>See also <a href="qdatetimeedit.html#time-prop">time</a>.</p>
 
178
<h3 class="fn"><a name="dateTime-prop"></a>dateTime : <a href="qdatetime.html">QDateTime</a></h3>
 
179
<p>This property holds the QDateTime that is set in the QDateTimeEdit.</p>
 
180
<p>Access functions:</p>
 
181
<ul>
 
182
<li><div class="fn"/><b>QDateTime dateTime () const</b></li>
 
183
<li><div class="fn"/><b>void setDateTime ( const QDateTime &amp; <i>dateTime</i> )</b></li>
 
184
</ul>
 
185
<p>See also <a href="qdatetimeedit.html#minimumDate-prop">minimumDate</a>, <a href="qdatetimeedit.html#minimumTime-prop">minimumTime</a>, <a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a>, and <a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>.</p>
 
186
<h3 class="fn"><a name="displayFormat-prop"></a>displayFormat : <a href="qstring.html">QString</a></h3>
 
187
<p>This property holds the format used to display the time/date of the date time edit.</p>
 
188
<p>This format is a subset of the format described in <a href="qdatetime.html#toString">QDateTime::toString</a>()</p>
 
189
<p>These expressions may be used:</p>
 
190
<table align="center" cellpadding="2" cellspacing="1" border="0">
 
191
<tr valign="top" bgcolor="#a2c511"><th>Expression</th><th>Output</th></tr>
 
192
<tr valign="top" bgcolor="#f0f0f0"><td>hh</td><td>the hour with a leading zero (00 to 23 or 01 to 12 if AM/PM display)</td></tr>
 
193
<tr valign="top" bgcolor="#e0e0e0"><td>mm</td><td>the minute with a leading zero (00 to 59)</td></tr>
 
194
<tr valign="top" bgcolor="#f0f0f0"><td>ss</td><td>the second whith a leading zero (00 to 59)</td></tr>
 
195
<tr valign="top" bgcolor="#e0e0e0"><td>zzz</td><td>the milliseconds with leading zeroes (000 to 999)</td></tr>
 
196
<tr valign="top" bgcolor="#f0f0f0"><td>AP</td><td>use AM/PM display. <i>AP</i> will be replaced by either &quot;AM&quot; or &quot;PM&quot;.</td></tr>
 
197
<tr valign="top" bgcolor="#e0e0e0"><td>ap</td><td>use am/pm display. <i>ap</i> will be replaced by either &quot;am&quot; or &quot;pm&quot;.</td></tr>
 
198
<tr valign="top" bgcolor="#f0f0f0"><td>dd</td><td>the day as number with a leading zero (01 to 31)</td></tr>
 
199
<tr valign="top" bgcolor="#e0e0e0"><td>MM</td><td>the month as number with a leading zero (01 to 12)</td></tr>
 
200
<tr valign="top" bgcolor="#f0f0f0"><td>MMM</td><td>the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses <a href="qdate.html#shortMonthName">QDate::shortMonthName</a>().</td></tr>
 
201
<tr valign="top" bgcolor="#e0e0e0"><td>yy</td><td>the year as two digit number (00 to 99)</td></tr>
 
202
<tr valign="top" bgcolor="#f0f0f0"><td>yyyy</td><td>the year as four digit number (1752 to 8000)</td></tr>
 
203
</table>
 
204
<p>All other input characters or sequence of characters that are enclosed in singlequotes will be treated as text and can be used as delimiters.</p>
 
205
<p>Example format strings (assuming that the date is 20 July 1969):</p>
 
206
<table align="center" cellpadding="2" cellspacing="1" border="0">
 
207
<tr valign="top" bgcolor="#a2c511"><th>Format</th><th>Result</th></tr>
 
208
<tr valign="top" bgcolor="#f0f0f0"><td>dd.MM.yyyy</td><td>20.07.1969</td></tr>
 
209
<tr valign="top" bgcolor="#e0e0e0"><td>MMM d yy</td><td>Jul 20 69</td></tr>
 
210
</table>
 
211
<p>If you specify an invalid format the format will not be set.</p>
 
212
<p>Multiple instances of the same field is not allowed.A format with no valid fields is not allowed either.</p>
 
213
<p><b>Warning:</b> Since <a href="qdatetimeedit.html">QDateTimeEdit</a> internally always operates on a <a href="qdatetime.html">QDateTime</a>, changing the format can change the minimum time or date and the current time or date. For example:</p>
 
214
<pre>&nbsp;   QDateTimeEdit edit;     // default format is &quot;yyyy.MM.dd hh:mm:ss&quot;
 
215
    edit.setMinimumDate(QDate(2000, 1, 1));
 
216
    edit.setMaximumDate(QDate(2003, 1, 1));
 
217
    edit.setDateTime(QDateTime(QDate(2002, 5, 5), QTime(10, 10, 10)));
 
218
    edit.setDisplayFormat(&quot;hh:mm:ss&quot;);
 
219
 
 
220
    // edit can no longer display dates. This means that the
 
221
    // minimum and maximum date will be set to the current date,
 
222
    // e.g. 2002, 5, 5.</pre>
 
223
<p>Access functions:</p>
 
224
<ul>
 
225
<li><div class="fn"/><b>QString displayFormat () const</b></li>
 
226
<li><div class="fn"/><b>void setDisplayFormat ( const QString &amp; <i>format</i> )</b></li>
 
227
</ul>
 
228
<p>See also <a href="qdatetime.html#toString">QDateTime::toString</a>() and <a href="qdatetimeedit.html#displayedSections-prop">displayedSections</a>().</p>
 
229
<h3 class="fn"><a name="displayedSections-prop"></a>displayedSections : const <a href="qdatetimeedit.html#Section-enum">Sections</a></h3>
 
230
<p>This property holds the currently displayed fields of the date time edit.</p>
 
231
<p>Returns a bit set of the displayed sections for this format. <i>setDisplayFormat()</i>, <a href="qdatetimeedit.html#displayFormat-prop">displayFormat</a>()</p>
 
232
<p>Access functions:</p>
 
233
<ul>
 
234
<li><div class="fn"/><b>Sections displayedSections () const</b></li>
 
235
</ul>
 
236
<h3 class="fn"><a name="maximumDate-prop"></a>maximumDate : <a href="qdate.html">QDate</a></h3>
 
237
<p>This property holds the maximum date of the date time edit.</p>
 
238
<p>When setting this property the <a href="qdatetimeedit.html#minimumDate-prop">minimumDate</a> is adjusted if necessary to ensure that the range remains valid. If the date is not a valid <a href="qdate.html">QDate</a> object, this function does nothing.</p>
 
239
<p>Access functions:</p>
 
240
<ul>
 
241
<li><div class="fn"/><b>QDate maximumDate () const</b></li>
 
242
<li><div class="fn"/><b>void setMaximumDate ( const QDate &amp; <i>max</i> )</b></li>
 
243
<li><div class="fn"/><b>void clearMaximumDate ()</b></li>
 
244
</ul>
 
245
<p>See also <a href="qdatetimeedit.html#minimumDate-prop">minimumDate</a>, <a href="qdatetimeedit.html#minimumTime-prop">minimumTime</a>, <a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>, and <a href="qdatetimeedit.html#setDateRange">setDateRange</a>().</p>
 
246
<h3 class="fn"><a name="maximumTime-prop"></a>maximumTime : <a href="qtime.html">QTime</a></h3>
 
247
<p>This property holds the maximum time of the date time edit.</p>
 
248
<p>When setting this property, the <a href="qdatetimeedit.html#minimumTime-prop">minimumTime</a> is adjusted if necessary to ensure that the range remains valid. If the time is not a valid <a href="qtime.html">QTime</a> object, this function does nothing.</p>
 
249
<p>Access functions:</p>
 
250
<ul>
 
251
<li><div class="fn"/><b>QTime maximumTime () const</b></li>
 
252
<li><div class="fn"/><b>void setMaximumTime ( const QTime &amp; <i>max</i> )</b></li>
 
253
<li><div class="fn"/><b>void clearMaximumTime ()</b></li>
 
254
</ul>
 
255
<p>See also <a href="qdatetimeedit.html#minimumTime-prop">minimumTime</a>, <a href="qdatetimeedit.html#minimumDate-prop">minimumDate</a>, <a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a>, and <a href="qdatetimeedit.html#setTimeRange">setTimeRange</a>().</p>
 
256
<h3 class="fn"><a name="minimumDate-prop"></a>minimumDate : <a href="qdate.html">QDate</a></h3>
 
257
<p>This property holds the minimum date of the date time edit.</p>
 
258
<p>When setting this property the <a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a> is adjusted if necessary, to ensure that the range remains valid. If the date is not a valid <a href="qdate.html">QDate</a> object, this function does nothing.</p>
 
259
<p>Access functions:</p>
 
260
<ul>
 
261
<li><div class="fn"/><b>QDate minimumDate () const</b></li>
 
262
<li><div class="fn"/><b>void setMinimumDate ( const QDate &amp; <i>min</i> )</b></li>
 
263
<li><div class="fn"/><b>void clearMinimumDate ()</b></li>
 
264
</ul>
 
265
<p>See also <a href="qdatetimeedit.html#minimumTime-prop">minimumTime</a>, <a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>, and <a href="qdatetimeedit.html#setDateRange">setDateRange</a>().</p>
 
266
<h3 class="fn"><a name="minimumTime-prop"></a>minimumTime : <a href="qtime.html">QTime</a></h3>
 
267
<p>This property holds the minimum time of the date time edit.</p>
 
268
<p>When setting this property the <a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a> is adjusted if necessary, to ensure that the range remains valid. If the time is not a valid <a href="qtime.html">QTime</a> object, this function does nothing.</p>
 
269
<p>Access functions:</p>
 
270
<ul>
 
271
<li><div class="fn"/><b>QTime minimumTime () const</b></li>
 
272
<li><div class="fn"/><b>void setMinimumTime ( const QTime &amp; <i>min</i> )</b></li>
 
273
<li><div class="fn"/><b>void clearMinimumTime ()</b></li>
 
274
</ul>
 
275
<p>See also <a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>, <a href="qdatetimeedit.html#minimumDate-prop">minimumDate</a>, <a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a>, and <a href="qdatetimeedit.html#setTimeRange">setTimeRange</a>().</p>
 
276
<h3 class="fn"><a name="time-prop"></a>time : <a href="qtime.html">QTime</a></h3>
 
277
<p>This property holds the QTime that is set in the QDateTimeEdit.</p>
 
278
<p>Access functions:</p>
 
279
<ul>
 
280
<li><div class="fn"/><b>QTime time () const</b></li>
 
281
<li><div class="fn"/><b>void setTime ( const QTime &amp; <i>time</i> )</b></li>
 
282
</ul>
 
283
<p>See also <a href="qdatetimeedit.html#date-prop">date</a>.</p>
 
284
<hr />
 
285
<h2>Member Function Documentation</h2>
 
286
<h3 class="fn"><a name="QDateTimeEdit"></a>QDateTimeEdit::QDateTimeEdit ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
287
<p>Constructs an empty date time editor with a <i>parent</i>.</p>
 
288
<h3 class="fn"><a name="QDateTimeEdit-2"></a>QDateTimeEdit::QDateTimeEdit ( const <a href="qdatetime.html">QDateTime</a> &amp; <i>datetime</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
289
<p>Constructs an empty date time editor with a <i>parent</i>. The value is set to <i>datetime</i>.</p>
 
290
<h3 class="fn"><a name="QDateTimeEdit-3"></a>QDateTimeEdit::QDateTimeEdit ( const <a href="qdate.html">QDate</a> &amp; <i>date</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
291
<p>Constructs an empty date time editor with a <i>parent</i>. The value is set to <i>date</i>.</p>
 
292
<h3 class="fn"><a name="QDateTimeEdit-4"></a>QDateTimeEdit::QDateTimeEdit ( const <a href="qtime.html">QTime</a> &amp; <i>time</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
 
293
<p>Constructs an empty date time editor with a <i>parent</i>. The value is set to <i>time</i>.</p>
 
294
<h3 class="fn"><a name="dateChanged"></a>void QDateTimeEdit::dateChanged ( const <a href="qdate.html">QDate</a> &amp; <i>date</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
295
<p>This signal is emitted whenever the date is changed. The new date is passed in <i>date</i>.</p>
 
296
<h3 class="fn"><a name="dateTimeChanged"></a>void QDateTimeEdit::dateTimeChanged ( const <a href="qdatetime.html">QDateTime</a> &amp; <i>datetime</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
297
<p>This signal is emitted whenever the date or time is changed. The new date and time is passed in <i>datetime</i>.</p>
 
298
<h3 class="fn"><a name="dateTimeFromText"></a><a href="qdatetime.html">QDateTime</a> QDateTimeEdit::dateTimeFromText ( const <a href="qstring.html">QString</a> &amp; <i>text</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
299
<p>Returns an appropriate datetime for the given <i>text</i>.</p>
 
300
<p>This virtual function is used by the datetime edit whenever it needs to interpret text entered by the user as a value.</p>
 
301
<p>See also <a href="qdatetimeedit.html#textFromDateTime">textFromDateTime</a>() and <a href="qdatetimeedit.html#validate">validate</a>().</p>
 
302
<h3 class="fn"><a name="sectionText"></a><a href="qstring.html">QString</a> QDateTimeEdit::sectionText ( <a href="qdatetimeedit.html#Section-enum">Section</a> <i>section</i> ) const</h3>
 
303
<p>Returns the text from the given <i>section</i>.</p>
 
304
<p>See also <a href="qdatetimeedit.html#currentSection-prop">currentSection</a>().</p>
 
305
<h3 class="fn"><a name="setDateRange"></a>void QDateTimeEdit::setDateRange ( const <a href="qdate.html">QDate</a> &amp; <i>min</i>, const <a href="qdate.html">QDate</a> &amp; <i>max</i> )</h3>
 
306
<p>Convenience function to set minimum and maximum date with one function call.</p>
 
307
<pre>&nbsp;   setDateRange(min, max);</pre>
 
308
<p>is analogous to:</p>
 
309
<pre>&nbsp;   setMinimumDate(min);
 
310
    setMaximumDate(max);</pre>
 
311
<p>If either <i>min</i> or <i>max</i> are not valid, this function does nothing.</p>
 
312
<p>See also <a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(), <a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a>(), <a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(), <a href="qdatetimeedit.html#minimumDate-prop">clearMinimumDate</a>(), <a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a>(), <a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>(), <a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a>(), <a href="qdatetimeedit.html#minimumTime-prop">clearMinimumTime</a>(), and <a href="qdate.html#isValid">QDate::isValid</a>().</p>
 
313
<h3 class="fn"><a name="setTimeRange"></a>void QDateTimeEdit::setTimeRange ( const <a href="qtime.html">QTime</a> &amp; <i>min</i>, const <a href="qtime.html">QTime</a> &amp; <i>max</i> )</h3>
 
314
<p>Convenience function to set minimum and maximum time with one function call.</p>
 
315
<pre>&nbsp;   setTimeRange(min, max);</pre>
 
316
<p>is analogous to:</p>
 
317
<pre>&nbsp;   setMinimumTime(min);
 
318
    setMaximumTime(max);</pre>
 
319
<p>If either <i>min</i> or <i>max</i> are not valid, this function does nothing.</p>
 
320
<p>See also <a href="qdatetimeedit.html#minimumDate-prop">setMinimumDate</a>(), <a href="qdatetimeedit.html#maximumDate-prop">maximumDate</a>(), <a href="qdatetimeedit.html#maximumDate-prop">setMaximumDate</a>(), <a href="qdatetimeedit.html#minimumDate-prop">clearMinimumDate</a>(), <a href="qdatetimeedit.html#minimumTime-prop">setMinimumTime</a>(), <a href="qdatetimeedit.html#maximumTime-prop">maximumTime</a>(), <a href="qdatetimeedit.html#maximumTime-prop">setMaximumTime</a>(), <a href="qdatetimeedit.html#minimumTime-prop">clearMinimumTime</a>(), and <a href="qtime.html#isValid">QTime::isValid</a>().</p>
 
321
<h3 class="fn"><a name="textFromDateTime"></a><a href="qstring.html">QString</a> QDateTimeEdit::textFromDateTime ( const <a href="qdatetime.html">QDateTime</a> &amp; <i>dateTime</i> ) const&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
322
<p>This virtual function is used by the date time edit whenever it needs to display <i>dateTime</i>.</p>
 
323
<p>If you reimplement this, you may also need to reimplement valueFromText() and <a href="qdatetimeedit.html#validate">validate</a>().</p>
 
324
<p>See also <a href="qdatetimeedit.html#dateTimeFromText">dateTimeFromText</a>() and <a href="qdatetimeedit.html#validate">validate</a>().</p>
 
325
<h3 class="fn"><a name="timeChanged"></a>void QDateTimeEdit::timeChanged ( const <a href="qtime.html">QTime</a> &amp; <i>time</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
326
<p>This signal is emitted whenever the time is changed. The new time is passed in <i>time</i>.</p>
 
327
<p /><address><hr /><div align="center">
 
328
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
329
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
330
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
331
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
332
</tr></table></div></address></body>
 
333
</html>