/***************************************************************************
                          kdatedialog.cpp  -  description
                             -------------------
    begin                : Fri Aug 24 2001
    copyright            : (C) 2001 by Jeffrey Yu
    email                : wehjin@yahoo.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#include <kdatepik.h>

#include "kdatedialog.h"

KDateDialog::KDateDialog(QWidget *parent, const char *name )
 : KDialogBase(parent, name, true, "Pick a date", Ok|Cancel, Ok)
{
	setMainWidget(new KDatePicker(this));
}

KDateDialog::~KDateDialog(){
}


/** Retrieve the selected date */
QDate KDateDialog::date(){
	return ((KDatePicker*) mainWidget())->getDate();
}

/** Specify the selected date */
void KDateDialog::date(QDate date){
	((KDatePicker*)mainWidget())->setDate(date);
}

