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.h37
1 files changed, 3 insertions, 34 deletions
diff --git a/core/pim/datebook/datebook.h b/core/pim/datebook/datebook.h
index 54ffcfb..3d7f5b5 100644
--- a/core/pim/datebook/datebook.h
+++ b/core/pim/datebook/datebook.h
@@ -11,73 +11,42 @@
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 "datebooktypes.h"
24
23#include <qpe/datebookdb.h> 25#include <qpe/datebookdb.h>
24 26
25#include <qmainwindow.h> 27#include <qmainwindow.h>
26 28
27enum { DAY=1,WEEK,WEEKLST,MONTH }; // defaultView values 29enum { DAY=1,WEEK,WEEKLST,MONTH }; // defaultView values
28enum { NONE=0,NORMAL,EXTENDED }; // WeekLstView's modes. 30enum { NONE=0,NORMAL,EXTENDED }; // WeekLstView's modes.
29 31
30class QAction; 32class QAction;
31class QWidgetStack; 33class QWidgetStack;
32class DateBookDay; 34class DateBookDay;
33class DateBookWeek; 35class DateBookWeek;
34class DateBookWeekLst; 36class DateBookWeekLst;
35class DateBookMonth; 37class DateBookMonth;
36class Event; 38class Event;
37class QDate; 39class QDate;
38class Ir; 40class Ir;
39class QLibrary;
40
41namespace Opie {
42namespace Datebook {
43 class HolidayPlugin;
44 class HolidayPluginIf;
45}
46}
47
48class DateBookDBHack : public DateBookDB {
49 public:
50 Event eventByUID(int id);
51};
52
53class DateBookHoliday
54{
55public:
56 DateBookHoliday();
57 virtual ~DateBookHoliday();
58
59 QStringList holidaylist(const QDate&);
60 QStringList holidaylist(unsigned year, unsigned month, unsigned day);
61protected:
62 void init();
63 void deinit();
64
65 struct HPlugin {
66 Opie::Datebook::HolidayPlugin*_plugin;
67 QLibrary*_lib;
68 Opie::Datebook::HolidayPluginIf*_if;
69 };
70 QValueList<HPlugin*>_pluginlist;
71};
72 41
73class DateBook : public QMainWindow 42class DateBook : public QMainWindow
74{ 43{
75 Q_OBJECT 44 Q_OBJECT
76 45
77public: 46public:
78 static QString appName() { return QString::fromLatin1("datebook"); } 47 static QString appName() { return QString::fromLatin1("datebook"); }
79 DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 48 DateBook( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
80 ~DateBook(); 49 ~DateBook();
81 50
82signals: 51signals:
83 void newEvent(); 52 void newEvent();
@@ -128,25 +97,25 @@ private slots:
128 void beamDone( Ir *ir ); 97 void beamDone( Ir *ir );
129 98
130private: 99private:
131 void addEvent( const Event &e ); 100 void addEvent( const Event &e );
132 void initDay(); 101 void initDay();
133 void initWeek(); 102 void initWeek();
134 void initWeekLst(); 103 void initWeekLst();
135 void initMonth(); 104 void initMonth();
136 void loadSettings(); 105 void loadSettings();
137 void saveSettings(); 106 void saveSettings();
138 107
139private: 108private:
140 DateBookDBHack *db; 109 DateBookDBHoliday *db;
141 DateBookHoliday*db_holiday; 110 DateBookHoliday*db_holiday;
142 QWidgetStack *views; 111 QWidgetStack *views;
143 DateBookDay *dayView; 112 DateBookDay *dayView;
144 DateBookWeek *weekView; 113 DateBookWeek *weekView;
145 DateBookMonth *monthView; 114 DateBookMonth *monthView;
146 DateBookWeekLst *weekLstView; 115 DateBookWeekLst *weekLstView;
147 QAction *dayAction, *weekAction, *weekLstAction, *monthAction; 116 QAction *dayAction, *weekAction, *weekLstAction, *monthAction;
148 int weeklistviewconfig; 117 int weeklistviewconfig;
149 bool aPreset; // have everything set to alarm? 118 bool aPreset; // have everything set to alarm?
150 int presetTime; // the standard time for the alarm 119 int presetTime; // the standard time for the alarm
151 int startTime; 120 int startTime;
152 int rowStyle; 121 int rowStyle;