File: q3dateedit.html

package info (click to toggle)
qt4-x11 4%3A4.8.2%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 701,696 kB
  • sloc: cpp: 2,686,179; ansic: 375,485; python: 25,859; sh: 19,349; xml: 17,091; perl: 14,765; yacc: 5,383; asm: 5,038; makefile: 1,259; lex: 555; ruby: 526; objc: 347; cs: 112; pascal: 112; php: 54; sed: 34
file content (351 lines) | stat: -rw-r--r-- 28,886 bytes parent folder | download
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- q3datetimeedit.cpp -->
  <title>Qt 4.8: Q3DateEdit Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li>Qt3SupportLight</li>
<li>Q3DateEdit</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#protected-slots">Protected Slots</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">Q3DateEdit Class Reference</h1>
<!-- $$$Q3DateEdit-brief -->
<p>The Q3DateEdit class provides a date editor. <a href="#details">More...</a></p>
<!-- @@@Q3DateEdit -->
<pre class="cpp"> <span class="preprocessor">#include &lt;Q3DateEdit&gt;</span></pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qdateedit">Porting to Qt 4</a> for more information.</p>
<p><b>Inherits: </b><a href="q3datetimeeditbase.html">Q3DateTimeEditBase</a>.</p>
<ul>
<li><a href="q3dateedit-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#Order-enum">Order</a></b> { MDY, DMY, YMD }</td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<table class="propsummary">
<tr><td class="topAlign"><ul>
<li class="fn"><b><a href="q3dateedit.html#autoAdvance-prop">autoAdvance</a></b> : bool</li>
<li class="fn"><b><a href="q3dateedit.html#date-prop">date</a></b> : QDate</li>
<li class="fn"><b><a href="q3dateedit.html#maxValue-prop">maxValue</a></b> : QDate</li>
</ul></td><td class="topAlign"><ul>
<li class="fn"><b><a href="q3dateedit.html#minValue-prop">minValue</a></b> : QDate</li>
<li class="fn"><b><a href="q3dateedit.html#order-prop">order</a></b> : Order</li>
</ul>
</td></tr>
</table>
<ul>
<li class="fn">58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#Q3DateEdit">Q3DateEdit</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#Q3DateEdit-2">Q3DateEdit</a></b> ( const QDate &amp; <i>date</i>, QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#dtor.Q3DateEdit">~Q3DateEdit</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#autoAdvance-prop">autoAdvance</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDate </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#date-prop">date</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDate </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#maxValue-prop">maxValue</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDate </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#minValue-prop">minValue</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Order </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#order-prop">order</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#separator">separator</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#autoAdvance-prop">setAutoAdvance</a></b> ( bool <i>advance</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#maxValue-prop">setMaxValue</a></b> ( const QDate &amp; <i>d</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#minValue-prop">setMinValue</a></b> ( const QDate &amp; <i>d</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#order-prop">setOrder</a></b> ( Order <i>order</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#setRange">setRange</a></b> ( const QDate &amp; <i>min</i>, const QDate &amp; <i>max</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#setSeparator">setSeparator</a></b> ( const QString &amp; <i>s</i> )</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#minimumSizeHint">minimumSizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QSize </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#sizeHint">sizeHint</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">221 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li class="fn">13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#date-prop">setDate</a></b> ( const QDate &amp; <i>date</i> )</td></tr>
</table>
<ul>
<li class="fn">19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#valueChanged">valueChanged</a></b> ( const QDate &amp; <i>date</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#fix">fix</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#setDay">setDay</a></b> ( int <i>day</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#setMonth">setMonth</a></b> ( int <i>month</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#setYear">setYear</a></b> ( int <i>year</i> )</td></tr>
</table>
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#event">event</a></b> ( QEvent * <i>e</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#sectionFormattedText">sectionFormattedText</a></b> ( int <i>sec</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#timerEvent">timerEvent</a></b> ( QTimerEvent * )</td></tr>
</table>
<ul>
<li class="fn">37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li class="fn">1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<a name="protected-slots"></a>
<h2>Protected Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="q3dateedit.html#updateButtons">updateButtons</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$Q3DateEdit-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The Q3DateEdit class provides a date editor.</p>
<p>Q3DateEdit allows the user to edit dates by using the keyboard or the arrow keys to increase/decrease date values. The arrow keys can be used to move from section to section within the Q3DateEdit box. Dates appear in accordance with the local date/time settings or in year, month, day order if the system doesn't provide this information. It is recommended that the Q3DateEdit be initialised with a date, e.g&#x2e;</p>
<pre class="cpp"> <span class="type">Q3DateEdit</span> <span class="operator">*</span>dateEdit <span class="operator">=</span> <span class="keyword">new</span> <span class="type">Q3DateEdit</span>(<span class="type"><a href="qdate.html">QDate</a></span><span class="operator">::</span>currentDate()<span class="operator">,</span> <span class="keyword">this</span>);
 dateEdit<span class="operator">-</span><span class="operator">&gt;</span>setRange(<span class="type"><a href="qdate.html">QDate</a></span><span class="operator">::</span>currentDate()<span class="operator">.</span>addDays(<span class="operator">-</span><span class="number">365</span>)<span class="operator">,</span>
                     <span class="type"><a href="qdate.html">QDate</a></span><span class="operator">::</span>currentDate()<span class="operator">.</span>addDays( <span class="number">365</span>));
 dateEdit<span class="operator">-</span><span class="operator">&gt;</span>setOrder(<span class="type">Q3DateEdit</span><span class="operator">::</span>MDY);
 dateEdit<span class="operator">-</span><span class="operator">&gt;</span>setAutoAdvance(<span class="keyword">true</span>);</pre>
<p>Here we've created a new Q3DateEdit object initialised 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. If the auto advance property is true (as we've set it here) when the user completes a section of the date, e.g&#x2e; enters two digits for the month, they are automatically taken to the next section.</p>
<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="q3dateedit.html#minValue-prop">setMinValue</a>(), <a href="q3dateedit.html#maxValue-prop">setMaxValue</a>() or <a href="q3dateedit.html#setRange">setRange</a>().</p>
<p>Terminology: A Q3DateEdit widget comprises three 'sections', one each for the year, month and day. You can change the separator character using Q3DateTimeEditor::setSeparator(), by default the separator will be taken from the systems settings. If that is not possible, it defaults to &quot;-&quot;.</p>
<p class="centerAlign"><img src="images/datetimewidgets.png" alt="Date Time Widgets" /></p></div>
<p><b>See also </b><a href="qdate.html">QDate</a>, <a href="q3timeedit.html">Q3TimeEdit</a>, and <a href="q3datetimeedit.html">Q3DateTimeEdit</a>.</p>
<!-- @@@Q3DateEdit -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Order$$$DMY$$$MDY$$$YMD$$$YDM -->
<h3 class="fn"><a name="Order-enum"></a>enum Q3DateEdit::<span class="name">Order</span></h3>
<p>This enum defines the order in which the sections that comprise a date appear.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>Q3DateEdit::MDY</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">month-day-year</td></tr>
<tr><td class="topAlign"><tt>Q3DateEdit::DMY</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">day-month-year</td></tr>
<tr><td class="topAlign"><tt>Q3DateEdit::YMD</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">year-month-day (the default)</td></tr>
</table>
<!-- @@@Order -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$autoAdvance-prop$$$autoAdvance$$$setAutoAdvancebool -->
<h3 class="fn"><a name="autoAdvance-prop"></a><span class="name">autoAdvance</span> : <span class="type">bool</span></h3>
<p>This property holds whether the editor automatically advances to the next section.</p>
<p>If autoAdvance is true, the editor will automatically advance focus to the next date section if a user has completed a section. The default is false.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> bool </td><td class="memItemRight bottomAlign"><span class="name"><b>autoAdvance</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setAutoAdvance</b></span> ( bool <i>advance</i> )</td></tr>
</table>
<!-- @@@autoAdvance -->
<!-- $$$date-prop$$$date$$$setDateconstQDate& -->
<h3 class="fn"><a name="date-prop"></a><span class="name">date</span> : <span class="type"><a href="qdate.html">QDate</a></span></h3>
<p>This property holds the editor's date value.</p>
<p>If the date property is not valid, the editor displays all zeroes and Q3DateEdit::date() will return an invalid date. It is strongly recommended that the editor is given a default date value (e.g&#x2e; currentDate()). That way, attempts to set the date property to an invalid date will fail.</p>
<p>When changing the date property, if the date is less than <a href="q3dateedit.html#minValue-prop">minValue</a>(), or is greater than <a href="q3dateedit.html#maxValue-prop">maxValue</a>(), nothing happens.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QDate </td><td class="memItemRight bottomAlign"><span class="name"><b>date</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setDate</b></span> ( const QDate &amp; <i>date</i> )</td></tr>
</table>
<!-- @@@date -->
<!-- $$$maxValue-prop$$$maxValue$$$setMaxValueconstQDate& -->
<h3 class="fn"><a name="maxValue-prop"></a><span class="name">maxValue</span> : <span class="type"><a href="qdate.html">QDate</a></span></h3>
<p>This property holds the editor's maximum value.</p>
<p>Setting the maximum date value for the editor is equivalent to calling Q3DateEdit::setRange(<a href="q3dateedit.html#minValue-prop">minValue</a>(), <i>d</i>), where <i>d</i> is the maximum date. The default maximum date is 8000-12-31.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QDate </td><td class="memItemRight bottomAlign"><span class="name"><b>maxValue</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMaxValue</b></span> ( const QDate &amp; <i>d</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3dateedit.html#minValue-prop">minValue</a> and <a href="q3dateedit.html#setRange">setRange</a>().</p>
<!-- @@@maxValue -->
<!-- $$$minValue-prop$$$minValue$$$setMinValueconstQDate& -->
<h3 class="fn"><a name="minValue-prop"></a><span class="name">minValue</span> : <span class="type"><a href="qdate.html">QDate</a></span></h3>
<p>This property holds the editor's minimum value.</p>
<p>Setting the minimum date value is equivalent to calling Q3DateEdit::setRange(<i>d</i>, <a href="q3dateedit.html#maxValue-prop">maxValue</a>()), where <i>d</i> is the minimum date. The default minimum date is 1752-09-14.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QDate </td><td class="memItemRight bottomAlign"><span class="name"><b>minValue</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setMinValue</b></span> ( const QDate &amp; <i>d</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3dateedit.html#maxValue-prop">maxValue</a> and <a href="q3dateedit.html#setRange">setRange</a>().</p>
<!-- @@@minValue -->
<!-- $$$order-prop$$$order$$$setOrderOrder -->
<h3 class="fn"><a name="order-prop"></a><span class="name">order</span> : <span class="type"><a href="q3dateedit.html#Order-enum">Order</a></span></h3>
<p>This property holds the order in which the year, month and day appear.</p>
<p>The default order is locale dependent.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> Order </td><td class="memItemRight bottomAlign"><span class="name"><b>order</b></span> () const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setOrder</b></span> ( Order <i>order</i> )</td></tr>
</table>
<p><b>See also </b><a href="q3dateedit.html#Order-enum">Order</a>.</p>
<!-- @@@order -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$Q3DateEdit[overload1]$$$Q3DateEditQWidget*constchar* -->
<h3 class="fn"><a name="Q3DateEdit"></a>Q3DateEdit::<span class="name">Q3DateEdit</span> ( <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <i>name</i> = 0 )</h3>
<p>Constructs an empty date editor which is a child of <i>parent</i> and called name <i>name</i>.</p>
<!-- @@@Q3DateEdit -->
<!-- $$$Q3DateEdit$$$Q3DateEditconstQDate&QWidget*constchar* -->
<h3 class="fn"><a name="Q3DateEdit-2"></a>Q3DateEdit::<span class="name">Q3DateEdit</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> &amp; <i>date</i>, <span class="type"><a href="qwidget.html">QWidget</a></span> * <i>parent</i> = 0, const <span class="type">char</span> * <i>name</i> = 0 )</h3>
<p>This is an overloaded function.</p>
<p>Constructs a date editor with the initial value <i>date</i>, parent <i>parent</i> and called <i>name</i>.</p>
<p>The date editor is initialized with <i>date</i>.</p>
<!-- @@@Q3DateEdit -->
<!-- $$$~Q3DateEdit[overload1]$$$~Q3DateEdit -->
<h3 class="fn"><a name="dtor.Q3DateEdit"></a>Q3DateEdit::<span class="name">~Q3DateEdit</span> ()</h3>
<p>Destroys the object and frees any allocated resources.</p>
<!-- @@@~Q3DateEdit -->
<!-- $$$event[overload1]$$$eventQEvent* -->
<h3 class="fn"><a name="event"></a><span class="type">bool</span> Q3DateEdit::<span class="name">event</span> ( <span class="type"><a href="qevent.html">QEvent</a></span> * <i>e</i> )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<!-- @@@event -->
<!-- $$$fix[overload1]$$$fix -->
<h3 class="fn"><a name="fix"></a><span class="type">void</span> Q3DateEdit::<span class="name">fix</span> ()<tt> [virtual protected]</tt></h3>
<p>Attempts to fix any invalid date entries.</p>
<p>The rules applied are as follows:</p>
<ul>
<li>If the year has four digits it is left unchanged.</li>
<li>If the year has two digits, the year will be changed to four digits in the range current year - 70 to current year + 29.</li>
<li>If the year has three digits in the range 100..999, the current millennium, i.e&#x2e; 2000, will be added giving a year in the range 2100..2999.</li>
<li>If the day or month is 0 then it will be set to 1 or the minimum valid day/month in the range.</li>
</ul>
<!-- @@@fix -->
<!-- $$$minimumSizeHint[overload1]$$$minimumSizeHint -->
<h3 class="fn"><a name="minimumSizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3DateEdit::<span class="name">minimumSizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p>
<!-- @@@minimumSizeHint -->
<!-- $$$resizeEvent[overload1]$$$resizeEventQResizeEvent* -->
<h3 class="fn"><a name="resizeEvent"></a><span class="type">void</span> Q3DateEdit::<span class="name">resizeEvent</span> ( <span class="type"><a href="qresizeevent.html">QResizeEvent</a></span> * )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<!-- @@@resizeEvent -->
<!-- $$$sectionFormattedText[overload1]$$$sectionFormattedTextint -->
<h3 class="fn"><a name="sectionFormattedText"></a><span class="type"><a href="qstring.html">QString</a></span> Q3DateEdit::<span class="name">sectionFormattedText</span> ( <span class="type">int</span> <i>sec</i> )<tt> [virtual protected]</tt></h3>
<p>Returns the formatted number for section <i>sec</i>. This will correspond to either the year, month or day section, depending on the current display order.</p>
<p><b>See also </b><a href="q3dateedit.html#order-prop">setOrder</a>().</p>
<!-- @@@sectionFormattedText -->
<!-- $$$separator[overload1]$$$separator -->
<h3 class="fn"><a name="separator"></a><span class="type"><a href="qstring.html">QString</a></span> Q3DateEdit::<span class="name">separator</span> () const</h3>
<p>Returns the editor's separator.</p>
<p><b>See also </b><a href="q3dateedit.html#setSeparator">setSeparator</a>().</p>
<!-- @@@separator -->
<!-- $$$setDay[overload1]$$$setDayint -->
<h3 class="fn"><a name="setDay"></a><span class="type">void</span> Q3DateEdit::<span class="name">setDay</span> ( <span class="type">int</span> <i>day</i> )<tt> [virtual protected]</tt></h3>
<p>Sets the day to <i>day</i>, which must be a valid day. The function will ensure that the <i>day</i> set is valid for the month and year.</p>
<!-- @@@setDay -->
<!-- $$$setMonth[overload1]$$$setMonthint -->
<h3 class="fn"><a name="setMonth"></a><span class="type">void</span> Q3DateEdit::<span class="name">setMonth</span> ( <span class="type">int</span> <i>month</i> )<tt> [virtual protected]</tt></h3>
<p>Sets the month to <i>month</i>, which must be a valid month, i.e&#x2e; between 1 and 12.</p>
<!-- @@@setMonth -->
<!-- $$$setRange[overload1]$$$setRangeconstQDate&constQDate& -->
<h3 class="fn"><a name="setRange"></a><span class="type">void</span> Q3DateEdit::<span class="name">setRange</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> &amp; <i>min</i>, const <span class="type"><a href="qdate.html">QDate</a></span> &amp; <i>max</i> )<tt> [virtual]</tt></h3>
<p>Sets the valid input range for the editor to be from <i>min</i> to <i>max</i> inclusive. If <i>min</i> is invalid no minimum date will be set. Similarly, if <i>max</i> is invalid no maximum date will be set.</p>
<!-- @@@setRange -->
<!-- $$$setSeparator[overload1]$$$setSeparatorconstQString& -->
<h3 class="fn"><a name="setSeparator"></a><span class="type">void</span> Q3DateEdit::<span class="name">setSeparator</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>s</i> )<tt> [virtual]</tt></h3>
<p>Sets the separator to <i>s</i>. Note that currently only the first character of <i>s</i> is used.</p>
<p><b>See also </b><a href="q3dateedit.html#separator">separator</a>().</p>
<!-- @@@setSeparator -->
<!-- $$$setYear[overload1]$$$setYearint -->
<h3 class="fn"><a name="setYear"></a><span class="type">void</span> Q3DateEdit::<span class="name">setYear</span> ( <span class="type">int</span> <i>year</i> )<tt> [virtual protected]</tt></h3>
<p>Sets the year to <i>year</i>, which must be a valid year. The range currently supported is from 1752 to 8000.</p>
<p><b>See also </b><a href="qdate.html">QDate</a>.</p>
<!-- @@@setYear -->
<!-- $$$sizeHint[overload1]$$$sizeHint -->
<h3 class="fn"><a name="sizeHint"></a><span class="type"><a href="qsize.html">QSize</a></span> Q3DateEdit::<span class="name">sizeHint</span> () const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<!-- @@@sizeHint -->
<!-- $$$timerEvent[overload1]$$$timerEventQTimerEvent* -->
<h3 class="fn"><a name="timerEvent"></a><span class="type">void</span> Q3DateEdit::<span class="name">timerEvent</span> ( <span class="type"><a href="qtimerevent.html">QTimerEvent</a></span> * )<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#timerEvent">QObject::timerEvent</a>().</p>
<!-- @@@timerEvent -->
<!-- $$$updateButtons[overload1]$$$updateButtons -->
<h3 class="fn"><a name="updateButtons"></a><span class="type">void</span> Q3DateEdit::<span class="name">updateButtons</span> ()<tt> [protected slot]</tt></h3>
<p>Enables/disables the push buttons according to the min/max date for this widget.</p>
<!-- @@@updateButtons -->
<!-- $$$valueChanged[overload1]$$$valueChangedconstQDate& -->
<h3 class="fn"><a name="valueChanged"></a><span class="type">void</span> Q3DateEdit::<span class="name">valueChanged</span> ( const <span class="type"><a href="qdate.html">QDate</a></span> &amp; <i>date</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted whenever the editor's value changes. The <i>date</i> parameter is the new value.</p>
<!-- @@@valueChanged -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2012 Nokia Corporation and/or its
      subsidiaries. Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>