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
|
'\" t
.TH TQDateTimeEdit 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
TQDateTimeEdit \- Combines a TQDateEdit and TQTimeEdit widget into a single widget for editing datetimes
.SH SYNOPSIS
\fC#include <tqdatetimeedit.h>\fR
.PP
Inherits TQWidget.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBTQDateTimeEdit\fR ( TQWidget * parent = 0, const char * name = 0 )"
.br
.ti -1c
.BI "\fBTQDateTimeEdit\fR ( const TQDateTime & datetime, TQWidget * parent = 0, const char * name = 0 )"
.br
.ti -1c
.BI "\fB~TQDateTimeEdit\fR ()"
.br
.ti -1c
.BI "TQDateTime \fBdateTime\fR () const"
.br
.ti -1c
.BI "TQDateEdit * \fBdateEdit\fR ()"
.br
.ti -1c
.BI "TQTimeEdit * \fBtimeEdit\fR ()"
.br
.ti -1c
.BI "virtual void \fBsetAutoAdvance\fR ( bool advance )"
.br
.ti -1c
.BI "bool \fBautoAdvance\fR () const"
.br
.in -1c
.SS "Public Slots"
.in +1c
.ti -1c
.BI "virtual void \fBsetDateTime\fR ( const TQDateTime & dt )"
.br
.in -1c
.SS "Signals"
.in +1c
.ti -1c
.BI "void \fBvalueChanged\fR ( const TQDateTime & datetime )"
.br
.in -1c
.SS "Properties"
.in +1c
.ti -1c
.BI "TQDateTime \fBdateTime\fR - the editor's datetime value"
.br
.in -1c
.SH DESCRIPTION
The TQDateTimeEdit class combines a TQDateEdit and TQTimeEdit widget into a single widget for editing datetimes.
.PP
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 setAutoAdvance(). The datetime can be set with setDateTime().
.PP
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 TQDateEdit::setOrder() to change this. Times appear in the order hours, minutes, seconds using the 24 hour clock.
.PP
It is recommended that the TQDateTimeEdit is initialised with a datetime, e.g.
.PP
.nf
.br
TQDateTimeEdit *dateTimeEdit = new TQDateTimeEdit( TQDateTime::currentDateTime(), this );
.br
dateTimeEdit->dateEdit()->setRange( TQDateTime::currentDate(),
.br
TQDateTime::currentDate().addDays( 7 ) );
.br
.fi
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.
.PP
Terminology: A TQDateEdit widget consists of three 'sections', one each for the year, month and day. Similarly a TQTimeEdit 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.
.PP
<center>
.ce 1
.B "[Image Omitted]"
.PP
</center>
.PP
See also TQDateEdit, TQTimeEdit, Advanced Widgets, and Time and Date.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "TQDateTimeEdit::TQDateTimeEdit ( TQWidget * parent = 0, const char * name = 0 )"
Constructs an empty datetime edit with parent \fIparent\fR and called \fIname\fR.
.SH "TQDateTimeEdit::TQDateTimeEdit ( const TQDateTime & datetime, TQWidget * parent = 0, const char * name = 0 )"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Constructs a datetime edit with the initial value \fIdatetime\fR, parent \fIparent\fR and called \fIname\fR.
.SH "TQDateTimeEdit::~TQDateTimeEdit ()"
Destroys the object and frees any allocated resources.
.SH "bool TQDateTimeEdit::autoAdvance () const"
Returns TRUE if auto-advance is enabled, otherwise returns FALSE.
.PP
See also setAutoAdvance().
.SH "TQDateEdit * TQDateTimeEdit::dateEdit ()"
Returns the internal widget used for editing the date part of the datetime.
.SH "TQDateTime TQDateTimeEdit::dateTime () const"
Returns the editor's datetime value. See the "dateTime" property for details.
.SH "void TQDateTimeEdit::setAutoAdvance ( bool advance )\fC [virtual]\fR"
Sets the auto advance property of the editor to \fIadvance\fR. If set to TRUE, the editor will automatically advance focus to the next date or time section if the user has completed a section.
.SH "void TQDateTimeEdit::setDateTime ( const TQDateTime & dt )\fC [virtual slot]\fR"
Sets the editor's datetime value to \fIdt\fR. See the "dateTime" property for details.
.SH "TQTimeEdit * TQDateTimeEdit::timeEdit ()"
Returns the internal widget used for editing the time part of the datetime.
.SH "void TQDateTimeEdit::valueChanged ( const TQDateTime & datetime )\fC [signal]\fR"
This signal is emitted every time the date or time changes. The \fIdatetime\fR argument is the new datetime.
.SS "Property Documentation"
.SH "TQDateTime dateTime"
This property holds the editor's datetime value.
.PP
The datetime edit's datetime which may be an invalid datetime.
.PP
Set this property's value with setDateTime() and get this property's value with dateTime().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/tqdatetimeedit.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $TQTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR [email protected] .
Please include the name of the manual page (tqdatetimeedit.3qt) and the Qt
version (3.3.8).
|