Diffstat (limited to 'core/pim/datebook/datebookweeklst.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweeklst.h | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h index 32fa23f..3bc7f2f 100644 --- a/core/pim/datebook/datebookweeklst.h +++ b/core/pim/datebook/datebookweeklst.h | |||
@@ -1,13 +1,13 @@ | |||
1 | #ifndef DATEBOOKWEEKLST | 1 | #ifndef DATEBOOKWEEKLST |
2 | #define DATEBOOKWEEKLST | 2 | #define DATEBOOKWEEKLST |
3 | 3 | ||
4 | #include <qwidget.h> | 4 | #include <qwidget.h> |
5 | #include <qdatetime.h> | 5 | #include <qdatetime.h> |
6 | #include <qpe/event.h> | 6 | #include <qpe/event.h> |
7 | #include <qlabel.h> | 7 | #include <qlabel.h> |
8 | #include <qscrollview.h> | 8 | #include <qscrollview.h> |
9 | 9 | ||
10 | #include "datebookweeklstheader.h" | 10 | #include "datebookweeklstheader.h" |
11 | #include "datebookweeklstdayhdr.h" | 11 | #include "datebookweeklstdayhdr.h" |
12 | 12 | ||
13 | #include <opie2/oclickablelabel.h> | 13 | #include <opie2/oclickablelabel.h> |
@@ -16,17 +16,17 @@ class QDateTime; | |||
16 | class DateBookDB; | 16 | class DateBookDB; |
17 | 17 | ||
18 | class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase | 18 | class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase |
19 | { | 19 | { |
20 | Q_OBJECT | 20 | Q_OBJECT |
21 | public: | 21 | public: |
22 | DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0, | 22 | DateBookWeekLstHeader(bool onM, QWidget* parent = 0, const char* name = 0, |
23 | WFlags fl = 0 ); | 23 | WFlags fl = 0 ); |
24 | ~DateBookWeekLstHeader(); | 24 | ~DateBookWeekLstHeader(); |
25 | void setDate(const QDate &d); | 25 | void setDate(const QDate &d); |
26 | 26 | ||
27 | public slots: | 27 | public slots: |
28 | void nextWeek(); | 28 | void nextWeek(); |
29 | void prevWeek(); | 29 | void prevWeek(); |
30 | void nextMonth(); | 30 | void nextMonth(); |
31 | void prevMonth(); | 31 | void prevMonth(); |
32 | void pickDate(); | 32 | void pickDate(); |
@@ -42,50 +42,64 @@ private: | |||
42 | 42 | ||
43 | class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase | 43 | class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase |
44 | { | 44 | { |
45 | Q_OBJECT | 45 | Q_OBJECT |
46 | public: | 46 | public: |
47 | DateBookWeekLstDayHdr(const QDate &d, bool onM, | 47 | DateBookWeekLstDayHdr(const QDate &d, bool onM, |
48 | QWidget* parent = 0, const char* name = 0, | 48 | QWidget* parent = 0, const char* name = 0, |
49 | WFlags fl = 0 ); | 49 | WFlags fl = 0 ); |
50 | public slots: | 50 | public slots: |
51 | void showDay(); | 51 | void showDay(); |
52 | void newEvent(); | 52 | void newEvent(); |
53 | signals: | 53 | signals: |
54 | void showDate(int y, int m, int d); | 54 | void showDate(int y, int m, int d); |
55 | void addEvent(const QDateTime &start, const QDateTime &stop, | 55 | void addEvent(const QDateTime &start, const QDateTime &stop, |
56 | const QString &str, const QString &location); | 56 | const QString &str, const QString &location); |
57 | private: | 57 | private: |
58 | QDate date; | 58 | QDate date; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel | 61 | class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel |
62 | { | 62 | { |
63 | Q_OBJECT | 63 | Q_OBJECT |
64 | public: | 64 | public: |
65 | DateBookWeekLstEvent(const EffectiveEvent &ev, int weeklistviewconfig =1, | 65 | DateBookWeekLstEvent(const EffectiveEvent &ev, int weeklistviewconfig =1, |
66 | QWidget* parent = 0, const char* name = 0, | 66 | QWidget* parent = 0, const char* name = 0, |
67 | WFlags fl = 0); | 67 | WFlags fl = 0); |
68 | signals: | 68 | signals: |
69 | void editEvent(const Event &e); | 69 | void editEvent(const Event &e); |
70 | void duplicateEvent(const Event &e); | ||
71 | void removeEvent(const Event &e); | ||
72 | void beamEvent(const Event &e); | ||
73 | void redraw(); | ||
70 | private slots: | 74 | private slots: |
71 | void editMe(); | 75 | void editMe(); |
76 | void duplicateMe(); | ||
77 | void deleteMe(); | ||
78 | void beamMe(); | ||
72 | private: | 79 | private: |
73 | const EffectiveEvent event; | 80 | const EffectiveEvent event; |
81 | QPopupMenu* popmenue; | ||
82 | protected: | ||
83 | void mousePressEvent( QMouseEvent *e ); | ||
74 | }; | 84 | }; |
75 | 85 | ||
76 | class DateBookWeekLstView: public QWidget | 86 | class DateBookWeekLstView: public QWidget |
77 | { | 87 | { |
78 | Q_OBJECT | 88 | Q_OBJECT |
79 | public: | 89 | public: |
80 | DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, | 90 | DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, |
81 | QWidget* parent = 0, const char* name = 0, | 91 | QWidget* parent = 0, const char* name = 0, |
82 | WFlags fl = 0 ); | 92 | WFlags fl = 0 ); |
83 | ~DateBookWeekLstView(); | 93 | ~DateBookWeekLstView(); |
84 | signals: | 94 | signals: |
85 | void editEvent(const Event &e); | 95 | void editEvent(const Event &e); |
96 | void duplicateEvent(const Event &e); | ||
97 | void removeEvent(const Event &e); | ||
98 | void beamEvent(const Event &e); | ||
99 | void redraw(); | ||
86 | void showDate(int y, int m, int d); | 100 | void showDate(int y, int m, int d); |
87 | void addEvent(const QDateTime &start, const QDateTime &stop, | 101 | void addEvent(const QDateTime &start, const QDateTime &stop, |
88 | const QString &str, const QString &location); | 102 | const QString &str, const QString &location); |
89 | private: | 103 | private: |
90 | bool bStartOnMonday; | 104 | bool bStartOnMonday; |
91 | protected slots: | 105 | protected slots: |
@@ -99,12 +113,16 @@ public: | |||
99 | QValueList<EffectiveEvent> &ev2, | 113 | QValueList<EffectiveEvent> &ev2, |
100 | QDate &d, bool onM, | 114 | QDate &d, bool onM, |
101 | QWidget* parent = 0, const char* name = 0, | 115 | QWidget* parent = 0, const char* name = 0, |
102 | WFlags fl = 0 ); | 116 | WFlags fl = 0 ); |
103 | signals: | 117 | signals: |
104 | void editEvent(const Event &e); | 118 | void editEvent(const Event &e); |
119 | void duplicateEvent(const Event &e); | ||
120 | void removeEvent(const Event &e); | ||
121 | void beamEvent(const Event &e); | ||
122 | void redraw(); | ||
105 | void showDate(int y, int m, int d); | 123 | void showDate(int y, int m, int d); |
106 | void addEvent(const QDateTime &start, const QDateTime &stop, | 124 | void addEvent(const QDateTime &start, const QDateTime &stop, |
107 | const QString &str, const QString &location); | 125 | const QString &str, const QString &location); |
108 | }; | 126 | }; |
109 | 127 | ||
110 | class DateBookWeekLst : public QWidget | 128 | class DateBookWeekLst : public QWidget |
@@ -132,12 +150,15 @@ protected slots: | |||
132 | 150 | ||
133 | signals: | 151 | signals: |
134 | void showDate(int y, int m, int d); | 152 | void showDate(int y, int m, int d); |
135 | void addEvent(const QDateTime &start, const QDateTime &stop, | 153 | void addEvent(const QDateTime &start, const QDateTime &stop, |
136 | const QString &str, const QString &location); | 154 | const QString &str, const QString &location); |
137 | void editEvent(const Event &e); | 155 | void editEvent(const Event &e); |
156 | void duplicateEvent(const Event &e); | ||
157 | void removeEvent(const Event &e); | ||
158 | void beamEvent(const Event &e); | ||
138 | 159 | ||
139 | private: | 160 | private: |
140 | DateBookDB *db; | 161 | DateBookDB *db; |
141 | int startTime; | 162 | int startTime; |
142 | bool ampm; | 163 | bool ampm; |
143 | bool bStartOnMonday; | 164 | bool bStartOnMonday; |