summaryrefslogtreecommitdiff
path: root/libopie2/opieui/otimepicker.h
authormickeyl <mickeyl>2004-01-15 15:04:23 (UTC)
committer mickeyl <mickeyl>2004-01-15 15:04:23 (UTC)
commitac1e2b945965ee8caabd658e90f9e234fc622619 (patch) (unidiff)
treed787cb386c6b1b5f69cb00809636299e66c56833 /libopie2/opieui/otimepicker.h
parentdde789ef19fa3a3913805e452ac1e3400688e8a0 (diff)
downloadopie-ac1e2b945965ee8caabd658e90f9e234fc622619.zip
opie-ac1e2b945965ee8caabd658e90f9e234fc622619.tar.gz
opie-ac1e2b945965ee8caabd658e90f9e234fc622619.tar.bz2
libopie1 --> libopie2 + namespace cleanups, code layout, etc.
Diffstat (limited to 'libopie2/opieui/otimepicker.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/otimepicker.h125
1 files changed, 125 insertions, 0 deletions
diff --git a/libopie2/opieui/otimepicker.h b/libopie2/opieui/otimepicker.h
new file mode 100644
index 0000000..2da7773
--- a/dev/null
+++ b/libopie2/opieui/otimepicker.h
@@ -0,0 +1,125 @@
1/*
2 This file is part of the Opie Project
3 Copyright (C) Stefan Eilers <eilers.stefan@epost.de>
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6           .>+-=
7 _;:,     .>    :=|. This program is free software; you can
8.> <`_,   >  .   <= redistribute it and/or modify it under
9:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
10.="- .-=="i,     .._ License as published by the Free Software
11 - .   .-<_>     .<> Foundation; either version 2 of the License,
12     ._= =}       : or (at your option) any later version.
13    .%`+i>       _;_.
14    .i_,=:_.      -<s. This program is distributed in the hope that
15     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
16    : ..    .:,     . . . without even the implied warranty of
17    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
18  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.=       =       ; Library General Public License for more
20++=   -.     .`     .: details.
21 :     =  ...= . :.=-
22 -.   .:....=;==+<; You should have received a copy of the GNU
23  -_. . .   )=.  = Library General Public License along with
24    --        :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
29
30#ifndef OTIMEPICKER_H
31#define OTIMEPICKER_H
32
33/* OPIE */
34#include <opie2/oclickablelabel.h>
35#include "otimepickerbase.h"
36
37/* QT */
38#include <qwidget.h>
39#include <qvaluelist.h>
40#include <qdatetime.h>
41#include <qdialog.h>
42
43using namespace Opie;
44
45// namespace Opie
46// {
47
48/**
49 * A class to pick time. It uses clickable labels
50 * internally to allow a quick selection of a time.
51 * A time can be selected by two clicks of a user
52 *
53 * @short A widget to quickly pick a QTime
54 * @version 1.0
55 * @see QWidget
56 * @see QTime
57 * @author Hakan Ardo, Stefan Eilers
58 */
59class OTimePicker: public QWidget
60{
61 Q_OBJECT
62
63public:
64 OTimePicker(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
65
66public slots:
67 void setHour(int h);
68 void setMinute(int m);
69 void setTime( const QTime& );
70 void setTime( int h, int m );
71
72public:
73 QTime time()const;
74
75private:
76 QValueList<OClickableLabel *> hourLst;
77 QValueList<OClickableLabel *> minuteLst;
78 QTime tm;
79 struct Private;
80 Private *d;
81
82private slots:
83 void slotHour(bool b);
84 void slotMinute(bool b);
85
86signals:
87 /**
88 * gets emitted when the time got changed by the user
89 */
90 void timeChanged(const QTime &);
91};
92
93/**
94 *
95 * @short A small dialog to pick a time
96 * @version 1.0
97 * @author Stefan Eilers
98 *
99 **/
100
101class OTimePickerDialog: public OTimePickerDialogBase
102{
103 Q_OBJECT
104
105public:
106 OTimePickerDialog ( QWidget* parent = 0, const char* name = NULL, WFlags fl = 0 );
107 ~OTimePickerDialog() { };
108
109 QTime time()const;
110
111public slots:
112 void setTime( const QTime& time );
113 void setHour( const QString& hour );
114 void setMinute( const QString& minute );
115
116private:
117 QTime m_time;
118 class Private;
119 Private* d;
120};
121
122// };
123
124#endif
125