Diffstat (limited to 'core/pim/datebook/datebookday.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookday.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/pim/datebook/datebookday.h b/core/pim/datebook/datebookday.h index 961f60f..3898cbc 100644 --- a/core/pim/datebook/datebookday.h +++ b/core/pim/datebook/datebookday.h | |||
@@ -23,40 +23,42 @@ | |||
23 | #include <qpe/event.h> | 23 | #include <qpe/event.h> |
24 | 24 | ||
25 | #include <qdatetime.h> | 25 | #include <qdatetime.h> |
26 | #include <qtable.h> | 26 | #include <qtable.h> |
27 | #include <qvbox.h> | 27 | #include <qvbox.h> |
28 | #include <qlist.h> | 28 | #include <qlist.h> |
29 | 29 | ||
30 | #include "datebook.h" | 30 | #include "datebook.h" |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | 32 | ||
33 | class DateBookDayHeader; | 33 | class DateBookDayHeader; |
34 | class DateBookDB; | 34 | class DateBookDB; |
35 | class DatebookdayAllday; | ||
35 | class QDateTime; | 36 | class QDateTime; |
36 | class QMouseEvent; | 37 | class QMouseEvent; |
37 | class QPaintEvent; | 38 | class QPaintEvent; |
38 | class QResizeEvent; | 39 | class QResizeEvent; |
39 | 40 | ||
40 | class DateBookDayViewQuickLineEdit : public QLineEdit | 41 | class DateBookDayViewQuickLineEdit : public QLineEdit |
41 | { | 42 | { |
42 | Q_OBJECT | 43 | Q_OBJECT |
43 | public: | 44 | public: |
44 | DateBookDayViewQuickLineEdit(const QDateTime &start, const QDateTime &end,QWidget * parent, const char *name=0); | 45 | DateBookDayViewQuickLineEdit(const QDateTime &start, const QDateTime &end,QWidget * parent, const char *name=0); |
45 | protected: | 46 | protected: |
46 | Event quickEvent; | 47 | Event quickEvent; |
47 | int active; | 48 | int active; |
48 | void focusOutEvent( QFocusEvent *e ); | 49 | void focusOutEvent( QFocusEvent *e ); |
49 | protected slots: | 50 | protected slots: |
50 | void slotReturnPressed(void); | 51 | void slotReturnPressed(void); |
52 | void finallyCallClose(); | ||
51 | signals: | 53 | signals: |
52 | void insertEvent(const Event &e); | 54 | void insertEvent(const Event &e); |
53 | }; | 55 | }; |
54 | 56 | ||
55 | 57 | ||
56 | class DateBookDayView : public QTable | 58 | class DateBookDayView : public QTable |
57 | { | 59 | { |
58 | Q_OBJECT | 60 | Q_OBJECT |
59 | public: | 61 | public: |
60 | DateBookDayView( bool hourClock, QWidget *parent, const char *name ); | 62 | DateBookDayView( bool hourClock, QWidget *parent, const char *name ); |
61 | bool whichClock() const; | 63 | bool whichClock() const; |
62 | 64 | ||
@@ -167,36 +169,39 @@ class WidgetListClass : public QList<DateBookDayWidget> | |||
167 | { | 169 | { |
168 | return 1; | 170 | return 1; |
169 | } | 171 | } |
170 | } | 172 | } |
171 | 173 | ||
172 | 174 | ||
173 | }; | 175 | }; |
174 | 176 | ||
175 | class DateBookDay : public QVBox | 177 | class DateBookDay : public QVBox |
176 | { | 178 | { |
177 | Q_OBJECT | 179 | Q_OBJECT |
178 | 180 | ||
181 | friend class DateBookDayWidget; // for beam this occurence and access to DateBookDB | ||
179 | public: | 182 | public: |
180 | DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, | 183 | DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, |
181 | QWidget *parent, const char *name ); | 184 | QWidget *parent, const char *name ); |
182 | void selectedDates( QDateTime &start, QDateTime &end ); | 185 | void selectedDates( QDateTime &start, QDateTime &end ); |
183 | QDate date() const; | 186 | QDate date() const; |
184 | DateBookDayView *dayView() const { return view; } | 187 | DateBookDayView *dayView() const { return view; } |
185 | void setStartViewTime( int startHere ); | 188 | void setStartViewTime( int startHere ); |
186 | int startViewTime() const; | 189 | int startViewTime() const; |
187 | void setSelectedWidget( DateBookDayWidget * ); | 190 | void setSelectedWidget( DateBookDayWidget * ); |
188 | DateBookDayWidget * getSelectedWidget( void ); | 191 | DateBookDayWidget * getSelectedWidget( void ); |
189 | void setJumpToCurTime( bool bJump ); | 192 | void setJumpToCurTime( bool bJump ); |
190 | void setRowStyle( int style ); | 193 | void setRowStyle( int style ); |
194 | static QDate findRealStart( int uid, const QDate& isIncluded, | ||
195 | DateBookDB* ); | ||
191 | 196 | ||
192 | public slots: | 197 | public slots: |
193 | void setDate( int y, int m, int d ); | 198 | void setDate( int y, int m, int d ); |
194 | void setDate( QDate ); | 199 | void setDate( QDate ); |
195 | void redraw(); | 200 | void redraw(); |
196 | void slotWeekChanged( bool bStartOnMonday ); | 201 | void slotWeekChanged( bool bStartOnMonday ); |
197 | void updateView();//updates TimeMarker and DayWidget-colors | 202 | void updateView();//updates TimeMarker and DayWidget-colors |
198 | 203 | ||
199 | signals: | 204 | signals: |
200 | void removeEvent( const Event& ); | 205 | void removeEvent( const Event& ); |
201 | void editEvent( const Event& ); | 206 | void editEvent( const Event& ); |
202 | void duplicateEvent( const Event& ); | 207 | void duplicateEvent( const Event& ); |
@@ -209,22 +214,23 @@ protected slots: | |||
209 | 214 | ||
210 | private slots: | 215 | private slots: |
211 | void dateChanged( int y, int m, int d ); | 216 | void dateChanged( int y, int m, int d ); |
212 | void slotColWidthChanged() { relayoutPage(); }; | 217 | void slotColWidthChanged() { relayoutPage(); }; |
213 | 218 | ||
214 | private: | 219 | private: |
215 | void getEvents(); | 220 | void getEvents(); |
216 | void relayoutPage( bool fromResize = false ); | 221 | void relayoutPage( bool fromResize = false ); |
217 | DateBookDayWidget *intersects( const DateBookDayWidget *item, const QRect &geom ); | 222 | DateBookDayWidget *intersects( const DateBookDayWidget *item, const QRect &geom ); |
218 | QDate currDate; | 223 | QDate currDate; |
219 | DateBookDayView *view; | 224 | DateBookDayView *view; |
220 | DateBookDayHeader *header; | 225 | DateBookDayHeader *header; |
226 | DatebookdayAllday *m_allDays; | ||
221 | DateBookDB *db; | 227 | DateBookDB *db; |
222 | WidgetListClass widgetList;//reimplemented QList for sorting widgets by height | 228 | WidgetListClass widgetList;//reimplemented QList for sorting widgets by height |
223 | int startTime; | 229 | int startTime; |
224 | bool jumpToCurTime;//should we jump to current time in dayview? | 230 | bool jumpToCurTime;//should we jump to current time in dayview? |
225 | int rowStyle; | 231 | int rowStyle; |
226 | DateBookDayWidget *selectedWidget; //actual selected widget (obviously) | 232 | DateBookDayWidget *selectedWidget; //actual selected widget (obviously) |
227 | DateBookDayTimeMarker *timeMarker;//marker for current time | 233 | DateBookDayTimeMarker *timeMarker;//marker for current time |
228 | }; | 234 | }; |
229 | 235 | ||
230 | #endif | 236 | #endif |