org.kde.koala

Class KDateTable

public class KDateTable extends QGridView

Date selection table. This is a support class for the KDatePicker class. It just draws the calender table without titles, but could theoretically be used as a standalone. When a date is selected by the user, it emits a signal: dateSelected(Calendar) See KDateTableSignals for signals emitted by KDateTable

Version: $Id: KDateTable.java 473384 2005-10-23 14:17:09Z rdale $

Author: Tim Gilman, Mirko Boehm

UNKNOWN: Date selection table.

Field Summary
static intCircleMode
static intNoBgMode
static intRectangleMode
Constructor Summary
protected KDateTable(Class dummy)
KDateTable(QWidget parent, Calendar date, String name, int f)
The constructor.
KDateTable(QWidget parent, Calendar date, String name)
KDateTable(QWidget parent, Calendar date)
KDateTable(QWidget parent)
KDateTable()
KDateTable(QWidget parent, String name, int f)
The constructor.
KDateTable(QWidget parent, String name)
Method Summary
StringclassName()
protected voidcontentsMousePressEvent(QMouseEvent arg1)
React on mouse clicks that select a date.
protected CalendardateFromPos(int pos)
calculate the date that is displayed at a given cell in the matrix. pos is the 0-based index in the matrix.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
protected voidfocusInEvent(QFocusEvent e)
protected voidfocusOutEvent(QFocusEvent e)
CalendargetDate()
booleanisDisposed()
Has the wrapped C++ instance been deleted?
protected voidkeyPressEvent(QKeyEvent e)
QMetaObjectmetaObject()
voidpaintCell(QPainter arg1, int arg2, int arg3)
Paint a cell.
booleanpopupMenuEnabled()
Returns if the popup menu is enabled or not
protected intposFromDate(Calendar date)
calculate the position of the cell in the matrix for the given date.
voidsetCustomDatePainting(Calendar date, QColor fgColor, int bgMode, QColor bgColor)
Makes a given date be painted with a given foregroundColor, and background (a rectangle, or a circle/ellipse) in a given color.
voidsetCustomDatePainting(Calendar date, QColor fgColor, int bgMode)
voidsetCustomDatePainting(Calendar date, QColor fgColor)
booleansetDate(Calendar arg1)
Select and display this date.
voidsetFontSize(int size)
Set the font size of the date table.
voidsetPopupMenuEnabled(boolean enable)
Enables a popup menu when right clicking on a date.
QSizesizeHint()
Returns a recommended size for the widget.
voidunsetCustomDatePainting(Calendar date)
Unsets the custom painting of a date so that the date is painted as usual.
protected voidviewportResizeEvent(QResizeEvent arg1)
Handle the resize events.
protected voidwheelEvent(QWheelEvent e)

Field Detail

CircleMode

public static final int CircleMode

NoBgMode

public static final int NoBgMode

RectangleMode

public static final int RectangleMode

Constructor Detail

KDateTable

protected KDateTable(Class dummy)

KDateTable

public KDateTable(QWidget parent, Calendar date, String name, int f)
The constructor.

UNKNOWN: The constructor.

KDateTable

public KDateTable(QWidget parent, Calendar date, String name)

KDateTable

public KDateTable(QWidget parent, Calendar date)

KDateTable

public KDateTable(QWidget parent)

KDateTable

public KDateTable()

KDateTable

public KDateTable(QWidget parent, String name, int f)
The constructor.

UNKNOWN: The constructor.

KDateTable

public KDateTable(QWidget parent, String name)

Method Detail

className

public String className()

contentsMousePressEvent

protected void contentsMousePressEvent(QMouseEvent arg1)
React on mouse clicks that select a date.

UNKNOWN: React on mouse clicks that select a date.

dateFromPos

protected Calendar dateFromPos(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().

UNKNOWN: calculate the date that is displayed at a given cell in the matrix.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

focusInEvent

protected void focusInEvent(QFocusEvent e)

focusOutEvent

protected void focusOutEvent(QFocusEvent e)

getDate

public Calendar getDate()

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

keyPressEvent

protected void keyPressEvent(QKeyEvent e)

metaObject

public QMetaObject metaObject()

paintCell

public void paintCell(QPainter arg1, int arg2, int arg3)
Paint a cell.

UNKNOWN: Paint a cell.

popupMenuEnabled

public boolean popupMenuEnabled()
Returns if the popup menu is enabled or not

UNKNOWN: Returns if the popup menu is enabled or not

posFromDate

protected int posFromDate(Calendar date)
calculate the position of the cell in the matrix for the given date. The result is the 0-based index.

UNKNOWN: calculate the position of the cell in the matrix for the given date.

setCustomDatePainting

public void setCustomDatePainting(Calendar date, QColor fgColor, int bgMode, QColor bgColor)
Makes a given date be painted with a given foregroundColor, and background (a rectangle, or a circle/ellipse) in a given color.

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

setCustomDatePainting

public void setCustomDatePainting(Calendar date, QColor fgColor, int bgMode)

setCustomDatePainting

public void setCustomDatePainting(Calendar date, QColor fgColor)

setDate

public boolean setDate(Calendar arg1)
Select and display this date.

UNKNOWN: Select and display this date.

setFontSize

public void setFontSize(int size)
Set the font size of the date table.

UNKNOWN: Set the font size of the date table.

setPopupMenuEnabled

public void setPopupMenuEnabled(boolean 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.

UNKNOWN: Enables a popup menu when right clicking on a date.

sizeHint

public QSize sizeHint()
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.

UNKNOWN: Returns a recommended size for the widget.

unsetCustomDatePainting

public void unsetCustomDatePainting(Calendar date)
Unsets the custom painting of a date so that the date is painted as usual.

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

viewportResizeEvent

protected void viewportResizeEvent(QResizeEvent arg1)
Handle the resize events.

UNKNOWN: Handle the resize events.

wheelEvent

protected void wheelEvent(QWheelEvent e)