Documents > BPS V2 C++ API
BpsDateTimeEdit Class Reference

A date/time editor based on QineEdit, with a button to drop down a calendar widget for date selection. More...

#include <bpsdatetimeedit.h>

List of all members.

Public Slots

void setDate (const QDate &aDate)
 Set the current date.
void setDateTime (const QDateTime &aDateTime)
 Set the current date/time.

Signals

void dateChanged (const QDate &aDate)
 This signal is emitted when the date is modified.
void dateTimeChanged (const QDateTime &aDateTime)
 This signal is emitted when the date/time is modified.

Public Member Functions

 BpsDateTimeEdit (QWidget *aParent=0)
 BpsDateTimeEdit (bool aCalendar, QWidget *aParent=0)
QDate date () const
QDateTime dateTime () const
QString displayFormat () const
void setDisplayFormat (const QString &aFormat)
 Set the display format as defined for QDateTimeEdit.
void setMaximumDateTime (const QDateTime &aDateTime)
 Set the maximum date/time.
void setMinimumDateTime (const QDateTime &aDateTime)
 Set the minimum date/time.

Detailed Description

A date/time editor based on QineEdit, with a button to drop down a calendar widget for date selection.

Compared to QDateTimeEdit, this widget will also allow NULL values to be entered.


Constructor & Destructor Documentation

BpsDateTimeEdit::BpsDateTimeEdit ( QWidget *  aParent = 0)
Parameters:
[in]aParentThe parent widget.
BpsDateTimeEdit::BpsDateTimeEdit ( bool  aCalendar,
QWidget *  aParent = 0 
)
Parameters:
[in]aCalendarTrue to display the calendar button, false to hide it.
[in]aParentThe parent widget.

Member Function Documentation

QDate BpsDateTimeEdit::date ( ) const
Returns:
The current date.
void BpsDateTimeEdit::dateChanged ( const QDate &  aDate) [signal]

This signal is emitted when the date is modified.

Parameters:
[in]aDateThe new date.
QDateTime BpsDateTimeEdit::dateTime ( ) const
Returns:
The current date/time.
void BpsDateTimeEdit::dateTimeChanged ( const QDateTime &  aDateTime) [signal]

This signal is emitted when the date/time is modified.

Parameters:
[in]aDateTimeThe new date/time.
QString BpsDateTimeEdit::displayFormat ( ) const
Returns:
The current display format.
void BpsDateTimeEdit::setDate ( const QDate &  aDate) [slot]

Set the current date.

Parameters:
[in]aDateThe new date to set.
void BpsDateTimeEdit::setDateTime ( const QDateTime &  aDateTime) [slot]

Set the current date/time.

Parameters:
[in]aDateTimeThe new date/time to set.
void BpsDateTimeEdit::setDisplayFormat ( const QString &  aFormat)

Set the display format as defined for QDateTimeEdit.

The default display format is "dd.MM.yyyy HH:mm:ss".

Parameters:
[in]aFormatThe display format.
void BpsDateTimeEdit::setMaximumDateTime ( const QDateTime &  aDateTime)

Set the maximum date/time.

When setting this property the minimum date/time is adjusted if necessary to ensure that the range remains valid. If the date/time is not a valid QDateTime object, this function does nothing.

By default, the maximum date/time is 31 December, 7999 at 23:59:59 and 999 milliseconds.

Parameters:
[in]aDateTimeThe new maximum date/time.
void BpsDateTimeEdit::setMinimumDateTime ( const QDateTime &  aDateTime)

Set the minimum date/time.

When setting this property the maximum date/time is adjusted if necessary to ensure that the range remains valid. If the date/time is not a valid QDateTime object, this function does nothing.

By default, the minimum date/time is 14 September, 1752 at 00:00:00 and 000 milliseconds.

Parameters:
[in]aDateTimeThe new minimum date/time.

The documentation for this class was generated from the following file: