00001 #ifndef OTIMEPICKER_H 00002 #define OTIMEPICKER_H 00003 00004 #include <qwidget.h> 00005 #include <qvaluelist.h> 00006 #include <qdatetime.h> 00007 #include <qdialog.h> 00008 00009 #include <opie/oclickablelabel.h> 00010 #include "otimepickerbase.h" 00011 00023 class OTimePicker: public QWidget { 00024 Q_OBJECT 00025 00026 public: 00027 OTimePicker(QWidget* parent = 0, const char* name = 0, 00028 WFlags fl = 0); 00029 00030 public slots: 00031 void setHour(int h); 00032 void setMinute(int m); 00033 void setTime( const QTime& ); 00034 void setTime( int h, int m ); 00035 00036 public: 00037 QTime time()const; 00038 00039 private: 00040 QValueList<OClickableLabel *> hourLst; 00041 QValueList<OClickableLabel *> minuteLst; 00042 QTime tm; 00043 struct Private; 00044 Private *d; 00045 00046 private slots: 00047 void slotHour(bool b); 00048 void slotMinute(bool b); 00049 00050 signals: 00054 void timeChanged(const QTime &); 00055 }; 00056 00064 class OTimePickerDialog: public OTimePickerDialogBase { 00065 Q_OBJECT 00066 00067 public: 00068 OTimePickerDialog ( QWidget* parent = 0, const char* name = NULL, WFlags fl = 0 ); 00072 ~OTimePickerDialog() { }; 00073 00074 QTime time()const; 00075 00076 public slots: 00077 void setTime( const QTime& time ); 00078 void setHour( const QString& hour ); 00079 void setMinute( const QString& minute ); 00080 00081 private: 00082 QTime m_time; 00083 class Private; 00084 Private* d; 00085 }; 00086 #endif
1.4.2