libtdepim

#include <kdateedit.h>

Inherits TQComboBox.

Public Slots

void setDate (const TQDate &date)
 

Signals

void dateEntered (const TQDate &date)
 
void dateChanged (const TQDate &date)
 

Public Member Functions

 KDateEdit (TQWidget *parent=0, const char *name=0)
 
TQDate date () const
 
void setReadOnly (bool readOnly)
 
bool isReadOnly () const
 
virtual void popup ()
 

Protected Slots

void lineEnterPressed ()
 
void slotTextChanged (const TQString &)
 
void dateSelected (TQDate)
 

Protected Member Functions

virtual bool eventFilter (TQObject *, TQEvent *)
 
virtual void mousePressEvent (TQMouseEvent *)
 
virtual bool assignDate (const TQDate &date)
 
void setupKeywords ()
 

Detailed Description

A date editing widget that consists of an editable combo box.

The combo box contains the date in text form, and clicking the combo box arrow will display a 'popup' style date picker.

This widget also supports advanced features like allowing the user to type in the day name to get the date. The following keywords are supported (in the native language): tomorrow, yesturday, today, monday, tuesday, wednesday, thursday, friday, saturday, sunday.

This is how it looks
Author
Cornelius Schumacher schum.nosp@m.ache.nosp@m.r@kde.nosp@m..org
Mike Pilone mpilo.nosp@m.ne@s.nosp@m.lac.c.nosp@m.om
David Jarvie softw.nosp@m.are@.nosp@m.astro.nosp@m.jar..nosp@m.org.u.nosp@m.k
Tobias Koenig tokoe.nosp@m.@kde.nosp@m..org

Definition at line 54 of file kdateedit.h.

Member Function Documentation

◆ assignDate()

bool KDateEdit::assignDate ( const TQDate &  date)
protectedvirtual

Sets the date, without altering the display.

This method is used internally to set the widget's date value. As a virtual method, it allows derived classes to perform additional validation on the date value before it is set. Derived classes should return true if TQDate::isValid(date) returns false.

Parameters
dateThe new date to set.
Returns
True if the date was set, false if it was considered invalid and remains unchanged.

Definition at line 343 of file kdateedit.cpp.

◆ date()

TQDate KDateEdit::date ( ) const
Returns
The date entered. This date could be invalid, you have to check validity yourself.

Definition at line 116 of file kdateedit.cpp.

◆ dateChanged

void KDateEdit::dateChanged ( const TQDate &  date)
signal

This signal is emitted whenever the user modifies the date.

The passed date can be invalid.

◆ dateEntered

void KDateEdit::dateEntered ( const TQDate &  date)
signal

This signal is emitted whenever the user has entered a new date.

When the user changes the date by editing the line edit field, the signal is not emitted until focus leaves the line edit field. The passed date can be invalid.

◆ isReadOnly()

bool KDateEdit::isReadOnly ( ) const
Returns
True if the widget is read-only, false if read-write.

Definition at line 127 of file kdateedit.cpp.

◆ setDate

void KDateEdit::setDate ( const TQDate &  date)
slot

Sets the date.

Parameters
dateThe new date to display. This date must be valid or it will not be set

Definition at line 110 of file kdateedit.cpp.

◆ setReadOnly()

void KDateEdit::setReadOnly ( bool  readOnly)

Sets whether the widget is read-only for the user.

If read-only, the date picker pop-up is inactive, and the displayed date cannot be edited.

Parameters
readOnlyTrue to set the widget read-only, false to set it read-write.

Definition at line 121 of file kdateedit.cpp.

◆ setupKeywords()

void KDateEdit::setupKeywords ( )
protected

Fills the keyword map.

Reimplement it if you want additional keywords.

Definition at line 328 of file kdateedit.cpp.


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