# class KDateTable

###

Module | kdeui
Namespace |
Class | KDateTable
Inherits | QWidget

### enums

- BackgroundMode { NoBgMode, RectangleMode, CircleMode }

enum details

### methods

- KDateTable (parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0

  The constructor.

- KDateTable (a0, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  a0 | QDate |
  parent | QWidget | 0

  The constructor.

- KDateTable (a0)

  returns ctor
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  a0 | KDateTable |

- KDateTable (a0)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0

- KDateTable (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QDate |
  a1 | QWidget | 0

- aboutToShowContextMenu (menu, date)

  returns Nothing
  SIGNAL ("aboutToShowContextMenu (KMenu*, const QDate&)")

  Argument | Type | Default
  --- | --- | ---
  menu | KMenu |
  date | QDate |

  A popup menu for a given date is about to be shown (as when the user right clicks on that date and the popup menu is enabled). Connect the slot where you fill the menu to this signal.

- calendar ( )

  returns KCalendarSystem

  Returns the currently selected calendar system.

  Returns a KCalendarSystem object

- date ( )

  returns QDate

  Returns the selected date.

- dateChanged (date)

  returns Nothing
  SIGNAL ("dateChanged (const QDate&)")

  Argument | Type | Default
  --- | --- | ---
  date | QDate |

  The selected date changed.

- dateChanged (cur, old)

  returns Nothing
  SIGNAL ("dateChanged (const QDate&, const QDate&)")

  Argument | Type | Default
  --- | --- | ---
  cur | QDate |
  old | QDate |

  This function behaves essentially like the one above. The selected date changed.

  cur - The current date

  old - The date before the date was changed

- dateFromPos (pos)

  returns QDate

  Argument | Type | Default
  --- | --- | ---
  pos | int |

  calculate the date that is displayed at a given cell in the matrix. pos is the 0-based index in the matrix. Inverse function to posForDate().

- focusInEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QFocusEvent |

- focusOutEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QFocusEvent |

- keyPressEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QKeyEvent |

- mousePressEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QMouseEvent |

  React on mouse clicks that select a date.

- paintEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QPaintEvent |

- popupMenuEnabled ( )

  returns bool

  Returns if the popup menu is enabled or not

- posFromDate (date)

  returns int

  Argument | Type | Default
  --- | --- | ---
  date | QDate |

  calculate the position of the cell in the matrix for the given date. The result is the 0-based index.

- setCalendar (calendar)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  calendar | KCalendarSystem | 0

  Changes the calendar system to use. Can use its own local locale if set.

  calendar - the calendar system object to use, defaults to global

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

- setCalendar (calendarType)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  calendarType | QString |

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

  calendarType - the calendar system type to use

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

- setCustomDatePainting (date, fgColor, bgMode, bgColor)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  date | QDate |
  fgColor | QColor |
  bgMode | KDateTable.BackgroundMode | KDateTable.NoBgMode
  bgColor | QColor | QColor()

  Makes a given date be painted with a given foregroundColor, and background (a rectangle, or a circle/ellipse) in a given color.

- setDate (date)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  date | QDate |

  Select and display this date.

- setFontSize (size)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  size | int |

  Set the font size of the date table.

- setPopupMenuEnabled (enable)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  enable | bool |

  Enables a popup menu when right clicking on a date.

  When it's enabled, this object emits a aboutToShowContextMenu signal where you can fill in the menu items.

- sizeHint ( )

  returns QSize

  Returns a recommended size for the widget. To save some time, the size of the largest used cell content is calculated in each paintCell() call, since all calculations have to be done there anyway. The size is stored in maxCell. The sizeHint() simply returns a multiple of maxCell.

- tableClicked ( )

  returns Nothing
  SIGNAL ("tableClicked ()")

  A date has been selected by clicking on the table.

- unsetCustomDatePainting (date)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  date | QDate |

  Unsets the custom painting of a date so that the date is painted as usual.

- wheelEvent (e)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  e | QWheelEvent |

### enums - detail

- BackgroundMode { NoBgMode, RectangleMode, CircleMode }

  | NoBgMode | - 0 | - |
  | RectangleMode | - | - |
  | CircleMode | - | - |