Diffstat (limited to 'core/pim/datebook/datebookweeklst.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweeklst.h | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/core/pim/datebook/datebookweeklst.h b/core/pim/datebook/datebookweeklst.h index 39c956d..b0b0417 100644 --- a/core/pim/datebook/datebookweeklst.h +++ b/core/pim/datebook/datebookweeklst.h | |||
@@ -28,12 +28,13 @@ public slots: | |||
28 | void nextWeek(); | 28 | void nextWeek(); |
29 | void prevWeek(); | 29 | void prevWeek(); |
30 | void pickDate(); | 30 | void pickDate(); |
31 | void setDate(int y, int m, int d); | 31 | void setDate(int y, int m, int d); |
32 | signals: | 32 | signals: |
33 | void dateChanged(int y, int w); | 33 | void dateChanged(int y, int w); |
34 | void setDbl(bool on); | ||
34 | private: | 35 | private: |
35 | QDate date; | 36 | QDate date; |
36 | bool onMonday; | 37 | bool onMonday; |
37 | }; | 38 | }; |
38 | 39 | ||
39 | class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase | 40 | class DateBookWeekLstDayHdr: public DateBookWeekLstDayHdrBase |
@@ -70,13 +71,13 @@ private: | |||
70 | }; | 71 | }; |
71 | 72 | ||
72 | class DateBookWeekLstView: public QWidget | 73 | class DateBookWeekLstView: public QWidget |
73 | { | 74 | { |
74 | Q_OBJECT | 75 | Q_OBJECT |
75 | public: | 76 | public: |
76 | DateBookWeekLstView(QValueList<EffectiveEvent> &ev, QDate &d, bool onM, | 77 | DateBookWeekLstView(QValueList<EffectiveEvent> &ev, const QDate &d, bool onM, |
77 | QWidget* parent = 0, const char* name = 0, | 78 | QWidget* parent = 0, const char* name = 0, |
78 | WFlags fl = 0 ); | 79 | WFlags fl = 0 ); |
79 | ~DateBookWeekLstView(); | 80 | ~DateBookWeekLstView(); |
80 | signals: | 81 | signals: |
81 | void editEvent(const Event &e); | 82 | void editEvent(const Event &e); |
82 | void showDate(int y, int m, int d); | 83 | void showDate(int y, int m, int d); |
@@ -85,47 +86,66 @@ signals: | |||
85 | private: | 86 | private: |
86 | bool onMonday; | 87 | bool onMonday; |
87 | protected slots: | 88 | protected slots: |
88 | void keyPressEvent(QKeyEvent *); | 89 | void keyPressEvent(QKeyEvent *); |
89 | }; | 90 | }; |
90 | 91 | ||
92 | class DateBookWeekLstDblView: public QWidget { | ||
93 | Q_OBJECT | ||
94 | public: | ||
95 | DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, | ||
96 | QValueList<EffectiveEvent> &ev2, | ||
97 | QDate &d, bool onM, | ||
98 | QWidget* parent = 0, const char* name = 0, | ||
99 | WFlags fl = 0 ); | ||
100 | signals: | ||
101 | void editEvent(const Event &e); | ||
102 | void showDate(int y, int m, int d); | ||
103 | void addEvent(const QDateTime &start, const QDateTime &stop, | ||
104 | const QString &str); | ||
105 | }; | ||
106 | |||
91 | class DateBookWeekLst : public QWidget | 107 | class DateBookWeekLst : public QWidget |
92 | { | 108 | { |
93 | Q_OBJECT | 109 | Q_OBJECT |
94 | 110 | ||
95 | public: | 111 | public: |
96 | DateBookWeekLst( bool ampm, bool onM, DateBookDB *newDB, | 112 | DateBookWeekLst( bool ampm, bool onM, DateBookDB *newDB, |
97 | QWidget *parent = 0, | 113 | QWidget *parent = 0, |
98 | const char *name = 0 ); | 114 | const char *name = 0 ); |
115 | ~DateBookWeekLst(); | ||
99 | void setDate( int y, int w ); | 116 | void setDate( int y, int w ); |
100 | void setDate(const QDate &d ); | 117 | void setDate(const QDate &d ); |
101 | int week() const { return _week; }; | 118 | int week() const { return _week; }; |
102 | QDate date() const; | 119 | QDate date() const; |
103 | 120 | ||
104 | public slots: | 121 | public slots: |
105 | void redraw(); | 122 | void redraw(); |
106 | void dateChanged(int y, int w); | 123 | void dateChanged(int y, int w); |
124 | |||
107 | protected slots: | 125 | protected slots: |
108 | void keyPressEvent(QKeyEvent *); | 126 | void keyPressEvent(QKeyEvent *); |
127 | void setDbl(bool on); | ||
109 | 128 | ||
110 | signals: | 129 | signals: |
111 | void showDate(int y, int m, int d); | 130 | void showDate(int y, int m, int d); |
112 | void addEvent(const QDateTime &start, const QDateTime &stop, | 131 | void addEvent(const QDateTime &start, const QDateTime &stop, |
113 | const QString &str); | 132 | const QString &str); |
114 | void editEvent(const Event &e); | 133 | void editEvent(const Event &e); |
115 | 134 | ||
116 | private: | 135 | private: |
117 | DateBookDB *db; | 136 | DateBookDB *db; |
118 | int startTime; | 137 | int startTime; |
119 | bool ampm; | 138 | bool ampm; |
120 | bool onMonday; | 139 | bool onMonday; |
121 | int year, _week; | 140 | bool dbl; |
122 | DateBookWeekLstHeader *header; | 141 | int year, _week; |
123 | DateBookWeekLstView *view; | 142 | DateBookWeekLstHeader *header; |
124 | QVBoxLayout *layout; | 143 | QWidget *view; |
125 | QScrollView *scroll; | 144 | QVBoxLayout *layout; |
126 | 145 | QScrollView *scroll; | |
127 | void getEvents(); | 146 | |
147 | void getEvents(); | ||
128 | }; | 148 | }; |
129 | 149 | ||
130 | #endif | 150 | #endif |
131 | 151 | ||