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

« back to all changes in this revision

Viewing changes to doc/html/q3datetimeedit.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/qt3support/widgets/q3datetimeedit.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: Q3DateTimeEdit 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">Q3DateTimeEdit Class Reference</h1>
 
21
<p>The Q3DateTimeEdit class combines a <a href="q3dateedit.html">Q3DateEdit</a> and <a href="q3timeedit.html">Q3TimeEdit</a> widget into a single widget for editing datetimes. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;Q3DateTimeEdit&gt;</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 the <a href="porting4.html">Porting Guide</a> for more information.</p>
 
23
<p>Part of the <a href="qt3support.html">Qt3Support</a> module.</p>
 
24
<p>Inherits <a href="qwidget.html">QWidget</a>.</p>
 
25
<ul>
 
26
<li><a href="q3datetimeedit-members.html">List of all members, including inherited members</a></li>
 
27
</ul>
 
28
<a name="properties"></a>
 
29
<h3>Properties</h3>
 
30
<ul>
 
31
<li><div class="fn"/><b><a href="q3datetimeedit.html#dateTime-prop">dateTime</a></b> : QDateTime</li>
 
32
</ul>
 
33
<ul>
 
34
<li><div class="fn"/>52 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
 
35
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
36
</ul>
 
37
<a name="public-functions"></a>
 
38
<h3>Public Functions</h3>
 
39
<ul>
 
40
<li><div class="fn"/><b><a href="q3datetimeedit.html#Q3DateTimeEdit">Q3DateTimeEdit</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</li>
 
41
<li><div class="fn"/><b><a href="q3datetimeedit.html#Q3DateTimeEdit-2">Q3DateTimeEdit</a></b> ( const QDateTime &amp; <i>datetime</i>, QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</li>
 
42
<li><div class="fn"/><b><a href="q3datetimeedit.html#dtor.Q3DateTimeEdit">~Q3DateTimeEdit</a></b> ()</li>
 
43
<li><div class="fn"/>bool <b><a href="q3datetimeedit.html#autoAdvance">autoAdvance</a></b> () const</li>
 
44
<li><div class="fn"/>Q3DateEdit * <b><a href="q3datetimeedit.html#dateEdit">dateEdit</a></b> ()</li>
 
45
<li><div class="fn"/>QDateTime <b><a href="q3datetimeedit.html#dateTime-prop">dateTime</a></b> () const</li>
 
46
<li><div class="fn"/>virtual void <b><a href="q3datetimeedit.html#setAutoAdvance">setAutoAdvance</a></b> ( bool <i>advance</i> )</li>
 
47
<li><div class="fn"/>Q3TimeEdit * <b><a href="q3datetimeedit.html#timeEdit">timeEdit</a></b> ()</li>
 
48
</ul>
 
49
<ul>
 
50
<li><div class="fn"/>183 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
 
51
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
52
<li><div class="fn"/>10 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
 
53
</ul>
 
54
<a name="public-slots"></a>
 
55
<h3>Public Slots</h3>
 
56
<ul>
 
57
<li><div class="fn"/>virtual void <b><a href="q3datetimeedit.html#dateTime-prop">setDateTime</a></b> ( const QDateTime &amp; <i>dt</i> )</li>
 
58
</ul>
 
59
<ul>
 
60
<li><div class="fn"/>17 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
 
61
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
62
</ul>
 
63
<a name="signals"></a>
 
64
<h3>Signals</h3>
 
65
<ul>
 
66
<li><div class="fn"/>void <b><a href="q3datetimeedit.html#valueChanged">valueChanged</a></b> ( const QDateTime &amp; <i>datetime</i> )</li>
 
67
</ul>
 
68
<ul>
 
69
<li><div class="fn"/>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
 
70
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
71
</ul>
 
72
<h3>Additional Inherited Members</h3>
 
73
<ul>
 
74
<li><div class="fn"/>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
 
75
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
76
<li><div class="fn"/>39 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
 
77
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
78
</ul>
 
79
<a name="details"></a>
 
80
<hr />
 
81
<h2>Detailed Description</h2>
 
82
<p>The Q3DateTimeEdit class combines a <a href="q3dateedit.html">Q3DateEdit</a> and <a href="q3timeedit.html">Q3TimeEdit</a> widget into a single widget for editing datetimes.</p>
 
83
<p>Q3DateTimeEdit consists of a <a href="q3dateedit.html">Q3DateEdit</a> and <a href="q3timeedit.html">Q3TimeEdit</a> widget placed side by side and offers the functionality of both. The user can edit the date and time by using the keyboard or the arrow keys to increase/decrease date or time values. The Tab key can be used to move from section to section within the Q3DateTimeEdit widget, and the user can be moved automatically when they complete a section using <a href="q3datetimeedit.html#setAutoAdvance">setAutoAdvance</a>(). The datetime can be set with <a href="q3datetimeedit.html#dateTime-prop">setDateTime</a>().</p>
 
84
<p>The date format is read from the system's locale settings. It is set to year, month, day order if that is not possible. See <a href="q3dateedit.html#order-prop">Q3DateEdit::setOrder</a>() to change this. Times appear in the order hours, minutes, seconds using the 24 hour clock.</p>
 
85
<p>It is recommended that the Q3DateTimeEdit is initialised with a datetime, e.g.</p>
 
86
<pre>&nbsp;   Q3DateTimeEdit *dateTimeEdit = new Q3DateTimeEdit(QDateTime::currentDateTime(), this);
 
87
    dateTimeEdit-&gt;dateEdit()-&gt;setRange(QDateTime::currentDate(),
 
88
                                        QDateTime::currentDate().addDays(7));</pre>
 
89
<p>Here we've created a new Q3DateTimeEdit set to the current date and time, and set the date to have a minimum date of now and a maximum date of a week from now.</p>
 
90
<p>Terminology: A <a href="q3dateedit.html">Q3DateEdit</a> widget consists of three 'sections', one each for the year, month and day. Similarly a <a href="q3timeedit.html">Q3TimeEdit</a> consists of three sections, one each for the hour, minute and second. The character that separates each date section is specified with setDateSeparator(); similarly setTimeSeparator() is used for the time sections.</p>
 
91
<center><img src="images/datetimewidgets.png" alt="Date Time Widgets" /></center><p>See also <a href="q3dateedit.html">Q3DateEdit</a> and <a href="q3timeedit.html">Q3TimeEdit</a>.</p>
 
92
<hr />
 
93
<h2>Property Documentation</h2>
 
94
<h3 class="fn"><a name="dateTime-prop"></a>dateTime : <a href="qdatetime.html">QDateTime</a></h3>
 
95
<p>This property holds the editor's datetime value.</p>
 
96
<p>The datetime edit's datetime which may be an invalid datetime.</p>
 
97
<p>Access functions:</p>
 
98
<ul>
 
99
<li><div class="fn"/><b>QDateTime dateTime () const</b></li>
 
100
<li><div class="fn"/><b>virtual void setDateTime ( const QDateTime &amp; <i>dt</i> )</b></li>
 
101
</ul>
 
102
<hr />
 
103
<h2>Member Function Documentation</h2>
 
104
<h3 class="fn"><a name="Q3DateTimeEdit"></a>Q3DateTimeEdit::Q3DateTimeEdit ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, const char * <i>name</i> = 0 )</h3>
 
105
<p>Constructs an empty datetime edit with parent <i>parent</i> and called <i>name</i>.</p>
 
106
<h3 class="fn"><a name="Q3DateTimeEdit-2"></a>Q3DateTimeEdit::Q3DateTimeEdit ( const <a href="qdatetime.html">QDateTime</a> &amp; <i>datetime</i>, <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0, const char * <i>name</i> = 0 )</h3>
 
107
<p>Constructs a datetime edit with the initial value <i>datetime</i>, parent <i>parent</i> and called <i>name</i>.</p>
 
108
<h3 class="fn"><a name="dtor.Q3DateTimeEdit"></a>Q3DateTimeEdit::~Q3DateTimeEdit ()</h3>
 
109
<p>Destroys the object and frees any allocated resources.</p>
 
110
<h3 class="fn"><a name="autoAdvance"></a>bool Q3DateTimeEdit::autoAdvance () const</h3>
 
111
<p>Returns true if auto-advance is enabled, otherwise returns false.</p>
 
112
<p>See also <a href="q3datetimeedit.html#setAutoAdvance">setAutoAdvance</a>().</p>
 
113
<h3 class="fn"><a name="dateEdit"></a><a href="q3dateedit.html">Q3DateEdit</a> * Q3DateTimeEdit::dateEdit ()</h3>
 
114
<p>Returns the internal widget used for editing the date part of the datetime.</p>
 
115
<h3 class="fn"><a name="setAutoAdvance"></a>void Q3DateTimeEdit::setAutoAdvance ( bool <i>advance</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
 
116
<p>Sets the auto advance property of the editor to <i>advance</i>. If set to true, the editor will automatically advance focus to the next date or time section if the user has completed a section.</p>
 
117
<h3 class="fn"><a name="timeEdit"></a><a href="q3timeedit.html">Q3TimeEdit</a> * Q3DateTimeEdit::timeEdit ()</h3>
 
118
<p>Returns the internal widget used for editing the time part of the datetime.</p>
 
119
<h3 class="fn"><a name="valueChanged"></a>void Q3DateTimeEdit::valueChanged ( const <a href="qdatetime.html">QDateTime</a> &amp; <i>datetime</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
 
120
<p>This signal is emitted every time the date or time changes. The <i>datetime</i> argument is the new datetime.</p>
 
121
<p /><address><hr /><div align="center">
 
122
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
123
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
124
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
125
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
126
</tr></table></div></address></body>
 
127
</html>