⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qtimeedit.3qt

📁 linux下GUI编程工具qt的在线连接帮助手册
💻 3QT
字号:
'\" t.TH QTimeEdit 3qt "11 October 2001" "Trolltech AS" \" -*- nroff -*-.\" Copyright 1992-2001 Trolltech AS.  All rights reserved.  See the.\" license file included in the distribution for a complete license.\" statement..\".ad l.nh.SH NAMEQTimeEdit \- Time editor.PP\fC#include <qdatetimeedit.h>\fR.PP.SS "Public Members".in +1c.ti -1c.BI "\fBQTimeEdit\fR ( QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "\fBQTimeEdit\fR ( const QTime & time, QWidget * parent = 0, const char * name = 0 )".br.ti -1c.BI "\fB~QTimeEdit\fR ()".br.ti -1c.BI "virtual void \fBsetTime\fR ( const QTime & time )".br.ti -1c.BI "QTime \fBtime\fR () const".br.ti -1c.BI "virtual void \fBsetAutoAdvance\fR ( bool advance )".br.ti -1c.BI "bool \fBautoAdvance\fR () const".br.ti -1c.BI "virtual void \fBsetMinValue\fR ( const QTime & d )".br.ti -1c.BI "QTime \fBminValue\fR () const".br.ti -1c.BI "virtual void \fBsetMaxValue\fR ( const QTime & d )".br.ti -1c.BI "QTime \fBmaxValue\fR () const".br.ti -1c.BI "virtual void \fBsetRange\fR ( const QTime & min, const QTime & max )".br.ti -1c.BI "QString \fBseparator\fR () const".br.ti -1c.BI "virtual void \fBsetSeparator\fR ( const QString & s )".br.in -1c.SS "Signals".in +1c.ti -1c.BI "void \fBvalueChanged\fR ( const QTime & time )".br.in -1c.SS "Properties".in +1c.ti -1c.BI "bool \fBautoAdvance\fR - whether the editor automatically advances to the next section".br.ti -1c.BI "QTime \fBmaxValue\fR - the maximum time value".br.ti -1c.BI "QTime \fBminValue\fR - the minimum time value".br.ti -1c.BI "QTime \fBtime\fR - the time value of the editor".br.in -1c.SS "Protected Members".in +1c.ti -1c.BI "virtual QString \fBsectionFormattedText\fR ( int sec )".br.ti -1c.BI "virtual void \fBsetHour\fR ( int h )".br.ti -1c.BI "virtual void \fBsetMinute\fR ( int m )".br.ti -1c.BI "virtual void \fBsetSecond\fR ( int s )".br.in -1c.SS "Protected Slots".in +1c.ti -1c.BI "void \fBupdateButtons\fR ()".br.in -1c.SH DESCRIPTIONThe QTimeEdit class provides a time editor..PPQTimeEdit allows the user to edit times by using the keyboard or the arrow keys to increase/decrease time values. The arrow keys can be used to move from section to section within the QTimeEdit box. The user can automatically be moved to the next section once they complete a section using setAutoAdvance(). Times appear in hour, minute, second order. It is recommended that the QTimeEdit be initialised with a time, e.g..PP.nf.br    QTime timeNow = QTime::currentTime();.br    QTimeEdit *timeEdit = new QTimeEdit( timeNow, this );.br    timeEdit->setRange( timeNow, timeNow.addSecs( 60 * 60 ) );.br.fiHere we've created a QTimeEdit widget set to the current time. We've also set the minimum value to the current time and the maximum time to one hour from now..PPThe maximum and minimum values for a time value in the time editor default to the maximum and minimum values for a QTime. You can change this by calling setMinValue(), setMaxValue() or setRange()..PPTerminology: A QTimeWidget consists of three sections, one each for the hour, minute and second. You can change the separator character using setSeparator(), by default the separator is read from the system's settings..PPSee also QTime, QDateEdit, QDateTimeEdit, Advanced Widgets and Time and Date..PP.SH MEMBER FUNCTION DOCUMENTATION.SH "QTimeEdit::QTimeEdit ( QWidget * parent = 0, const char * name = 0 )"Constructs an empty time edit with parent \fIparent\fR and name \fIname\fR..SH "QTimeEdit::QTimeEdit ( const QTime & time, QWidget * parent = 0, const char * name = 0 )"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPConstructs a time edit with the initial time value, \fItime\fR, parent \fIparent\fR and name \fIname\fR..SH "QTimeEdit::~QTimeEdit ()"Destroys the object and frees any allocated resources..SH "bool QTimeEdit::autoAdvance () const"Returns TRUE if the editor automatically advances to the next section; otherwise returns FALSE. See the "autoAdvance" property for details..SH "QTime QTimeEdit::maxValue () const"Returns the maximum time value. See the "maxValue" property for details..SH "QTime QTimeEdit::minValue () const"Returns the minimum time value. See the "minValue" property for details..SH "QString QTimeEdit::sectionFormattedText ( int sec )\fC [virtual protected]\fR"Returns the formatted number for section \fIsec\fR. This will correspond to either the hour, minute or second section, depending on \fIsec\fR..SH "QString QTimeEdit::separator () const"Returns the separator for the editor..SH "void QTimeEdit::setAutoAdvance ( bool advance )\fC [virtual]\fR"Sets whether the editor automatically advances to the next section to \fIadvance\fR. See the "autoAdvance" property for details..SH "void QTimeEdit::setHour ( int h )\fC [virtual protected]\fR"Sets the hour to \fIh\fR, which must be a valid hour, i.e. in the range 0..24..SH "void QTimeEdit::setMaxValue ( const QTime & d )\fC [virtual]\fR"Sets the maximum time value to \fId\fR. See the "maxValue" property for details..SH "void QTimeEdit::setMinValue ( const QTime & d )\fC [virtual]\fR"Sets the minimum time value to \fId\fR. See the "minValue" property for details..SH "void QTimeEdit::setMinute ( int m )\fC [virtual protected]\fR"Sets the minute to \fIm\fR, which must be a valid minute, i.e. in the range 0..59..SH "void QTimeEdit::setRange ( const QTime & min, const QTime & max )\fC [virtual]\fR"Sets the valid input range for the editor to be from \fImin\fR to \fImax\fR inclusive. If \fImin\fR is invalid no minimum time is set. Similarly, if \fImax\fR is invalid no maximum time is set..SH "void QTimeEdit::setSecond ( int s )\fC [virtual protected]\fR"Sets the second to \fIs\fR, which must be a valid second, i.e. in the range 0..59..SH "void QTimeEdit::setSeparator ( const QString & s )\fC [virtual]\fR"Sets the separator to \fIs\fR. Note that currently only the first character of \fIs\fR is used..SH "void QTimeEdit::setTime ( const QTime & time )\fC [virtual]\fR"Sets the time value of the editor to \fItime\fR. See the "time" property for details..SH "QTime QTimeEdit::time () const"Returns the time value of the editor. See the "time" property for details..SH "void QTimeEdit::updateButtons ()\fC [protected slot]\fR"Enables/disables the push buttons according to the min/max time for this widget..SH "void QTimeEdit::valueChanged ( const QTime & time )\fC [signal]\fR"This signal is emitted whenever the editor's value changes. The \fItime\fR parameter is the new value..PP.SS "Property Documentation".SH "bool autoAdvance"This property holds whether the editor automatically advances to the next section..PPIf autoAdvance is TRUE, the editor will automatically advance focus to the next time section if a user has completed a section. The default is FALSE..PPSet this property's value with setAutoAdvance() and get this property's value with autoAdvance()..SH "QTime maxValue"This property holds the maximum time value..PPSetting the maximum time value is equivalent to calling QTimeEdit::setRange( minValue(), \fIt\fR ), where \fIt\fR is the maximum time. The default maximum time is 23:59:59..PPSet this property's value with setMaxValue() and get this property's value with maxValue()..SH "QTime minValue"This property holds the minimum time value..PPSetting the minimum time value is equivalent to calling QTimeEdit::setRange( \fIt\fR, maxValue() ), where \fIt\fR is the minimum time. The default minimum time is 00:00:00..PPSet this property's value with setMinValue() and get this property's value with minValue()..SH "QTime time"This property holds the time value of the editor..PPWhen changing the time property, if the time is less than minValue(), or is greater than maxValue(), nothing happens..PPSet this property's value with setTime() and get this property's value with time()..SH "SEE ALSO".BR http://doc.trolltech.com/qtimeedit.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf 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..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qtimeedit.3qt) and the Qtversion (3.0.0).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -