summaryrefslogtreecommitdiffstats
path: root/kdejava/koala/org/kde/koala/KDateTable.java
blob: d5ca30b9e3248e3b43314b5c656ef10b4ad87cf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
//Auto-generated by kalyptus. DO NOT EDIT.
package org.kde.koala;

import org.kde.qt.Qt;
import org.kde.qt.TQColor;
import org.kde.qt.TQMetaObject;
import org.kde.qt.QtSupport;
import org.kde.qt.TQSize;
import java.util.Calendar;
import org.kde.qt.TQPainter;
import org.kde.qt.TQFocusEvent;
import org.kde.qt.TQKeyEvent;
import org.kde.qt.TQMouseEvent;
import org.kde.qt.TQWidget;
import org.kde.qt.TQResizeEvent;
import org.kde.qt.TQWheelEvent;
import org.kde.qt.TQGridView;

/**

 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 TQGridView  {
	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 TQMetaObject metaObject();
	public native String className();
	/**	
		 The constructor.
		     		@short    The constructor.
	*/
	public KDateTable(TQWidget parent, Calendar date, String name, int f) {
		super((Class) null);
		newKDateTable(parent,date,name,f);
	}
	private native void newKDateTable(TQWidget parent, Calendar date, String name, int f);
	public KDateTable(TQWidget parent, Calendar date, String name) {
		super((Class) null);
		newKDateTable(parent,date,name);
	}
	private native void newKDateTable(TQWidget parent, Calendar date, String name);
	public KDateTable(TQWidget parent, Calendar date) {
		super((Class) null);
		newKDateTable(parent,date);
	}
	private native void newKDateTable(TQWidget parent, Calendar date);
	public KDateTable(TQWidget parent) {
		super((Class) null);
		newKDateTable(parent);
	}
	private native void newKDateTable(TQWidget parent);
	public KDateTable() {
		super((Class) null);
		newKDateTable();
	}
	private native void newKDateTable();
	/**	
		 The constructor.
				@short    The constructor.
	*/
	public KDateTable(TQWidget parent, String name, int f) {
		super((Class) null);
		newKDateTable(parent,name,f);
	}
	private native void newKDateTable(TQWidget parent, String name, int f);
	public KDateTable(TQWidget parent, String name) {
		super((Class) null);
		newKDateTable(parent,name);
	}
	private native void newKDateTable(TQWidget 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 TQSize 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, TQColor fgColor, int bgMode, TQColor bgColor);
	public native void setCustomDatePainting(Calendar date, TQColor fgColor, int bgMode);
	public native void setCustomDatePainting(Calendar date, TQColor 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(TQPainter arg1, int arg2, int arg3);
	/**	
		 Handle the resize events.
		     		@short    Handle the resize events.
	*/
	protected native void viewportResizeEvent(TQResizeEvent arg1);
	/**	
		 React on mouse clicks that select a date.
		     		@short    React on mouse clicks that select a date.
	*/
	protected native void contentsMousePressEvent(TQMouseEvent arg1);
	protected native void wheelEvent(TQWheelEvent e);
	protected native void keyPressEvent(TQKeyEvent e);
	protected native void focusInEvent(TQFocusEvent e);
	protected native void focusOutEvent(TQFocusEvent 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();
}