summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebook.h
Unidiff
Diffstat (limited to 'core/pim/datebook/datebook.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/pim/datebook/datebook.h b/core/pim/datebook/datebook.h
index 44627bb..fcdbfec 100644
--- a/core/pim/datebook/datebook.h
+++ b/core/pim/datebook/datebook.h
@@ -1,111 +1,117 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef DATEBOOK_H 20#ifndef DATEBOOK_H
21#define DATEBOOK_H 21#define DATEBOOK_H
22 22
23#include <qpe/datebookdb.h> 23#include <qpe/datebookdb.h>
24 24
25#include <qmainwindow.h> 25#include <qmainwindow.h>
26 26
27class QAction; 27class QAction;
28class QWidgetStack; 28class QWidgetStack;
29class DateBookDay; 29class DateBookDay;
30class DateBookWeek; 30class DateBookWeek;
31class DateBookWeekLst;
31class DateBookMonth; 32class DateBookMonth;
32class Event; 33class Event;
33class QDate; 34class QDate;
34class Ir; 35class Ir;
35 36
36class DateBook : public QMainWindow 37class DateBook : public QMainWindow
37{ 38{
38 Q_OBJECT 39 Q_OBJECT
39 40
40public: 41public:
41 DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 42 DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
42 ~DateBook(); 43 ~DateBook();
43 44
44signals: 45signals:
45 void newEvent(); 46 void newEvent();
46 void signalNotFound(); 47 void signalNotFound();
47 void signalWrapAround(); 48 void signalWrapAround();
48 49
49protected: 50protected:
50 QDate currentDate(); 51 QDate currentDate();
51 void timerEvent( QTimerEvent *e ); 52 void timerEvent( QTimerEvent *e );
52 void closeEvent( QCloseEvent *e ); 53 void closeEvent( QCloseEvent *e );
53 54
54public slots: 55public slots:
55 void flush(); 56 void flush();
56 void reload(); 57 void reload();
57 58
58private slots: 59private slots:
59 void fileNew(); 60 void fileNew();
61 void slotNewEntry(const QDateTime &start, const QDateTime &end, const QString &str);
60 void slotSettings(); 62 void slotSettings();
63 void newDefaultView(QAction *a);
61 void slotToday();// view today 64 void slotToday();// view today
62 void changeClock( bool newClock ); 65 void changeClock( bool newClock );
63 void changeWeek( bool newDay ); 66 void changeWeek( bool newDay );
64 void appMessage(const QCString& msg, const QByteArray& data); 67 void appMessage(const QCString& msg, const QByteArray& data);
65 // handle key events in the day view... 68 // handle key events in the day view...
66 void slotNewEventFromKey( const QString &str ); 69 void slotNewEventFromKey( const QString &str );
67 void slotFind(); 70 void slotFind();
68 void slotDoFind( const QString &, const QDate &, bool, bool, int ); 71 void slotDoFind( const QString &, const QDate &, bool, bool, int );
69 72
70 void viewDay(); 73 void viewDay();
71 void viewWeek(); 74 void viewWeek();
75 void viewWeekLst();
72 void viewMonth(); 76 void viewMonth();
73 77
74 void showDay( int y, int m, int d ); 78 void showDay( int y, int m, int d );
75 79
76 void editEvent( const Event &e ); 80 void editEvent( const Event &e );
77 void removeEvent( const Event &e ); 81 void removeEvent( const Event &e );
78 82
79 void receive( const QCString &msg, const QByteArray &data ); 83 void receive( const QCString &msg, const QByteArray &data );
80 void setDocument( const QString & ); 84 void setDocument( const QString & );
81 void beamEvent( const Event &e ); 85 void beamEvent( const Event &e );
82 void beamDone( Ir *ir ); 86 void beamDone( Ir *ir );
83 87
84private: 88private:
85 void addEvent( const Event &e ); 89 void addEvent( const Event &e );
86 void initDay(); 90 void initDay();
87 void initWeek(); 91 void initWeek();
92 void initWeekLst();
88 void initMonth(); 93 void initMonth();
89 void loadSettings(); 94 void loadSettings();
90 void saveSettings(); 95 void saveSettings();
91 96
92private: 97private:
93 DateBookDB *db; 98 DateBookDB *db;
94 QWidgetStack *views; 99 QWidgetStack *views;
95 DateBookDay *dayView; 100 DateBookDay *dayView;
96 DateBookWeek *weekView; 101 DateBookWeek *weekView;
97 DateBookMonth *monthView; 102 DateBookMonth *monthView;
98 QAction *dayAction, *weekAction, *monthAction; 103 DateBookWeekLst *weekLstView;
104 QAction *dayAction, *weekAction, *weekLstAction, *monthAction;
99 bool aPreset; // have everything set to alarm? 105 bool aPreset; // have everything set to alarm?
100 int presetTime; // the standard time for the alarm 106 int presetTime; // the standard time for the alarm
101 int startTime; 107 int startTime;
102 bool ampm; 108 bool ampm;
103 bool onMonday; 109 bool onMonday;
104 110
105 bool syncing; 111 bool syncing;
106 bool inSearch; 112 bool inSearch;
107 113
108 QString checkEvent(const Event &); 114 QString checkEvent(const Event &);
109}; 115};
110 116
111#endif 117#endif