Q3TimeEdit Class ReferenceThe Q3TimeEdit class provides a time editor. Далее... #include <Q3TimeEdit> Данный класс является частью библиотеки поддержки Qt 3. Он предоставлен для поддержки ранее написанного кода. Мы настоятельно не рекомендуем использовать этот класс в новом коде. Для получения дополнительной информации смотрите Портирование на Qt 4. Inherits: Q3DateTimeEditBase. Открытые типы
Свойства
Открытые функции
Переопределённые открытые функции
Открытые слоты
Сигналы
Защищенные функции
Переопределённые защищённые функции
Дополнительные унаследованные члены
Подробное описаниеThe Q3TimeEdit class provides a time editor. Q3TimeEdit 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 Q3TimeEdit 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 Q3TimeEdit is initialised with a time, e.g. QTime timeNow = QTime::currentTime(); Q3TimeEdit *timeEdit = new Q3TimeEdit(timeNow, this); timeEdit->setRange(timeNow, timeNow.addSecs(60 * 60)); Here we've created a Q3TimeEdit 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. The 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(). Terminology: 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. See also QTime, Q3DateEdit, and Q3DateTimeEdit. Описание типов-членовenum Q3TimeEdit::DisplayThis enum defines the sections that comprise a time
The values can be or'ed together to show any combination. Описание свойствautoAdvance : boolThis property holds whether the editor automatically advances to the next section. If autoAdvance is true, the editor will automatically advance focus to the next time section if a user has completed a section. По умолчанию равно false. Функции доступа:
display : DisplayThis property holds the sections that are displayed in the time edit. The value can be any combination of the values in the Display enum. By default, the widget displays hours, minutes and seconds. Функции доступа:
maxValue : QTimeThis property holds the maximum time value. Setting the maximum time value is equivalent to calling Q3TimeEdit::setRange(minValue(), t), where t is the maximum time. The default maximum time is 23:59:59. Функции доступа:
See also minValue and setRange(). minValue : QTimeThis property holds the minimum time value. Setting the minimum time value is equivalent to calling Q3TimeEdit::setRange(t, maxValue()), where t is the minimum time. The default minimum time is 00:00:00. Функции доступа:
See also maxValue and setRange(). time : QTimeThis property holds the editor's time value. When changing the time property, if the time is less than minValue(), or is greater than maxValue(), nothing happens. Функции доступа:
Описание функций-членовQ3TimeEdit::Q3TimeEdit ( QWidget * parent = 0, const char * name = 0 )Constructs an empty time edit with parent parent and called name. Q3TimeEdit::Q3TimeEdit ( const QTime & time, QWidget * parent = 0, const char * name = 0 )Это перегруженная функция. Constructs a time edit with the initial time value, time, parent parent and called name. Q3TimeEdit::~Q3TimeEdit ()Удаляет объект и освобождает все выделенные ему ресурсы. bool Q3TimeEdit::event ( QEvent * e ) [virtual protected]Переопределено от QObject::event(). QSize Q3TimeEdit::minimumSizeHint () const [virtual]Переопределено от QWidget::minimumSizeHint(). void Q3TimeEdit::resizeEvent ( QResizeEvent * ) [virtual protected]Переопределено от QWidget::resizeEvent(). QString Q3TimeEdit::sectionFormattedText ( int sec ) [virtual protected]Returns the formatted number for section sec. This will correspond to either the hour, minute or second section, depending on sec. QString Q3TimeEdit::separator () constReturns the editor's separator. Смотрите также setSeparator(). void Q3TimeEdit::setHour ( int h ) [virtual protected]Sets the hour to h, which must be a valid hour, i.e. in the range 0..24. void Q3TimeEdit::setMinute ( int m ) [virtual protected]Sets the minute to m, which must be a valid minute, i.e. in the range 0..59. void Q3TimeEdit::setRange ( const QTime & min, const QTime & max ) [virtual]Sets the valid input range for the editor to be from min to max inclusive. If min is invalid no minimum time is set. Similarly, if max is invalid no maximum time is set. void Q3TimeEdit::setSecond ( int s ) [virtual protected]Sets the second to s, which must be a valid second, i.e. in the range 0..59. void Q3TimeEdit::setSeparator ( const QString & s ) [virtual]Sets the separator to s. Note that currently only the first character of s is used. Смотрите также separator(). QSize Q3TimeEdit::sizeHint () const [virtual]Переопределено от QWidget::sizeHint(). void Q3TimeEdit::timerEvent ( QTimerEvent * e ) [virtual protected]Переопределено из QObject::timerEvent(). void Q3TimeEdit::valueChanged ( const QTime & time ) [signal]This signal is emitted whenever the editor's value changes. The time parameter is the new value. |
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |