Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 1167

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/src/widgets/qdatetimeedit.cpp:2264 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QDateTimeEdit Class</title>
<style type="text/css"><!--
h3.fn,span.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>QDateTimeEdit Class Reference</h1>

<p>The QDateTimeEdit class combines a QDateEdit and QTimeEdit
widget into a single widget for editing datetimes.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qdatetimeedit-h.html">qdatetimeedit.h</a>&gt;</tt>
<p>Inherits <a href="qwidget.html">QWidget</a>.
<p><a href="qdatetimeedit-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn><a href="#QDateTimeEdit"><b>QDateTimeEdit</b></a> ( QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#QDateTimeEdit-2"><b>QDateTimeEdit</b></a> ( const&nbsp;QDateTime&nbsp;&amp;&nbsp;datetime, QWidget&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )</div></li>
<li><div class=fn><a href="#~QDateTimeEdit"><b>~QDateTimeEdit</b></a> ()</div></li>
<li><div class=fn>virtual void <a href="#setDateTime"><b>setDateTime</b></a> ( const&nbsp;QDateTime&nbsp;&amp;&nbsp;dt )</div></li>
<li><div class=fn>QDateTime <a href="#dateTime"><b>dateTime</b></a> () const</div></li>
<li><div class=fn>QDateEdit * <a href="#dateEdit"><b>dateEdit</b></a> ()</div></li>
<li><div class=fn>QTimeEdit * <a href="#timeEdit"><b>timeEdit</b></a> ()</div></li>
<li><div class=fn>virtual void <a href="#setAutoAdvance"><b>setAutoAdvance</b></a> ( bool&nbsp;advance )</div></li>
<li><div class=fn>bool <a href="#autoAdvance"><b>autoAdvance</b></a> () const</div></li>
</ul>
<h2>Signals</h2>
<ul>
<li><div class=fn>void <a href="#valueChanged"><b>valueChanged</b></a> ( const&nbsp;QDateTime&nbsp;&amp;&nbsp;datetime )</div></li>
</ul>
<h2>Properties</h2>
<ul>
<li><div class=fn>QDateTime <a href="#dateTime-prop"><b>dateTime</b></a>&nbsp;- the datetime value of the editor</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>

<p> 



The QDateTimeEdit class combines a <a href="qdateedit.html">QDateEdit</a> and <a href="qtimeedit.html">QTimeEdit</a>
widget into a single widget for editing datetimes.
<p> QDateTimeEdit consists of a QDateEdit and QTimeEdit 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 QDateTimeEdit widget, and the
user can be moved automatically when they complete a section using
<a href="#setAutoAdvance">setAutoAdvance</a>(). The datetime can be set with <a href="#setDateTime">setDateTime</a>().
<p> The dateformat is read from the system's locale settings. It is set to
year, month, day order if that is not possible. see <a href="qdateedit.html#setOrder">QDateEdit::setOrder</a>()
to change this. Times appear in the order hours, minutes, seconds
using the 24 hour clock.
<p> It is recommended that the QDateTimeEdit is initialised with a
datetime, e.g.
<pre>
    QDateTimeEdit *dateTimeEdit = new QDateTimeEdit( QDateTime::<a href="qdatetime.html#currentDateTime">currentDateTime</a>(), this );
    dateTimeEdit-&gt;<a href="#dateEdit">dateEdit</a>()-&gt;setRange( QDateTime::currentDate(),
                                        QDateTime::currentDate().addDays( 7 ) );
    </pre>
 
Here we've created a new QDateTimeEdit 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> Terminology: A <a href="qdateedit.html">QDateEdit</a> widget consists of three 'sections', one each
for the year, month and day. Similarly a <a href="qtimeedit.html">QTimeEdit</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> <center><img src="datetimewidgets.png" alt="Date Time Widgets"></center> 
<p> <p>See also <a href="qdateedit.html">QDateEdit</a>, <a href="qtimeedit.html">QTimeEdit</a>, <a href="advanced.html">Advanced Widgets</a> and <a href="time.html">Time and Date</a>.

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QDateTimeEdit"></a>QDateTimeEdit::QDateTimeEdit ( <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>  Constructs an empty datetime edit with parent <em>parent</em> and name
<em>name</em>.
<p> 
<h3 class=fn><a name="QDateTimeEdit-2"></a>QDateTimeEdit::QDateTimeEdit ( const&nbsp;<a href="qdatetime.html">QDateTime</a>&nbsp;&amp;&nbsp;datetime, <a href="qwidget.html">QWidget</a>&nbsp;*&nbsp;parent = 0, const&nbsp;char&nbsp;*&nbsp;name = 0 )
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Constructs a datetime edit with the initial value <em>datetime</em>, parent
<em>parent</em> and name <em>name</em>.
<p> 
<h3 class=fn><a name="~QDateTimeEdit"></a>QDateTimeEdit::~QDateTimeEdit ()
</h3> Destroys the object and frees any allocated resources.
<p> 
<h3 class=fn>bool <a name="autoAdvance"></a>QDateTimeEdit::autoAdvance () const
</h3> Returns TRUE if auto-advance is enabled, otherwise returns FALSE.
<p> <p>See also <a href="#setAutoAdvance">setAutoAdvance</a>().

<p> 
<h3 class=fn><a href="qdateedit.html">QDateEdit</a>&nbsp;* <a name="dateEdit"></a>QDateTimeEdit::dateEdit ()
</h3> 
Returns the internal widget used for editing the date part of the datetime.

<h3 class=fn><a href="qdatetime.html">QDateTime</a> <a name="dateTime"></a>QDateTimeEdit::dateTime () const
</h3><p>Returns the datetime value of the editor.
See the <a href="qdatetimeedit.html#dateTime-prop">"dateTime"</a> property for details.
<h3 class=fn>void <a name="setAutoAdvance"></a>QDateTimeEdit::setAutoAdvance ( bool&nbsp;advance )<tt> [virtual]</tt>
</h3> Sets the auto advance property of the editor to <em>advance</em>.  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> 
<h3 class=fn>void <a name="setDateTime"></a>QDateTimeEdit::setDateTime ( const&nbsp;<a href="qdatetime.html">QDateTime</a>&nbsp;&amp;&nbsp;dt )<tt> [virtual]</tt>
</h3><p>Sets the datetime value of the editor to <em>dt</em>.
See the <a href="qdatetimeedit.html#dateTime-prop">"dateTime"</a> property for details.
<h3 class=fn><a href="qtimeedit.html">QTimeEdit</a>&nbsp;* <a name="timeEdit"></a>QDateTimeEdit::timeEdit ()
</h3> 
Returns the internal widget used for editing the time part of the datetime.

<h3 class=fn>void <a name="valueChanged"></a>QDateTimeEdit::valueChanged ( const&nbsp;<a href="qdatetime.html">QDateTime</a>&nbsp;&amp;&nbsp;datetime )<tt> [signal]</tt>
</h3> 
<p> This signal is emitted every time the date or time changes.  The
<em>datetime</em> argument is the new datetime.

<hr><h2>Property Documentation</h2>
<h3 class=fn><a href="qdatetime.html">QDateTime</a> <a name="dateTime-prop"></a>dateTime</h3> <p>This property holds the datetime value of the editor.
<p>The datetime edit's datetime which may be an invalid
datetime.

<p>Set this property's value with <a href="#setDateTime">setDateTime</a>() and get this property's value with <a href="#dateTime">dateTime</a>().
<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<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; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>