kalarm/lib
DateEdit Class Reference
Date edit widget with range limits. More...
#include <dateedit.h>

Public Member Functions | |
DateEdit (QWidget *parent=0, const char *name=0) | |
bool | isValid () const |
const QDate & | minDate () const |
const QDate & | maxDate () const |
void | setMinDate (const QDate &date, const QString &errorDate=QString::null) |
void | setMaxDate (const QDate &date, const QString &errorDate=QString::null) |
void | setInvalid () |
Protected Member Functions | |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | mouseMoveEvent (QMouseEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | keyReleaseEvent (QKeyEvent *) |
Detailed Description
Date edit widget with range limits.The DateEdit class provides a date editor with the ability to set limits on the dates which can be entered.
Minimum and/or maximum permissible dates may be set, together with corresponding error messages. If the user tries to enter a date outside the allowed range, the appropriate error message (if any) is output using KMessageBox::sorry().
Definition at line 37 of file dateedit.h.
Constructor & Destructor Documentation
DateEdit::DateEdit | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) | [explicit] |
Constructor.
- Parameters:
-
parent The parent object of this widget. name The name of this widget.
Definition at line 28 of file dateedit.cpp.
Member Function Documentation
bool DateEdit::isValid | ( | ) | const [inline] |
const QDate& DateEdit::maxDate | ( | ) | const [inline] |
Returns the latest date which can be entered.
If there is no maximum date, returns an invalid date.
Definition at line 55 of file dateedit.h.
const QDate& DateEdit::minDate | ( | ) | const [inline] |
Returns the earliest date which can be entered.
If there is no minimum date, returns an invalid date.
Definition at line 51 of file dateedit.h.
void DateEdit::setInvalid | ( | ) |
void DateEdit::setMaxDate | ( | const QDate & | date, | |
const QString & | errorDate = QString::null | |||
) |
Sets the latest date which can be entered.
- Parameters:
-
date Latest date allowed. If invalid, any maximum limit is removed. errorDate Error message to be displayed when a date later than date
is entered. Set to QString::null to use the default error message.
Definition at line 42 of file dateedit.cpp.
void DateEdit::setMinDate | ( | const QDate & | date, | |
const QString & | errorDate = QString::null | |||
) |
Sets the earliest date which can be entered.
- Parameters:
-
date Earliest date allowed. If invalid, any minimum limit is removed. errorDate Error message to be displayed when a date earlier than date
is entered. Set to QString::null to use the default error message.
Definition at line 34 of file dateedit.cpp.
The documentation for this class was generated from the following files: