You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebindings/kdejava/koala/org/kde/koala/KDateTable.java

168 lines
5.8 KiB

//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;
import org.kde.qt.Qt;
import org.kde.qt.QColor;
import org.kde.qt.QMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.QSize;
import java.util.Calendar;
import org.kde.qt.QPainter;
import org.kde.qt.QFocusEvent;
import org.kde.qt.QKeyEvent;
import org.kde.qt.QMouseEvent;
import org.kde.qt.QWidget;
import org.kde.qt.QResizeEvent;
import org.kde.qt.QWheelEvent;
import org.kde.qt.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 {@link KDateTableSignals} for signals emitted by KDateTable
@author Tim Gilman, Mirko Boehm
@version $Id$
@short Date selection table.
*/
public class KDateTable extends QGridView {
protected KDateTable(Class dummy){super((Class) null);}
public static final int NoBgMode = 0;
public static final int RectangleMode = 1;
public static final int CircleMode = 2;
public native QMetaObject metaObject();
public native String className();
/**
The constructor.
@short The constructor.
*/
public KDateTable(QWidget parent, Calendar date, String name, int f) {
super((Class) null);
newKDateTable(parent,date,name,f);
}
private native void newKDateTable(QWidget parent, Calendar date, String name, int f);
public KDateTable(QWidget parent, Calendar date, String name) {
super((Class) null);
newKDateTable(parent,date,name);
}
private native void newKDateTable(QWidget parent, Calendar date, String name);
public KDateTable(QWidget parent, Calendar date) {
super((Class) null);
newKDateTable(parent,date);
}
private native void newKDateTable(QWidget parent, Calendar date);
public KDateTable(QWidget parent) {
super((Class) null);
newKDateTable(parent);
}
private native void newKDateTable(QWidget parent);
public KDateTable() {
super((Class) null);
newKDateTable();
}
private native void newKDateTable();
/**
The constructor.
@short The constructor.
*/
public KDateTable(QWidget parent, String name, int f) {
super((Class) null);
newKDateTable(parent,name,f);
}
private native void newKDateTable(QWidget parent, String name, int f);
public KDateTable(QWidget parent, String name) {
super((Class) null);
newKDateTable(parent,name);
}
private native void newKDateTable(QWidget parent, String name);
/**
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.
@short Returns a recommended size for the widget.
*/
public native QSize sizeHint();
/**
Set the font size of the date table.
@short Set the font size of the date table.
*/
public native void setFontSize(int size);
/**
Select and display this date.
@short Select and display this date.
*/
public native boolean setDate(Calendar arg1);
public native Calendar getDate();
/**
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.
@short Enables a popup menu when right clicking on a date.
*/
public native void setPopupMenuEnabled(boolean enable);
/**
Returns if the popup menu is enabled or not
@short Returns if the popup menu is enabled or not
*/
public native boolean popupMenuEnabled();
/**
Makes a given date be painted with a given foregroundColor, and background
(a rectangle, or a circle/ellipse) in a given color.
@short Makes a given date be painted with a given foregroundColor, and background (a rectangle, or a circle/ellipse) in a given color.
*/
public native void setCustomDatePainting(Calendar date, QColor fgColor, int bgMode, QColor bgColor);
public native void setCustomDatePainting(Calendar date, QColor fgColor, int bgMode);
public native void setCustomDatePainting(Calendar date, QColor fgColor);
/**
Unsets the custom painting of a date so that the date is painted as usual.
@short Unsets the custom painting of a date so that the date is painted as usual.
*/
public native void unsetCustomDatePainting(Calendar date);
/**
calculate the position of the cell in the matrix for the given date. The result is the 0-based index.
@short calculate the position of the cell in the matrix for the given date.
*/
protected native int posFromDate(Calendar date);
/**
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().
@short calculate the date that is displayed at a given cell in the matrix.
*/
protected native Calendar dateFromPos(int pos);
/**
Paint a cell.
@short Paint a cell.
*/
public native void paintCell(QPainter arg1, int arg2, int arg3);
/**
Handle the resize events.
@short Handle the resize events.
*/
protected native void viewportResizeEvent(QResizeEvent arg1);
/**
React on mouse clicks that select a date.
@short React on mouse clicks that select a date.
*/
protected native void contentsMousePressEvent(QMouseEvent arg1);
protected native void wheelEvent(QWheelEvent e);
protected native void keyPressEvent(QKeyEvent e);
protected native void focusInEvent(QFocusEvent e);
protected native void focusOutEvent(QFocusEvent e);
/** Deletes the wrapped C++ instance */
protected native void finalize() throws InternalError;
/** Delete the wrapped C++ instance ahead of finalize() */
public native void dispose();
/** Has the wrapped C++ instance been deleted? */
public native boolean isDisposed();
}