Q3DateTimeEdit Class Reference [Qt3Support module]
The Q3DateTimeEdit class combines a Q3DateEdit and Q3TimeEdit widget into a single widget for editing datetimes. Далее...
#include <Q3DateTimeEdit> This class is part of the Qt 3 support library. It is provided to keep old source code working. Мы настоятельно не рекомендуем использовать этот класс в новом коде. See Porting to Qt 4 for more information.
Унаследован от QWidget.
Свойства
- 57 свойств, унаследованных от QWidget
- 1 свойство, унаследованное от QObject
Открытые функции
- 207 открытых функций, унаследованных от QWidget
- 29 открытых функций, унаследованных от QObject
- 12 открытых функций, унаследованных от QPaintDevice
Открытые слоты
- 19 открытых слотов, унаследованных от QWidget
- 1 открытый слот, унаследованный от QObject
Сигналы
- 1 сигнал, унаследованный от QWidget
- 1 сигнал, унаследованный от QObject
Дополнительные унаследованные члены
- 4 статических открытых члена, унаследованных от QWidget
- 5 статических открытых членов, унаследованных от QObject
- 37 защищенных функций, унаследованных от QWidget
- 7 защищенных функций, унаследованных от QObject
- 1 защищённая функция, унаследованная от QPaintDevice
- 1 защищенный слот, унаследованный от QWidget
Подробное описание
The Q3DateTimeEdit class combines a Q3DateEdit and Q3TimeEdit widget into a single widget for editing datetimes.
Q3DateTimeEdit consists of a Q3DateEdit and Q3TimeEdit 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 setAutoAdvance(). The datetime can be set with setDateTime().
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 Q3DateEdit::setOrder() to change this. Times appear in the order hours, minutes, seconds using the 24 hour clock.
It is recommended that the Q3DateTimeEdit is initialised with a datetime, e.g.
Q3DateTimeEdit *dateTimeEdit = new Q3DateTimeEdit(QDateTime::currentDateTime(), this);
dateTimeEdit->dateEdit()->setRange(QDateTime::currentDate(),
QDateTime::currentDate().addDays(7));
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.
Terminology: A Q3DateEdit widget consists of three 'sections', one each for the year, month and day. Similarly a Q3TimeEdit 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.
See also Q3DateEdit and Q3TimeEdit.
Описание свойств
This property holds the editor's datetime value.
The datetime edit's datetime which may be an invalid datetime.
Функции доступа:
- QDateTime dateTime () const
- virtual void setDateTime ( const QDateTime & dt )
Описание функций-членов
Q3DateTimeEdit::Q3DateTimeEdit ( QWidget * parent = 0, const char * name = 0 )
Constructs an empty datetime edit with parent parent and called name.
Q3DateTimeEdit::Q3DateTimeEdit ( const QDateTime & datetime, QWidget * parent = 0, const char * name = 0 )
Это перегруженная функция.
Constructs a datetime edit with the initial value datetime, parent parent and called name.
Q3DateTimeEdit::~Q3DateTimeEdit ()
Удаляет объект и освобождает все выделенные ему ресурсы.
bool Q3DateTimeEdit::autoAdvance () const
Returns true if auto-advance is enabled, otherwise returns false.
See also setAutoAdvance().
Q3DateEdit * Q3DateTimeEdit::dateEdit ()
Returns the internal widget used for editing the date part of the datetime.
void Q3DateTimeEdit::setAutoAdvance ( bool advance ) [virtual]
Sets the auto advance property of the editor to advance. If set to true, the editor will automatically advance focus to the next date or time section if the user has completed a section.
See also autoAdvance().
Q3TimeEdit * Q3DateTimeEdit::timeEdit ()
Returns the internal widget used for editing the time part of the datetime.
void Q3DateTimeEdit::valueChanged ( const QDateTime & datetime ) [signal]
This signal is emitted every time the date or time changes. The datetime argument is the new datetime.
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) |
Торговые марки |
Qt 4.5.3 |
|