Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

commonwidgets.h

Go to the documentation of this file.
00001 /**********************************************************************
00002 ** Copyright (C) 2000 Trolltech AS.  All rights reserved.
00003 **
00004 ** This file is part of Qtopia Environment.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 **
00014 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00015 **
00016 ** Contact info@trolltech.com if any conditions of this licensing are
00017 ** not clear to you.
00018 **
00019 **********************************************************************/
00020 #ifndef Dateedit_H
00021 #define Dateedit_H
00022 
00023 #include <qwidget.h>
00024 #include <qdatetime.h>
00025 
00026 /* inherited classes */
00027 #include <qtoolbutton.h>
00028 #include <qspinbox.h>
00029 
00030 class DateBookMonth;
00031 class QComboBox;
00032 
00033 class DateEdit : public QToolButton
00034 {
00035     Q_OBJECT
00036 
00037 public:
00038     DateEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
00039     ~DateEdit();
00040 
00041     QDate date() const;
00042     void setDate(QDate);
00043 
00044     QSizePolicy sizePolicy() const;
00045 signals:
00046     void valueChanged(const QDate &);
00047 
00048 public slots:
00049     void clear();
00050 private slots:
00051     void subValueChanged();
00052 
00053 private:
00054     DateBookMonth *dateSelector;
00055 };
00056 
00057 class TimeEdit : public QWidget
00058 {
00059     Q_OBJECT
00060 
00061 public:
00062     TimeEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
00063     ~TimeEdit();
00064 
00065     QTime time() const;
00066     void setTime(QTime);
00067 
00068     QSizePolicy sizePolicy() const;
00069 signals:
00070     void valueChanged(const QTime &);
00071 
00072 public slots:
00073     void clear();
00074 private slots:
00075     void subValueChanged();
00076 
00077 private:
00078     QSpinBox *secondKey;
00079     QSpinBox *minuteKey;
00080     QSpinBox *hourKey;
00081     QComboBox *ampm;
00082 };
00083 
00084 /* more for consistency than need */
00085 class IntEdit : public QSpinBox
00086 {
00087     Q_OBJECT
00088 
00089 public:
00090     IntEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
00091     ~IntEdit();
00092 
00093     int value();
00094 
00095 public slots:
00096     void clear();
00097 };
00098 #endif

Generated on Sat Nov 5 16:17:08 2005 for OPIE by  doxygen 1.4.2