# kdeui Library API Documentation

Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# ktimewidget.cpp

    00001 #include <qdatetimeedit.h>
    00002 #include <qlayout.h>
    00003
    00004 #include "kdebug.h"
    00005 #include "kdialog.h"
    00006
    00007 #include "ktimewidget.h"
    00008
    00009 class KTimeWidget::KTimeWidgetPrivate
    00010 {
    00011 public:
    00012   QTimeEdit * timeWidget;
    00013 };
    00014
    00015 KTimeWidget::KTimeWidget(QWidget * parent, const char * name)
    00016   : QWidget(parent, name)
    00017 {
    00018   init();
    00019 }
    00020
    00021 KTimeWidget::KTimeWidget(const QTime & time,
    00022                          QWidget * parent, const char * name)
    00023   : QWidget(parent, name)
    00024 {
    00025   init();
    00026
    00027   setTime(time);
    00028 }
    00029
    00030 KTimeWidget::~KTimeWidget()
    00031 {
    00032   delete d;
    00033 }
    00034
    00035 void KTimeWidget::init()
    00036 {
    00037   d = new KTimeWidgetPrivate;
    00038
    00039   QHBoxLayout *layout = new QHBoxLayout(this, 0, KDialog::spacingHint());
    00040   layout->setAutoAdd(true);
    00041
    00042   d->timeWidget = new QTimeEdit(this);
    00043
    00044   connect(d->timeWidget, SIGNAL(valueChanged(const QTime &)),
    00045           SIGNAL(valueChanged(const QTime &)));
    00046 }
    00047
    00048 void KTimeWidget::setTime(const QTime & time)
    00049 {
    00050   d->timeWidget->setTime(time);
    00051 }
    00052
    00053 QTime KTimeWidget::time() const
    00054 {
    00055   return d->timeWidget->time();
    00056 }
    00057
    00058 #include "ktimewidget.moc"

This file is part of the documentation for kdeui Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:20:24 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003