-rw-r--r-- | libopie/otimepicker.h | 51 |
1 files changed, 51 insertions, 0 deletions
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 @@ | |||
1 | #ifndef OTIMEPICKER_H | ||
2 | #define OTIMEPICKER_H | ||
3 | |||
4 | #include <qwidget.h> | ||
5 | #include <qvaluelist.h> | ||
6 | #include <qdatetime.h> | ||
7 | #include <qdialog.h> | ||
8 | |||
9 | #include <opie/oclickablelabel.h> | ||
10 | #include <opie/otimepickerbase.h> | ||
11 | |||
12 | class OTimePicker: public QWidget { | ||
13 | Q_OBJECT | ||
14 | |||
15 | public: | ||
16 | OTimePicker(QWidget* parent = 0, const char* name = 0, | ||
17 | WFlags fl = 0); | ||
18 | void setHour(int h); | ||
19 | void setMinute(int m); | ||
20 | |||
21 | private: | ||
22 | QValueList<OClickableLabel *> hourLst; | ||
23 | QValueList<OClickableLabel *> minuteLst; | ||
24 | QTime tm; | ||
25 | |||
26 | private slots: | ||
27 | void slotHour(bool b); | ||
28 | void slotMinute(bool b); | ||
29 | |||
30 | signals: | ||
31 | void timeChanged(const QTime &); | ||
32 | }; | ||
33 | |||
34 | class OTimePickerDialog: public OTimePickerDialogBase { | ||
35 | Q_OBJECT | ||
36 | |||
37 | public: | ||
38 | OTimePickerDialog ( QWidget* parent = 0, const char* name = NULL, WFlags fl = 0 ); | ||
39 | ~OTimePickerDialog() { }; | ||
40 | |||
41 | QTime& time(); | ||
42 | |||
43 | public slots: | ||
44 | void setTime( const QTime& time ); | ||
45 | void setHour( const QString& hour ); | ||
46 | void setMinute( const QString& minute ); | ||
47 | |||
48 | private: | ||
49 | QTime m_time; | ||
50 | }; | ||
51 | #endif | ||