author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /core/pim/datebook/datebook.h | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
-rw-r--r-- | core/pim/datebook/datebook.h | 111 |
1 files changed, 111 insertions, 0 deletions
diff --git a/core/pim/datebook/datebook.h b/core/pim/datebook/datebook.h new file mode 100644 index 0000000..44627bb --- a/dev/null +++ b/core/pim/datebook/datebook.h | |||
@@ -0,0 +1,111 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
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 | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
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. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | #ifndef DATEBOOK_H | ||
21 | #define DATEBOOK_H | ||
22 | |||
23 | #include <qpe/datebookdb.h> | ||
24 | |||
25 | #include <qmainwindow.h> | ||
26 | |||
27 | class QAction; | ||
28 | class QWidgetStack; | ||
29 | class DateBookDay; | ||
30 | class DateBookWeek; | ||
31 | class DateBookMonth; | ||
32 | class Event; | ||
33 | class QDate; | ||
34 | class Ir; | ||
35 | |||
36 | class DateBook : public QMainWindow | ||
37 | { | ||
38 | Q_OBJECT | ||
39 | |||
40 | public: | ||
41 | DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | ||
42 | ~DateBook(); | ||
43 | |||
44 | signals: | ||
45 | void newEvent(); | ||
46 | void signalNotFound(); | ||
47 | void signalWrapAround(); | ||
48 | |||
49 | protected: | ||
50 | QDate currentDate(); | ||
51 | void timerEvent( QTimerEvent *e ); | ||
52 | void closeEvent( QCloseEvent *e ); | ||
53 | |||
54 | public slots: | ||
55 | void flush(); | ||
56 | void reload(); | ||
57 | |||
58 | private slots: | ||
59 | void fileNew(); | ||
60 | void slotSettings(); | ||
61 | void slotToday();// view today | ||
62 | void changeClock( bool newClock ); | ||
63 | void changeWeek( bool newDay ); | ||
64 | void appMessage(const QCString& msg, const QByteArray& data); | ||
65 | // handle key events in the day view... | ||
66 | void slotNewEventFromKey( const QString &str ); | ||
67 | void slotFind(); | ||
68 | void slotDoFind( const QString &, const QDate &, bool, bool, int ); | ||
69 | |||
70 | void viewDay(); | ||
71 | void viewWeek(); | ||
72 | void viewMonth(); | ||
73 | |||
74 | void showDay( int y, int m, int d ); | ||
75 | |||
76 | void editEvent( const Event &e ); | ||
77 | void removeEvent( const Event &e ); | ||
78 | |||
79 | void receive( const QCString &msg, const QByteArray &data ); | ||
80 | void setDocument( const QString & ); | ||
81 | void beamEvent( const Event &e ); | ||
82 | void beamDone( Ir *ir ); | ||
83 | |||
84 | private: | ||
85 | void addEvent( const Event &e ); | ||
86 | void initDay(); | ||
87 | void initWeek(); | ||
88 | void initMonth(); | ||
89 | void loadSettings(); | ||
90 | void saveSettings(); | ||
91 | |||
92 | private: | ||
93 | DateBookDB *db; | ||
94 | QWidgetStack *views; | ||
95 | DateBookDay *dayView; | ||
96 | DateBookWeek *weekView; | ||
97 | DateBookMonth *monthView; | ||
98 | QAction *dayAction, *weekAction, *monthAction; | ||
99 | bool aPreset; // have everything set to alarm? | ||
100 | int presetTime; // the standard time for the alarm | ||
101 | int startTime; | ||
102 | bool ampm; | ||
103 | bool onMonday; | ||
104 | |||
105 | bool syncing; | ||
106 | bool inSearch; | ||
107 | |||
108 | QString checkEvent(const Event &); | ||
109 | }; | ||
110 | |||
111 | #endif | ||