Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

otimepicker.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the Opie Project
00003                              Copyright (C) Stefan Eilers <eilers.stefan@epost.de>
00004               =.             Copyright (C) The Opie Team <opie-devel@handhelds.org>
00005             .=l.
00006            .>+-=
00007  _;:,     .>    :=|.         This program is free software; you can
00008 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00009 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00010 .="- .-=="i,     .._         License as published by the Free Software
00011  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00012      ._= =}       :          or (at your option) any later version.
00013     .%`+i>       _;_.
00014     .i_,=:_.      -<s.       This program is distributed in the hope that
00015      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00016     : ..    .:,     . . .    without even the implied warranty of
00017     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00018   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00019 ..}^=.=       =       ;      Library General Public License for more
00020 ++=   -.     .`     .:       details.
00021  :     =  ...= . :.=-
00022  -.   .:....=;==+<;          You should have received a copy of the GNU
00023   -_. . .   )=.  =           Library General Public License along with
00024     --        :-=`           this library; see the file COPYING.LIB.
00025                              If not, write to the Free Software Foundation,
00026                              Inc., 59 Temple Place - Suite 330,
00027                              Boston, MA 02111-1307, USA.
00028 */
00029 
00030 #ifndef OTIMEPICKER_H
00031 #define OTIMEPICKER_H
00032 
00033 /* OPIE */
00034 #include "oclickablelabel.h"
00035 #include "otimepickerbase.h"
00036 
00037 /* QT */
00038 #include <qwidget.h>
00039 #include <qvaluelist.h>
00040 #include <qdatetime.h>
00041 #include <qdialog.h>
00042 
00043 
00044 namespace Opie {
00045 namespace Ui   {
00046 
00058 class OTimePicker : public QWidget
00059 {
00060     Q_OBJECT
00061 
00062 public:
00063     OTimePicker(QWidget* parent = 0, const char* name = 0, WFlags fl = 0);
00064 
00065 public slots:
00066     void setHour(int h);
00067     void setMinute(int m);
00068     void setTime( const QTime& );
00069     void setTime( int h,  int m );
00070 
00071 public:
00072     QTime time()const;
00073 
00074 private:
00075     QValueList<OClickableLabel *> hourLst;
00076     QValueList<OClickableLabel *> minuteLst;
00077     QTime tm;
00078     struct Private;
00079     Private *d;
00080 
00081 private slots:
00082     void slotHour(bool b);
00083     void slotMinute(bool b);
00084 
00085 signals:
00089     void timeChanged(const QTime &);
00090 };
00091 
00100 class OTimePickerDialog: public OTimePickerDialogBase
00101 {
00102     Q_OBJECT
00103 
00104 public:
00105     OTimePickerDialog ( QWidget* parent = 0, const char* name = NULL, WFlags fl = 0 );
00106     ~OTimePickerDialog() { };
00107 
00108     QTime time()const;
00109 
00110 public slots:
00111     void setTime( const QTime& time );
00112     void setHour( const QString& hour );
00113     void setMinute( const QString& minute );
00114 
00115 private:
00116     OTimePicker *m_timePicker;
00117     QTime m_time;
00118     class Private;
00119     Private* d;
00120 };
00121 
00122 }
00123 }
00124 
00125 /* for Qt2  */
00126 #if ( QT_VERSION-0 >= 0x030000 )
00127 #error "Fix the UI File to use namespaces"
00128 #endif
00129 #endif

Generated on Sat Nov 5 16:16:28 2005 for OPIE by  doxygen 1.4.2