KDE PIM / Developers / API Docs / kalarm

DateEdit Class Reference

The DateEdit class provides a date editor with the ability to set limits on the dates which can be entered. Date edit widget with range limits. More...

#include <dateedit.h>

Inherits KDateEdit.

List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

The DateEdit class provides a date editor with the ability to set limits on the dates which can be entered. Date edit widget with range limits.

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().

Author:
David Jarvie <software@astrojar.org.uk>


Constructor & Destructor Documentation

DateEdit::DateEdit QWidget *  parent = 0,
const char *  name = 0
 

Constructor.

Parameters:
parent The parent object of this widget.
name The name of this widget.

Member Function Documentation

bool DateEdit::isValid  )  const [inline]
 

Returns true if the widget contains a valid date.

const QDate& DateEdit::minDate  )  const [inline]
 

Returns the earliest date which can be entered.

If there is no minimum date, returns an invalid date.

const QDate& DateEdit::maxDate  )  const [inline]
 

Returns the latest date which can be entered.

If there is no maximum date, returns an invalid date.

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.

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.

void DateEdit::setInvalid  ) 
 

Sets the date held in the widget to an invalid date.

bool DateEdit::assignDate const QDate &  date  )  [protected, virtual]
 

Checks whether date lies within the allowed range of values.

If so, sets the new value. If not, an error message is displayed.


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