Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 3342

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- q3datetimeedit.cpp -->
<head>
  <title>Qt 4.6: Q3DateTimeEdit Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//Q3DateTimeEdit"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<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="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">Q3DateTimeEdit Class Reference<br /><span class="small-subtitle">[<a href="qt3support.html">Qt3Support</a> module]</span>
</h1>
<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>
<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 <a href="porting4.html#qdatetimeedit">Porting to Qt 4</a> for more information.</p>
<p>Inherits <a href="qwidget.html">QWidget</a>.</p>
<ul>
<li><a href="q3datetimeedit-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li><div class="fn"><b><a href="q3datetimeedit.html#dateTime-prop">dateTime</a></b> : QDateTime</div></li>
</ul>
<ul>
<li><div bar="2" class="fn"></div>58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#Q3DateTimeEdit">Q3DateTimeEdit</a></b> ( QWidget * <i>parent</i> = 0, const char * <i>name</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><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 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#dtor.Q3DateTimeEdit">~Q3DateTimeEdit</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#autoAdvance">autoAdvance</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q3DateEdit * </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#dateEdit">dateEdit</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QDateTime </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#dateTime-prop">dateTime</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#setAutoAdvance">setAutoAdvance</a></b> ( bool <i>advance</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q3TimeEdit * </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#timeEdit">timeEdit</a></b> ()</td></tr>
</table>
<hr />
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#minimumSizeHint">minimumSizeHint</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual QSize </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#sizeHint">sizeHint</a></b> () const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>217 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<hr />
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#dateTime-prop">setDateTime</a></b> ( const QDateTime &amp; <i>dt</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#valueChanged">valueChanged</a></b> ( const QDateTime &amp; <i>datetime</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="q3datetimeedit.html#resizeEvent">resizeEvent</a></b> ( QResizeEvent * <i>event</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<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>
<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>
<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>
<p>It is recommended that the Q3DateTimeEdit is initialised with a datetime, e.g&#x2e;</p>
<pre> Q3DateTimeEdit *dateTimeEdit = new Q3DateTimeEdit(QDateTime::currentDateTime(), this);
 dateTimeEdit-&gt;dateEdit()-&gt;setRange(QDateTime::currentDate(),
                                     QDateTime::currentDate().addDays(7));</pre>
<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>
<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>
<p align="center"><img src="images/datetimewidgets.png" alt="Date Time Widgets" /></p><p>See also <a href="q3dateedit.html">Q3DateEdit</a> and <a href="q3timeedit.html">Q3TimeEdit</a>.</p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/dateTime"></a>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/setDateTime"></a>
<h3 class="fn"><a name="dateTime-prop"></a>dateTime : <a href="qdatetime.html">QDateTime</a></h3>
<p>This property holds the editor's datetime value.</p>
<p>The datetime edit's datetime which may be an invalid datetime.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QDateTime </td><td class="memItemRight" valign="bottom"><b>dateTime</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b>setDateTime</b> ( const QDateTime &amp; <i>dt</i> )</td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/Q3DateTimeEdit"></a>
<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>
<p>Constructs an empty datetime edit with parent <i>parent</i> and called <i>name</i>.</p>
<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>
<p>This is an overloaded function.</p>
<p>Constructs a datetime edit with the initial value <i>datetime</i>, parent <i>parent</i> and called <i>name</i>.</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/~Q3DateTimeEdit"></a>
<h3 class="fn"><a name="dtor.Q3DateTimeEdit"></a>Q3DateTimeEdit::~Q3DateTimeEdit ()</h3>
<p>Destroys the object and frees any allocated resources.</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/autoAdvance"></a>
<h3 class="fn"><a name="autoAdvance"></a>bool Q3DateTimeEdit::autoAdvance () const</h3>
<p>Returns true if auto-advance is enabled, otherwise returns false.</p>
<p>See also <a href="q3datetimeedit.html#setAutoAdvance">setAutoAdvance</a>().</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/dateEdit"></a>
<h3 class="fn"><a name="dateEdit"></a><a href="q3dateedit.html">Q3DateEdit</a> * Q3DateTimeEdit::dateEdit ()</h3>
<p>Returns the internal widget used for editing the date part of the datetime.</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/minimumSizeHint"></a>
<h3 class="fn"><a name="minimumSizeHint"></a><a href="qsize.html">QSize</a> Q3DateTimeEdit::minimumSizeHint () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget::minimumSizeHint</a>().</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/resizeEvent"></a>
<h3 class="fn"><a name="resizeEvent"></a>void Q3DateTimeEdit::resizeEvent ( <a href="qresizeevent.html">QResizeEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#resizeEvent">QWidget::resizeEvent</a>().</p>
<p>Intercepts and handles the resize <i>event</i>, which hase a special meaning for the <a href="q3datetimeedit.html" class="compat">Q3DateTimeEdit</a>.</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/setAutoAdvance"></a>
<h3 class="fn"><a name="setAutoAdvance"></a>void Q3DateTimeEdit::setAutoAdvance ( bool <i>advance</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<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>
<p>See also <a href="q3datetimeedit.html#autoAdvance">autoAdvance</a>().</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/sizeHint"></a>
<h3 class="fn"><a name="sizeHint"></a><a href="qsize.html">QSize</a> Q3DateTimeEdit::sizeHint () const&nbsp;&nbsp;<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget::sizeHint</a>().</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/timeEdit"></a>
<h3 class="fn"><a name="timeEdit"></a><a href="q3timeedit.html">Q3TimeEdit</a> * Q3DateTimeEdit::timeEdit ()</h3>
<p>Returns the internal widget used for editing the time part of the datetime.</p>
<a name="//apple_ref/cpp/instm/Q3DateTimeEdit/valueChanged"></a>
<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>
<p>This signal is emitted every time the date or time changes. The <i>datetime</i> argument is the new datetime.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>