Eneboo - Documentación para desarrolladores
Slots públicos | Señales | Métodos públicos | Slots protegidos | Métodos protegidos | Propiedades
Referencia de la Clase QDateTimeEdit

The QDateTimeEdit class combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes. Más...

#include <qdatetimeedit.h>

Diagrama de herencias de QDateTimeEdit
QWidget QWidget QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject QPaintDevice QObject

Lista de todos los miembros.

Slots públicos

virtual void setDateTime (const QDateTime &dt)
virtual void setDateTime (const QDateTime &dt)

Señales

void valueChanged (const QDateTime &datetime)
void valueChanged (const QDateTime &datetime)

Métodos públicos

 QDateTimeEdit (QWidget *parent=0, const char *name=0)
 QDateTimeEdit (const QDateTime &datetime, QWidget *parent=0, const char *name=0)
 ~QDateTimeEdit ()
QSize sizeHint () const
QSize minimumSizeHint () const
QDateTime dateTime () const
QDateEditdateEdit ()
QTimeEdittimeEdit ()
virtual void setAutoAdvance (bool advance)
bool autoAdvance () const
 QDateTimeEdit (QWidget *parent=0, const char *name=0)
 QDateTimeEdit (const QDateTime &datetime, QWidget *parent=0, const char *name=0)
 ~QDateTimeEdit ()
QSize sizeHint () const
QSize minimumSizeHint () const
QDateTime dateTime () const
QDateEditdateEdit ()
QTimeEdittimeEdit ()
virtual void setAutoAdvance (bool advance)
bool autoAdvance () const

Slots protegidos

void newValue (const QDate &d)
void newValue (const QTime &t)
void newValue (const QDate &d)
void newValue (const QTime &t)

Métodos protegidos

void init ()
void resizeEvent (QResizeEvent *)
void init ()
void resizeEvent (QResizeEvent *)

Propiedades

QDateTime dateTime
 the editor's datetime value

Descripción detallada

The QDateTimeEdit class combines a QDateEdit and QTimeEdit widget into a single widget for editing datetimes.

QDateTimeEdit consists of a QDateEdit and QTimeEdit 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 QDateTimeEdit 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 QDateEdit::setOrder() to change this. Times appear in the order hours, minutes, seconds using the 24 hour clock.

It is recommended that the QDateTimeEdit is initialised with a datetime, e.g.

    QDateTimeEdit *dateTimeEdit = new QDateTimeEdit( QDateTime::currentDateTime(), this );
    dateTimeEdit->dateEdit()->setRange( QDateTime::currentDate(),
                                        QDateTime::currentDate().addDays( 7 ) );

Here we've created a new QDateTimeEdit 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 QDateEdit widget consists of three 'sections', one each for the year, month and day. Similarly a QTimeEdit 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.

datetimewidgets.png Date Time Widgets

Ver también:
QDateEdit QTimeEdit

Documentación del constructor y destructor

QDateTimeEdit::QDateTimeEdit ( QWidget parent = 0,
const char *  name = 0 
)

Constructs an empty datetime edit with parent parent and called name.

QDateTimeEdit::QDateTimeEdit ( const QDateTime datetime,
QWidget parent = 0,
const char *  name = 0 
)

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Constructs a datetime edit with the initial value datetime, parent parent and called name.

QDateTimeEdit::~QDateTimeEdit ( )

Destroys the object and frees any allocated resources.

QDateTimeEdit::QDateTimeEdit ( QWidget parent = 0,
const char *  name = 0 
)
QDateTimeEdit::QDateTimeEdit ( const QDateTime datetime,
QWidget parent = 0,
const char *  name = 0 
)
QDateTimeEdit::~QDateTimeEdit ( )

Documentación de las funciones miembro

bool QDateTimeEdit::autoAdvance ( ) const

Returns TRUE if auto-advance is enabled, otherwise returns FALSE.

Ver también:
setAutoAdvance()
bool QDateTimeEdit::autoAdvance ( ) const
QDateEdit* QDateTimeEdit::dateEdit ( ) [inline]
QDateEdit * QDateTimeEdit::dateEdit ( ) [inline]

Returns the internal widget used for editing the date part of the datetime.

QDateTime QDateTimeEdit::dateTime ( ) const
QDateTime QDateTimeEdit::dateTime ( ) const
void QDateTimeEdit::init ( ) [protected]
void QDateTimeEdit::init ( ) [protected]
QSize QDateTimeEdit::minimumSizeHint ( ) const [virtual]

Reimplementado de QWidget.

QSize QDateTimeEdit::minimumSizeHint ( ) const [virtual]

Reimplementado de QWidget.

void QDateTimeEdit::newValue ( const QTime t) [protected, slot]
void QDateTimeEdit::newValue ( const QDate d) [protected, slot]
void QDateTimeEdit::newValue ( const QTime t) [protected, slot]
void QDateTimeEdit::newValue ( const QDate d) [protected, slot]
void QDateTimeEdit::resizeEvent ( QResizeEvent ) [protected, virtual]

Intercepts and handles resize events which have special meaning for the QDateTimeEdit.

Reimplementado de QWidget.

void QDateTimeEdit::resizeEvent ( QResizeEvent ) [protected, virtual]

This event handler can be reimplemented in a subclass to receive widget resize events. When resizeEvent() is called, the widget already has its new geometry. The old size is accessible through QResizeEvent::oldSize().

The widget will be erased and receive a paint event immediately after processing the resize event. No drawing need be (or should be) done inside this handler.

Widgets that have been created with the WNoAutoErase flag will not be erased. Nevertheless, they will receive a paint event for their entire area afterwards. Again, no drawing needs to be done inside this handler.

The default implementation calls updateMask() if the widget has automatic masking enabled.

Ver también:
moveEvent(), event(), resize(), QResizeEvent, paintEvent()

Reimplementado de QWidget.

void QDateTimeEdit::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.

virtual void QDateTimeEdit::setAutoAdvance ( bool  advance) [virtual]
virtual void QDateTimeEdit::setDateTime ( const QDateTime dt) [virtual, slot]
void QDateTimeEdit::setDateTime ( const QDateTime dt) [virtual, slot]
QSize QDateTimeEdit::sizeHint ( ) const [virtual]

Reimplementado de QWidget.

QSize QDateTimeEdit::sizeHint ( ) const [virtual]

Reimplementado de QWidget.

QTimeEdit* QDateTimeEdit::timeEdit ( ) [inline]
QTimeEdit * QDateTimeEdit::timeEdit ( ) [inline]

Returns the internal widget used for editing the time part of the datetime.

void QDateTimeEdit::valueChanged ( const QDateTime datetime) [signal]

This signal is emitted every time the date or time changes. The datetime argument is the new datetime.

void QDateTimeEdit::valueChanged ( const QDateTime datetime) [signal]

Documentación de propiedades

QDateTime QDateTimeEdit::dateTime [read, write]

the editor's datetime value

The datetime edit's datetime which may be an invalid datetime.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'