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.h111
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
27class QAction;
28class QWidgetStack;
29class DateBookDay;
30class DateBookWeek;
31class DateBookMonth;
32class Event;
33class QDate;
34class Ir;
35
36class DateBook : public QMainWindow
37{
38 Q_OBJECT
39
40public:
41 DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
42 ~DateBook();
43
44signals:
45 void newEvent();
46 void signalNotFound();
47 void signalWrapAround();
48
49protected:
50 QDate currentDate();
51 void timerEvent( QTimerEvent *e );
52 void closeEvent( QCloseEvent *e );
53
54public slots:
55 void flush();
56 void reload();
57
58private 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
84private:
85 void addEvent( const Event &e );
86 void initDay();
87 void initWeek();
88 void initMonth();
89 void loadSettings();
90 void saveSettings();
91
92private:
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