You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
169 lines
8.5 KiB
169 lines
8.5 KiB
13 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||
|
<title>TQDateTimeEdit Class</title>
|
||
|
<style type="text/css"><!--
|
||
|
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 Classes</font></a>
|
||
|
| <a href="mainclasses.html">
|
||
|
<font color="#004faf">Main Classes</font></a>
|
||
|
| <a href="annotated.html">
|
||
|
<font color="#004faf">Annotated</font></a>
|
||
|
| <a href="groups.html">
|
||
|
<font color="#004faf">Grouped 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>TQDateTimeEdit Class Reference</h1>
|
||
|
|
||
|
<p>The TQDateTimeEdit class combines a TQDateEdit and TQTimeEdit
|
||
|
widget into a single widget for editing datetimes.
|
||
|
<a href="#details">More...</a>
|
||
6 months ago
|
<p><tt>#include <<a href="tqdatetimeedit-h.html">tqdatetimeedit.h</a>></tt>
|
||
6 months ago
|
<p>Inherits <a href="tqwidget.html">TQWidget</a>.
|
||
6 months ago
|
<p><a href="tqdatetimeedit-members.html">List of all member functions.</a>
|
||
13 years ago
|
<h2>Public Members</h2>
|
||
|
<ul>
|
||
|
<li class=fn><a href="#TQDateTimeEdit"><b>TQDateTimeEdit</b></a> ( TQWidget * parent = 0, const char * name = 0 )</li>
|
||
|
<li class=fn><a href="#TQDateTimeEdit-2"><b>TQDateTimeEdit</b></a> ( const TQDateTime & datetime, TQWidget * parent = 0, const char * name = 0 )</li>
|
||
|
<li class=fn><a href="#~TQDateTimeEdit"><b>~TQDateTimeEdit</b></a> ()</li>
|
||
|
<li class=fn>TQDateTime <a href="#dateTime"><b>dateTime</b></a> () const</li>
|
||
|
<li class=fn>TQDateEdit * <a href="#dateEdit"><b>dateEdit</b></a> ()</li>
|
||
|
<li class=fn>TQTimeEdit * <a href="#timeEdit"><b>timeEdit</b></a> ()</li>
|
||
|
<li class=fn>virtual void <a href="#setAutoAdvance"><b>setAutoAdvance</b></a> ( bool advance )</li>
|
||
|
<li class=fn>bool <a href="#autoAdvance"><b>autoAdvance</b></a> () const</li>
|
||
|
</ul>
|
||
|
<h2>Public Slots</h2>
|
||
|
<ul>
|
||
|
<li class=fn>virtual void <a href="#setDateTime"><b>setDateTime</b></a> ( const TQDateTime & dt )</li>
|
||
|
</ul>
|
||
|
<h2>Signals</h2>
|
||
|
<ul>
|
||
|
<li class=fn>void <a href="#valueChanged"><b>valueChanged</b></a> ( const TQDateTime & datetime )</li>
|
||
|
</ul>
|
||
|
<h2>Properties</h2>
|
||
|
<ul>
|
||
|
<li class=fn>TQDateTime <a href="#dateTime-prop"><b>dateTime</b></a> - the editor's datetime value</li>
|
||
|
</ul>
|
||
|
<hr><a name="details"></a><h2>Detailed Description</h2>
|
||
|
|
||
|
|
||
6 months ago
|
The TQDateTimeEdit class combines a <a href="tqdateedit.html">TQDateEdit</a> and <a href="tqtimeedit.html">TQTimeEdit</a>
|
||
13 years ago
|
widget into a single widget for editing datetimes.
|
||
|
<p>
|
||
|
|
||
|
|
||
|
<p> TQDateTimeEdit consists of a TQDateEdit and TQTimeEdit 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 TQDateTimeEdit 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 date format is read from the system's locale settings. It is
|
||
|
set to year, month, day order if that is not possible. See
|
||
6 months ago
|
<a href="tqdateedit.html#setOrder">TQDateEdit::setOrder</a>() to change this. Times appear in the order
|
||
13 years ago
|
hours, minutes, seconds using the 24 hour clock.
|
||
|
<p> It is recommended that the TQDateTimeEdit is initialised with a
|
||
|
datetime, e.g.
|
||
|
<pre>
|
||
6 months ago
|
TQDateTimeEdit *dateTimeEdit = new TQDateTimeEdit( TQDateTime::<a href="tqdatetime.html#currentDateTime">currentDateTime</a>(), this );
|
||
13 years ago
|
dateTimeEdit-><a href="#dateEdit">dateEdit</a>()->setRange( TQDateTime::currentDate(),
|
||
|
TQDateTime::currentDate().addDays( 7 ) );
|
||
|
</pre>
|
||
|
|
||
|
Here we've created a new TQDateTimeEdit 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.
|
||
6 months ago
|
<p> Terminology: A <a href="tqdateedit.html">TQDateEdit</a> widget consists of three 'sections', one
|
||
|
each for the year, month and day. Similarly a <a href="tqtimeedit.html">TQTimeEdit</a> consists
|
||
13 years ago
|
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>
|
||
6 months ago
|
<p> <p>See also <a href="tqdateedit.html">TQDateEdit</a>, <a href="tqtimeedit.html">TQTimeEdit</a>, <a href="advanced.html">Advanced Widgets</a>, and <a href="time.html">Time and Date</a>.
|
||
13 years ago
|
|
||
|
<hr><h2>Member Function Documentation</h2>
|
||
6 months ago
|
<h3 class=fn><a name="TQDateTimeEdit"></a>TQDateTimeEdit::TQDateTimeEdit ( <a href="tqwidget.html">TQWidget</a> * parent = 0, const char * name = 0 )
|
||
13 years ago
|
</h3>
|
||
|
Constructs an empty datetime edit with parent <em>parent</em> and called
|
||
|
<em>name</em>.
|
||
|
|
||
6 months ago
|
<h3 class=fn><a name="TQDateTimeEdit-2"></a>TQDateTimeEdit::TQDateTimeEdit ( const <a href="tqdatetime.html">TQDateTime</a> & datetime, <a href="tqwidget.html">TQWidget</a> * parent = 0, const char * name = 0 )
|
||
13 years ago
|
</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 called <em>name</em>.
|
||
|
|
||
|
<h3 class=fn><a name="~TQDateTimeEdit"></a>TQDateTimeEdit::~TQDateTimeEdit ()
|
||
|
</h3>
|
||
|
Destroys the object and frees any allocated resources.
|
||
|
|
||
|
<h3 class=fn>bool <a name="autoAdvance"></a>TQDateTimeEdit::autoAdvance () const
|
||
|
</h3>
|
||
|
Returns TRUE if auto-advance is enabled, otherwise returns FALSE.
|
||
|
<p> <p>See also <a href="#setAutoAdvance">setAutoAdvance</a>().
|
||
|
|
||
6 months ago
|
<h3 class=fn><a href="tqdateedit.html">TQDateEdit</a> * <a name="dateEdit"></a>TQDateTimeEdit::dateEdit ()
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Returns the internal widget used for editing the date part of the
|
||
|
datetime.
|
||
|
|
||
6 months ago
|
<h3 class=fn><a href="tqdatetime.html">TQDateTime</a> <a name="dateTime"></a>TQDateTimeEdit::dateTime () const
|
||
13 years ago
|
</h3><p>Returns the editor's datetime value.
|
||
6 months ago
|
See the <a href="tqdatetimeedit.html#dateTime-prop">"dateTime"</a> property for details.
|
||
13 years ago
|
<h3 class=fn>void <a name="setAutoAdvance"></a>TQDateTimeEdit::setAutoAdvance ( bool 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.
|
||
|
|
||
6 months ago
|
<h3 class=fn>void <a name="setDateTime"></a>TQDateTimeEdit::setDateTime ( const <a href="tqdatetime.html">TQDateTime</a> & dt )<tt> [virtual slot]</tt>
|
||
13 years ago
|
</h3><p>Sets the editor's datetime value to <em>dt</em>.
|
||
6 months ago
|
See the <a href="tqdatetimeedit.html#dateTime-prop">"dateTime"</a> property for details.
|
||
|
<h3 class=fn><a href="tqtimeedit.html">TQTimeEdit</a> * <a name="timeEdit"></a>TQDateTimeEdit::timeEdit ()
|
||
13 years ago
|
</h3>
|
||
|
|
||
|
<p> Returns the internal widget used for editing the time part of the
|
||
|
datetime.
|
||
|
|
||
6 months ago
|
<h3 class=fn>void <a name="valueChanged"></a>TQDateTimeEdit::valueChanged ( const <a href="tqdatetime.html">TQDateTime</a> & datetime )<tt> [signal]</tt>
|
||
13 years ago
|
</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>
|
||
6 months ago
|
<h3 class=fn><a href="tqdatetime.html">TQDateTime</a> <a name="dateTime-prop"></a>dateTime</h3>
|
||
13 years ago
|
<p>This property holds the editor's datetime value.
|
||
|
<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">TQt toolkit</a>.
|
||
|
Copyright © 1995-2007
|
||
|
<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 © 2007
|
||
|
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
||
|
<td align=right><div align=right>TQt 3.3.8</div>
|
||
|
</table></div></address></body>
|
||
|
</html>
|