From b00ba7b9cdf02a4512f70694e2262ce6e3ebcb98 Mon Sep 17 00:00:00 2001 From: eilers Date: Tue, 20 Aug 2002 09:26:48 +0000 Subject: Added nice timepicker widget and dialog --- (limited to 'libopie/otimepicker.h') diff --git a/libopie/otimepicker.h b/libopie/otimepicker.h new file mode 100644 index 0000000..3de6698 --- a/dev/null +++ b/libopie/otimepicker.h @@ -0,0 +1,51 @@ +#ifndef OTIMEPICKER_H +#define OTIMEPICKER_H + +#include +#include +#include +#include + +#include +#include + +class OTimePicker: public QWidget { + Q_OBJECT + + public: + OTimePicker(QWidget* parent = 0, const char* name = 0, + WFlags fl = 0); + void setHour(int h); + void setMinute(int m); + + private: + QValueList hourLst; + QValueList minuteLst; + QTime tm; + + private slots: + void slotHour(bool b); + void slotMinute(bool b); + + signals: + void timeChanged(const QTime &); +}; + +class OTimePickerDialog: public OTimePickerDialogBase { + Q_OBJECT + + public: + OTimePickerDialog ( QWidget* parent = 0, const char* name = NULL, WFlags fl = 0 ); + ~OTimePickerDialog() { }; + + QTime& time(); + + public slots: + void setTime( const QTime& time ); + void setHour( const QString& hour ); + void setMinute( const QString& minute ); + + private: + QTime m_time; +}; +#endif -- cgit v0.9.0.2