summaryrefslogtreecommitdiff
path: root/core/pim/todo/taskeditoralarms.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/taskeditoralarms.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/taskeditoralarms.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/todo/taskeditoralarms.cpp b/core/pim/todo/taskeditoralarms.cpp
index a512fb0..62fc600 100644
--- a/core/pim/todo/taskeditoralarms.cpp
+++ b/core/pim/todo/taskeditoralarms.cpp
@@ -17,48 +17,49 @@
17..}^=.=       =       ; Library General Public License for more 17..}^=.=       =       ; Library General Public License for more
18++=   -.     .`     .: details. 18++=   -.     .`     .: details.
19 :     =  ...= . :.=- 19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU 20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = General Public License along with 21  -_. . .   )=.  = General Public License along with
22    --        :-=` this library; see the file COPYING.LIB. 22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include "taskeditoralarms.h" 29#include "taskeditoralarms.h"
30 30
31#include <opie2/opimnotifymanager.h> 31#include <opie2/opimnotifymanager.h>
32#include <opie2/otimepicker.h> 32#include <opie2/otimepicker.h>
33 33
34#include <qpe/datebookmonth.h> 34#include <qpe/datebookmonth.h>
35#include <qpe/resource.h> 35#include <qpe/resource.h>
36 36
37#include <qlistview.h> 37#include <qlistview.h>
38#include <qlayout.h> 38#include <qlayout.h>
39 39
40 40
41using namespace Opie::Ui;
41class AlarmItem : public QListViewItem { 42class AlarmItem : public QListViewItem {
42public: 43public:
43 AlarmItem( QListView*, const OPimAlarm& ); 44 AlarmItem( QListView*, const OPimAlarm& );
44 ~AlarmItem(); 45 ~AlarmItem();
45 46
46 OPimAlarm alarm()const; 47 OPimAlarm alarm()const;
47 void setAlarm( const OPimAlarm& ); 48 void setAlarm( const OPimAlarm& );
48private: 49private:
49 QDateTime m_dt; 50 QDateTime m_dt;
50 int m_type; 51 int m_type;
51}; 52};
52AlarmItem::AlarmItem( QListView* view, const OPimAlarm& dt) 53AlarmItem::AlarmItem( QListView* view, const OPimAlarm& dt)
53 : QListViewItem(view) { 54 : QListViewItem(view) {
54 setAlarm( dt ); 55 setAlarm( dt );
55} 56}
56void AlarmItem::setAlarm( const OPimAlarm& dt ) { 57void AlarmItem::setAlarm( const OPimAlarm& dt ) {
57 m_dt = dt.dateTime(); 58 m_dt = dt.dateTime();
58 m_type = dt.sound(); 59 m_type = dt.sound();
59 setText( 0, TimeString::dateString( m_dt.date() ) ); 60 setText( 0, TimeString::dateString( m_dt.date() ) );
60 setText( 1, TimeString::timeString( m_dt.time() ) ); 61 setText( 1, TimeString::timeString( m_dt.time() ) );
61 setText( 2, m_type == 0 ? QObject::tr("silent") : QObject::tr("loud") ); 62 setText( 2, m_type == 0 ? QObject::tr("silent") : QObject::tr("loud") );
62} 63}
63AlarmItem::~AlarmItem() { 64AlarmItem::~AlarmItem() {
64} 65}