#include <dateedit.h>
Public Member Functions | |
DateEdit (TQWidget *parent=0, const char *name=0) | |
bool | isValid () const |
const TQDate & | minDate () const |
const TQDate & | maxDate () const |
void | setMinDate (const TQDate &date, const TQString &errorDate=TQString()) |
void | setMaxDate (const TQDate &date, const TQString &errorDate=TQString()) |
void | setInvalid () |
Public Member Functions inherited from KDateEdit | |
TQDate | date () const |
void | setReadOnly (bool readOnly) |
bool | isReadOnly () const |
Protected Member Functions | |
virtual void | mousePressEvent (TQMouseEvent *) |
virtual void | mouseReleaseEvent (TQMouseEvent *) |
virtual void | mouseMoveEvent (TQMouseEvent *) |
virtual void | keyPressEvent (TQKeyEvent *) |
virtual void | keyReleaseEvent (TQKeyEvent *) |
Protected Member Functions inherited from KDateEdit | |
virtual bool | assignDate (const TQDate &date) |
void | setupKeywords () |
Additional Inherited Members | |
Public Slots inherited from KDateEdit | |
void | setDate (const TQDate &date) |
Signals inherited from KDateEdit | |
void | dateEntered (const TQDate &date) |
void | dateChanged (const TQDate &date) |
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()
|
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
◆ isValid()
|
inline |
Returns true if the widget contains a valid date.
Definition at line 48 of file dateedit.h.
◆ maxDate()
|
inline |
Returns the latest date which can be entered.
If there is no maximum date, returns an invalid date.
Definition at line 56 of file dateedit.h.
◆ minDate()
|
inline |
Returns the earliest date which can be entered.
If there is no minimum date, returns an invalid date.
Definition at line 52 of file dateedit.h.
◆ setInvalid()
void DateEdit::setInvalid | ( | ) |
Sets the date held in the widget to an invalid date.
Definition at line 50 of file dateedit.cpp.
◆ setMaxDate()
void DateEdit::setMaxDate | ( | const TQDate & | date, |
const TQString & | errorDate = TQString() |
||
) |
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 TQString() to use the default error message.
Definition at line 42 of file dateedit.cpp.
◆ setMinDate()
void DateEdit::setMinDate | ( | const TQDate & | date, |
const TQString & | errorDate = TQString() |
||
) |
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 TQString() 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: