KDE 4.6 PyKDE API Reference

- KDE's Python API

# KDateWidget Class Reference

`from PyKDE4.kdeui import *`

Inherits: QWidget → QObject

## Detailed Description

A date selection widget.

This widget can be used to display or allow user selection of a date.

"KDE Date Widget"

See also:
  KDatePicker

Author:
  Waldo Bastian <bastian@kde.org>, John Layt <john@layt.net>

## Signals

| changed (QDate date)

## Methods

| __init__ (self, QWidget parent=0)
| __init__ (self, QDate date, QWidget parent=0)
KCalendarSystem | calendar (self)
QDate | date (self)
| init (self, QDate date)
bool | setCalendar (self, KCalendarSystem calendar=0)
bool | setCalendar (self, QString calendarType)
bool | setCalendarSystem (self, KLocale.CalendarSystem calendarSystem)
bool | setDate (self, QDate date)
| slotDateChanged (self)

## Signal Documentation

changed | ( | QDate | date
| ) |  |  |

Emitted whenever the date of the widget is changed, either with setDate() or via user selection.

Signal syntax:
  `QObject.connect(source, SIGNAL("changed(const QDate&)"), target_slot)`

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

Constructs a date selection widget.

__init__ | ( | self, |
|  | QDate | date,
|  | QWidget | parent=0
| ) |  |  |

Constructs a date selection widget with the initial date set to date.

KCalendarSystem calendar | ( |  | self ) |

Returns the currently selected calendar system.

Returns:
  a KCalendarSystem object

QDate date | ( |  | self ) |

Returns the currently selected date.

init | ( | self, |
|  | QDate | date
| ) |  |  |

bool setCalendar | ( | self, |
|  | KCalendarSystem | calendar=0
| ) |  |  |

Changes the calendar system to use. Will always use global locale.

Parameters:

  | calendarType | the calendar system type to use

Returns:
  true if the calendar system was successfully set, false otherwise

bool setCalendar | ( | self, |
|  | QString | calendarType
| ) |  |  |

Changes the calendar system to use. Will always use global locale.

Parameters:

  | calendarType | the calendar system type to use

Returns:
  true if the calendar system was successfully set, false otherwise

bool setCalendarSystem | ( | self, |
|  | KLocale.CalendarSystem | calendarSystem
| ) |  |  |

Since:
  4.6

Changes the calendar system to use. Will always use global locale.

Parameters:

  | calendarSystem | the calendar system to use

Returns:
  true if the calendar system was successfully set, false otherwise

bool setDate | ( | self, |
|  | QDate | date
| ) |  |  |

Changes the selected date to date.

Returns:
  true if the date was successfully set, false otherwise

slotDateChanged | ( |  | self ) |