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.h35
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,116 +1,134 @@
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>
14 14
15class QDateTime; 15class QDateTime;
16class DateBookDB; 16class DateBookDB;
17 17
18class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase 18class DateBookWeekLstHeader: public DateBookWeekLstHeaderBase
19{ 19{
20 Q_OBJECT 20 Q_OBJECT
21public: 21public:
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
27public slots: 27public 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();
33 void setDate(int y, int m, int d); 33 void setDate(int y, int m, int d);
34signals: 34signals:
35 void dateChanged(QDate &newdate); 35 void dateChanged(QDate &newdate);
36 void setDbl(bool on); 36 void setDbl(bool on);
37private: 37private:
38 QDate date; 38 QDate date;
39 //bool onMonday; 39 //bool onMonday;
40 bool bStartOnMonday; 40 bool bStartOnMonday;
41}; 41};
42 42
43class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase 43class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase
44{ 44{
45 Q_OBJECT 45 Q_OBJECT
46public: 46public:
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 );
50public slots: 50public slots:
51 void showDay(); 51 void showDay();
52 void newEvent(); 52 void newEvent();
53signals: 53signals:
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);
57private: 57private:
58 QDate date; 58 QDate date;
59}; 59};
60 60
61class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel 61class DateBookWeekLstEvent: public Opie::Ui::OClickableLabel
62{ 62{
63 Q_OBJECT 63 Q_OBJECT
64public: 64public:
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);
68signals: 68signals:
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();
70private slots: 74private slots:
71 void editMe(); 75 void editMe();
76 void duplicateMe();
77 void deleteMe();
78 void beamMe();
72private: 79private:
73 const EffectiveEvent event; 80 const EffectiveEvent event;
81 QPopupMenu* popmenue;
82protected:
83 void mousePressEvent( QMouseEvent *e );
74}; 84};
75 85
76class DateBookWeekLstView: public QWidget 86class DateBookWeekLstView: public QWidget
77{ 87{
78 Q_OBJECT 88 Q_OBJECT
79public: 89public:
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();
84signals: 94signals:
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);
89private: 103private:
90 bool bStartOnMonday; 104 bool bStartOnMonday;
91protected slots: 105protected slots:
92 void keyPressEvent(QKeyEvent *); 106 void keyPressEvent(QKeyEvent *);
93}; 107};
94 108
95class DateBookWeekLstDblView: public QWidget { 109class DateBookWeekLstDblView: public QWidget {
96 Q_OBJECT 110 Q_OBJECT
97public: 111public:
98 DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, 112 DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
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 );
103signals: 117signals:
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
110class DateBookWeekLst : public QWidget 128class DateBookWeekLst : public QWidget
111{ 129{
112 Q_OBJECT 130 Q_OBJECT
113 131
114public: 132public:
115 DateBookWeekLst( bool ampm, bool onM, DateBookDB *newDB, 133 DateBookWeekLst( bool ampm, bool onM, DateBookDB *newDB,
116 QWidget *parent = 0, 134 QWidget *parent = 0,
@@ -126,24 +144,27 @@ public slots:
126 void redraw(); 144 void redraw();
127 void dateChanged(QDate &date); 145 void dateChanged(QDate &date);
128 146
129protected slots: 147protected slots:
130 void keyPressEvent(QKeyEvent *); 148 void keyPressEvent(QKeyEvent *);
131 void setDbl(bool on); 149 void setDbl(bool on);
132 150
133signals: 151signals:
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
139private: 160private:
140 DateBookDB *db; 161 DateBookDB *db;
141 int startTime; 162 int startTime;
142 bool ampm; 163 bool ampm;
143 bool bStartOnMonday; 164 bool bStartOnMonday;
144 bool dbl; 165 bool dbl;
145 QDate bdate; 166 QDate bdate;
146 int year, _week,dow; 167 int year, _week,dow;
147 DateBookWeekLstHeader *header; 168 DateBookWeekLstHeader *header;
148 QWidget *view; 169 QWidget *view;
149 QVBoxLayout *layout; 170 QVBoxLayout *layout;