summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweeklst.h
Unidiff
Diffstat (limited to 'core/pim/datebook/datebookweeklst.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookweeklst.h93
1 files changed, 47 insertions, 46 deletions
diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h
index 3bc7f2f..38d7777 100644
--- a/core/pim/datebook/datebookweeklst.h
+++ b/core/pim/datebook/datebookweeklst.h
@@ -11,63 +11,64 @@
11#include "datebookweeklstdayhdr.h" 11#include "datebookweeklstdayhdr.h"
12 12
13#include <opie2/oclickablelabel.h> 13#include <opie2/oclickablelabel.h>
14 14
15class QDateTime; 15class QDateTime;
16class DateBookDB; 16class DateBookDB;
17class DateBookDBHoliday;
17 18
18class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase 19class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase
19{ 20{
20 Q_OBJECT 21 Q_OBJECT
21public: 22public:
22 DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0, 23 DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0,
23 WFlags fl = 0 ); 24 WFlags fl = 0 );
24 ~DateBookWeekLstHeader(); 25 ~DateBookWeekLstHeader();
25 void setDate(const QDate &d); 26 void setDate(const QDate &d);
26 27
27public slots: 28public slots:
28 void nextWeek(); 29 void nextWeek();
29 void prevWeek(); 30 void prevWeek();
30 void nextMonth(); 31 void nextMonth();
31 void prevMonth(); 32 void prevMonth();
32 void pickDate(); 33 void pickDate();
33 void setDate(int y, int m, int d); 34 void setDate(int y, int m, int d);
34signals: 35signals:
35 void dateChanged(QDate &newdate); 36 void dateChanged(QDate &newdate);
36 void setDbl(bool on); 37 void setDbl(bool on);
37private: 38private:
38 QDate date; 39 QDate date;
39 //bool onMonday; 40// bool onMonday;
40 bool bStartOnMonday; 41 bool bStartOnMonday;
41}; 42};
42 43
43class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase 44class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase
44{ 45{
45 Q_OBJECT 46 Q_OBJECT
46public: 47public:
47 DateBookWeekLstDayHdr(const QDate &d, bool onM, 48 DateBookWeekLstDayHdr(const QDate &d, bool onM,
48 QWidget* parent = 0, const char* name = 0, 49 QWidget* parent = 0, const char* name = 0,
49 WFlags fl = 0 ); 50 WFlags fl = 0 );
50public slots: 51public slots:
51 void showDay(); 52 void showDay();
52 void newEvent(); 53 void newEvent();
53signals: 54signals:
54 void showDate(int y, int m, int d); 55 void showDate(int y, int m, int d);
55 void addEvent(const QDateTime &start, const QDateTime &stop, 56 void addEvent(const QDateTime &start, const QDateTime &stop,
56 const QString &str, const QString &location); 57 const QString &str, const QString &location);
57private: 58private:
58 QDate date; 59 QDate date;
59}; 60};
60 61
61class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel 62class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel
62{ 63{
63 Q_OBJECT 64 Q_OBJECT
64public: 65public:
65 DateBookWeekLstEvent(const EffectiveEvent &ev, int weeklistviewconfig =1, 66 DateBookWeekLstEvent(const EffectiveEvent &ev, int weeklistviewconfig =1,
66 QWidget* parent = 0, const char* name = 0, 67 QWidget* parent = 0, const char* name = 0,
67 WFlags fl = 0); 68 WFlags fl = 0);
68signals: 69signals:
69 void editEvent(const Event &e); 70 void editEvent(const Event &e);
70 void duplicateEvent(const Event &e); 71 void duplicateEvent(const Event &e);
71 void removeEvent(const Event &e); 72 void removeEvent(const Event &e);
72 void beamEvent(const Event &e); 73 void beamEvent(const Event &e);
73 void redraw(); 74 void redraw();
@@ -85,57 +86,57 @@ protected:
85 86
86class DateBookWeekLstView: public QWidget 87class DateBookWeekLstView: public QWidget
87{ 88{
88 Q_OBJECT 89 Q_OBJECT
89public: 90public:
90 DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, 91 DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM,
91 QWidget* parent = 0, const char* name = 0, 92 QWidget* parent = 0, const char* name = 0,
92 WFlags fl = 0 ); 93 WFlags fl = 0 );
93 ~DateBookWeekLstView(); 94 ~DateBookWeekLstView();
94signals: 95signals:
95 void editEvent(const Event &e); 96 void editEvent(const Event &e);
96 void duplicateEvent(const Event &e); 97 void duplicateEvent(const Event &e);
97 void removeEvent(const Event &e); 98 void removeEvent(const Event &e);
98 void beamEvent(const Event &e); 99 void beamEvent(const Event &e);
99 void redraw(); 100 void redraw();
100 void showDate(int y, int m, int d); 101 void showDate(int y, int m, int d);
101 void addEvent(const QDateTime &start, const QDateTime &stop, 102 void addEvent(const QDateTime &start, const QDateTime &stop,
102 const QString &str, const QString &location); 103 const QString &str, const QString &location);
103private: 104private:
104 bool bStartOnMonday; 105 bool bStartOnMonday;
105protected slots: 106protected slots:
106 void keyPressEvent(QKeyEvent *); 107 void keyPressEvent(QKeyEvent *);
107}; 108};
108 109
109class DateBookWeekLstDblView: public QWidget { 110class DateBookWeekLstDblView: public QWidget {
110 Q_OBJECT 111 Q_OBJECT
111public: 112public:
112 DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, 113 DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
113 QValueList<EffectiveEvent> &ev2, 114 QValueList<EffectiveEvent> &ev2,
114 QDate &d, bool onM, 115 QDate &d, bool onM,
115 QWidget* parent = 0, const char* name = 0, 116 QWidget* parent = 0, const char* name = 0,
116 WFlags fl = 0 ); 117 WFlags fl = 0 );
117signals: 118signals:
118 void editEvent(const Event &e); 119 void editEvent(const Event &e);
119 void duplicateEvent(const Event &e); 120 void duplicateEvent(const Event &e);
120 void removeEvent(const Event &e); 121 void removeEvent(const Event &e);
121 void beamEvent(const Event &e); 122 void beamEvent(const Event &e);
122 void redraw(); 123 void redraw();
123 void showDate(int y, int m, int d); 124 void showDate(int y, int m, int d);
124 void addEvent(const QDateTime &start, const QDateTime &stop, 125 void addEvent(const QDateTime &start, const QDateTime &stop,
125 const QString &str, const QString &location); 126 const QString &str, const QString &location);
126}; 127};
127 128
128class DateBookWeekLst : public QWidget 129class DateBookWeekLst : public QWidget
129{ 130{
130 Q_OBJECT 131 Q_OBJECT
131 132
132public: 133public:
133 DateBookWeekLst( bool ampm, bool onM, DateBookDB *newDB, 134 DateBookWeekLst( bool ampm, bool onM, DateBookDBHoliday *newDB,
134 QWidget *parent = 0, 135 QWidget *parent = 0,
135 const char *name = 0 ); 136 const char *name = 0 );
136 ~DateBookWeekLst(); 137 ~DateBookWeekLst();
137 void setDate( int y, int w ); 138 void setDate( int y, int w );
138 void setDate(const QDate &d ); 139 void setDate(const QDate &d );
139 int week() const { return _week; }; 140 int week() const { return _week; };
140 QDate date(); 141 QDate date();
141 QDate weekDate() const; 142 QDate weekDate() const;
@@ -146,27 +147,27 @@ public slots:
146 147
147protected slots: 148protected slots:
148 void keyPressEvent(QKeyEvent *); 149 void keyPressEvent(QKeyEvent *);
149 void setDbl(bool on); 150 void setDbl(bool on);
150 151
151signals: 152signals:
152 void showDate(int y, int m, int d); 153 void showDate(int y, int m, int d);
153 void addEvent(const QDateTime &start, const QDateTime &stop, 154 void addEvent(const QDateTime &start, const QDateTime &stop,
154 const QString &str, const QString &location); 155 const QString &str, const QString &location);
155 void editEvent(const Event &e); 156 void editEvent(const Event &e);
156 void duplicateEvent(const Event &e); 157 void duplicateEvent(const Event &e);
157 void removeEvent(const Event &e); 158 void removeEvent(const Event &e);
158 void beamEvent(const Event &e); 159 void beamEvent(const Event &e);
159 160
160private: 161private:
161 DateBookDB *db; 162 DateBookDBHoliday *db;
162 int startTime; 163 int startTime;
163 bool ampm; 164 bool ampm;
164 bool bStartOnMonday; 165 bool bStartOnMonday;
165 bool dbl; 166 bool dbl;
166 QDate bdate; 167 QDate bdate;
167 int year, _week,dow; 168 int year, _week,dow;
168 DateBookWeekLstHeader *header; 169 DateBookWeekLstHeader *header;
169 QWidget *view; 170 QWidget *view;
170 QVBoxLayout *layout; 171 QVBoxLayout *layout;
171 QScrollView *scroll; 172 QScrollView *scroll;
172 173