/***************************************************************************
                            KDateInternalMonthPicker.java -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.koala;

import org.kde.qt.*;
import java.util.*;
import java.lang.Error;

/**

 A table containing month names. It is used to pick a month directly.

 See {@link KDateInternalMonthPickerSignals} for signals emitted by KDateInternalMonthPicker.

 See {@link KDateInternalMonthPickerEventHandling} for event handlers to override in subclasses of KDateInternalMonthPicker.

 @author Tim Gilman, Mirko Boehm

 @version $Id: KDateInternalMonthPicker.java,v 1.6 2002/01/31 04:48:56 rdale Exp $

 @short 
 A table containing month names.
*/
public class KDateInternalMonthPicker extends QGridView  {
	protected KDateInternalMonthPicker(Class dummy){super((Class) null);}

	private native void newKDateInternalMonthPicker( int fontsize, QWidget parent, String name);

/**  The constructor. 
*/
	public KDateInternalMonthPicker( int fontsize, QWidget parent, String name) {
		super((Class) null);
		newKDateInternalMonthPicker( fontsize, parent, name);
	}
	private native void newKDateInternalMonthPicker( int fontsize, QWidget parent);
	public KDateInternalMonthPicker( int fontsize, QWidget parent) {
		super((Class) null);
		newKDateInternalMonthPicker( fontsize, parent);
	}

/**  The size hint. 
*/
	public native QSize sizeHint();

/**  Return the result. 0 means no selection (reject()), 1..12 are the
      months. 
*/
	public native int getResult();

/**  Set up the painter. 
*/
	protected native void setupPainter( QPainter p);

/**  The resize event. 
*/
	protected native void viewportResizeEvent( QResizeEvent arg1);

/**  Paint a cell. This simply draws the month names in it. 
*/
	protected native void paintCell( QPainter painter, int row, int col);

/**  Catch mouse click and move events to paint a rectangle around the item.
*/
	protected native void contentsMousePressEvent( QMouseEvent e);
	protected native void contentsMouseMoveEvent( QMouseEvent e);

/**  Emit monthSelected(int) when a cell has been released. 
*/
	protected native void contentsMouseReleaseEvent( QMouseEvent e);
}
