KDateTable Class Reference
from PyKDE4.kdeui import *
Detailed Description
Method Documentation
__init__ | ( | self, | ||
QWidget | parent=0 | |||
) |
The constructor.
__init__ | ( | self, | ||
KDateTable | a0 | |||
) |
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.
- Signal syntax:
QObject.connect(source, SIGNAL("aboutToShowContextMenu(KMenu*, const QDate&)"), target_slot)
KCalendarSystem calendar | ( | self ) |
Returns the currently selected calendar system.
- Returns:
- a KCalendarSystem object
QDate date | ( | self ) |
- Returns:
- the selected date.
dateChanged | ( | self, | ||
QDate | date | |||
) |
The selected date changed.
- Signal syntax:
QObject.connect(source, SIGNAL("dateChanged(const QDate&)"), target_slot)
This function behaves essentially like the one above. The selected date changed.
- Parameters:
-
cur The current date old The date before the date was changed
- Signal syntax:
QObject.connect(source, SIGNAL("dateChanged(const QDate&, const QDate&)"), target_slot)
QDate dateFromPos | ( | self, | ||
int | pos | |||
) |
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 | ( | self, | ||
QFocusEvent | e | |||
) |
focusOutEvent | ( | self, | ||
QFocusEvent | e | |||
) |
keyPressEvent | ( | self, | ||
QKeyEvent | e | |||
) |
mousePressEvent | ( | self, | ||
QMouseEvent | e | |||
) |
React on mouse clicks that select a date.
paintEvent | ( | self, | ||
QPaintEvent | e | |||
) |
bool popupMenuEnabled | ( | self ) |
Returns if the popup menu is enabled or not
int posFromDate | ( | self, | ||
QDate | date | |||
) |
calculate the position of the cell in the matrix for the given date. The result is the 0-based index.
bool setCalendar | ( | self, | ||
KCalendarSystem | calendar=0 | |||
) |
Changes the calendar system to use. Can use its own local locale if set.
- Parameters:
-
calendar the calendar system object to use, defaults to global
- 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
setCustomDatePainting | ( | self, | ||
QDate | date, | |||
QColor | fgColor, | |||
KDateTable.BackgroundMode | bgMode=KDateTable.NoBgMode, | |||
QColor | bgColor=QColor() | |||
) |
Makes a given date be painted with a given foregroundColor, and background (a rectangle, or a circle/ellipse) in a given color.
bool setDate | ( | self, | ||
QDate | date | |||
) |
Select and display this date.
setFontSize | ( | self, | ||
int | size | |||
) |
Set the font size of the date table.
setPopupMenuEnabled | ( | self, | ||
bool | enable | |||
) |
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.
QSize sizeHint | ( | self ) |
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 | ( | self ) |
A date has been selected by clicking on the table.
- Signal syntax:
QObject.connect(source, SIGNAL("tableClicked()"), target_slot)
unsetCustomDatePainting | ( | self, | ||
QDate | date | |||
) |
Unsets the custom painting of a date so that the date is painted as usual.
wheelEvent | ( | self, | ||
QWheelEvent | e | |||
) |
Enumeration Documentation
BackgroundMode |
- Enumerator:
-
NoBgMode = 0 RectangleMode CircleMode