summaryrefslogtreecommitdiff
path: root/libopie/otimepicker.h
authoreilers <eilers>2002-08-20 09:26:48 (UTC)
committer eilers <eilers>2002-08-20 09:26:48 (UTC)
commitb00ba7b9cdf02a4512f70694e2262ce6e3ebcb98 (patch) (side-by-side diff)
tree7b3e6e16917f0835437ddf2e2b87439f3a7a4285 /libopie/otimepicker.h
parent08a0272257dbb26af4403f9d8d47e5bf300eb0a7 (diff)
downloadopie-b00ba7b9cdf02a4512f70694e2262ce6e3ebcb98.zip
opie-b00ba7b9cdf02a4512f70694e2262ce6e3ebcb98.tar.gz
opie-b00ba7b9cdf02a4512f70694e2262ce6e3ebcb98.tar.bz2
Added nice timepicker widget and dialog
Diffstat (limited to 'libopie/otimepicker.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/otimepicker.h51
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 @@
+#ifndef OTIMEPICKER_H
+#define OTIMEPICKER_H
+
+#include <qwidget.h>
+#include <qvaluelist.h>
+#include <qdatetime.h>
+#include <qdialog.h>
+
+#include <opie/oclickablelabel.h>
+#include <opie/otimepickerbase.h>
+
+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<OClickableLabel *> hourLst;
+ QValueList<OClickableLabel *> 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