Diffstat (limited to 'core/pim/datebook/datebookday.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookday.h | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/core/pim/datebook/datebookday.h b/core/pim/datebook/datebookday.h index c8cb26b..3e44364 100644 --- a/core/pim/datebook/datebookday.h +++ b/core/pim/datebook/datebookday.h | |||
@@ -40,18 +40,18 @@ class QResizeEvent; | |||
40 | 40 | ||
41 | class DateBookDayViewQuickLineEdit : public QLineEdit | 41 | class DateBookDayViewQuickLineEdit : public QLineEdit |
42 | { | 42 | { |
43 | Q_OBJECT | 43 | Q_OBJECT |
44 | public: | 44 | public: |
45 | 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); |
46 | protected: | 46 | protected: |
47 | Event quickEvent; | 47 | Event quickEvent; |
48 | int active; | 48 | int active; |
49 | void focusOutEvent( QFocusEvent *e ); | 49 | void focusOutEvent( QFocusEvent *e ); |
50 | protected slots: | 50 | protected slots: |
51 | void slotReturnPressed(void); | 51 | void slotReturnPressed(void); |
52 | void finallyCallClose(); | 52 | void finallyCallClose(); |
53 | signals: | 53 | signals: |
54 | void insertEvent(const Event &e); | 54 | void insertEvent(const Event &e); |
55 | }; | 55 | }; |
56 | 56 | ||
57 | 57 | ||
@@ -67,13 +67,13 @@ public: | |||
67 | public slots: | 67 | public slots: |
68 | void moveUp(); | 68 | void moveUp(); |
69 | void moveDown(); | 69 | void moveDown(); |
70 | void slotDateChanged( int year, int month, int day ); | 70 | void slotDateChanged( int year, int month, int day ); |
71 | 71 | ||
72 | signals: | 72 | signals: |
73 | void sigColWidthChanged(); | 73 | void sigColWidthChanged(); |
74 | void sigCapturedKey( const QString &txt ); | 74 | void sigCapturedKey( const QString &txt ); |
75 | protected slots: | 75 | protected slots: |
76 | void slotChangeClock( bool ); | 76 | void slotChangeClock( bool ); |
77 | protected: | 77 | protected: |
78 | virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected ); | 78 | virtual void paintCell( QPainter *p, int row, int col, const QRect &cr, bool selected ); |
79 | virtual void paintFocus( QPainter *p, const QRect &cr ); | 79 | virtual void paintFocus( QPainter *p, const QRect &cr ); |
@@ -84,8 +84,8 @@ protected: | |||
84 | void initHeader(); | 84 | void initHeader(); |
85 | private: | 85 | private: |
86 | bool ampm; | 86 | bool ampm; |
87 | QDate currDate; | 87 | QDate currDate; |
88 | DateBookDayViewQuickLineEdit *quickLineEdit; | 88 | DateBookDayViewQuickLineEdit *quickLineEdit; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | class DateBookDay; | 91 | class DateBookDay; |
@@ -157,19 +157,19 @@ private: | |||
157 | //reimplemented the compareItems function so that it sorts DayWidgets by geometry heights | 157 | //reimplemented the compareItems function so that it sorts DayWidgets by geometry heights |
158 | class WidgetListClass : public QList<DateBookDayWidget> | 158 | class WidgetListClass : public QList<DateBookDayWidget> |
159 | { | 159 | { |
160 | private: | 160 | private: |
161 | 161 | ||
162 | int compareItems( QCollection::Item s1, QCollection::Item s2 ) | 162 | int compareItems( QCollection::Item s1, QCollection::Item s2 ) |
163 | { | 163 | { |
164 | //hmm, don't punish me for that ;) | 164 | //hmm, don't punish me for that ;) |
165 | if (reinterpret_cast<DateBookDayWidget*>(s1)->geometry().height() > reinterpret_cast<DateBookDayWidget*>(s2)->geometry().height()) | 165 | if (reinterpret_cast<DateBookDayWidget*>(s1)->geometry().height() > reinterpret_cast<DateBookDayWidget*>(s2)->geometry().height()) |
166 | { | 166 | { |
167 | return -1; | 167 | return -1; |
168 | } else | 168 | } else |
169 | { | 169 | { |
170 | return 1; | 170 | return 1; |
171 | } | 171 | } |
172 | } | 172 | } |
173 | 173 | ||
174 | 174 | ||
175 | }; | 175 | }; |
@@ -180,9 +180,10 @@ class DateBookDay : public QVBox | |||
180 | 180 | ||
181 | friend class DateBookDayWidget; // for beam this occurence and access to DateBookDB | 181 | friend class DateBookDayWidget; // for beam this occurence and access to DateBookDB |
182 | public: | 182 | public: |
183 | DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, | 183 | DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb,DateBookHoliday*newHdb, |
184 | QWidget *parent, const char *name ); | 184 | QWidget *parent, const char *name ); |
185 | void selectedDates( QDateTime &start, QDateTime &end ); | 185 | void selectedDates( QDateTime &start, QDateTime &end ); |
186 | |||
186 | QDate date() const; | 187 | QDate date() const; |
187 | DateBookDayView *dayView() const { return view; } | 188 | DateBookDayView *dayView() const { return view; } |
188 | void setStartViewTime( int startHere ); | 189 | void setStartViewTime( int startHere ); |
@@ -199,7 +200,7 @@ public slots: | |||
199 | void setDate( QDate ); | 200 | void setDate( QDate ); |
200 | void redraw(); | 201 | void redraw(); |
201 | void slotWeekChanged( bool bStartOnMonday ); | 202 | void slotWeekChanged( bool bStartOnMonday ); |
202 | void updateView();//updates TimeMarker and DayWidget-colors | 203 | void updateView(); //updates TimeMarker and DayWidget-colors |
203 | 204 | ||
204 | signals: | 205 | signals: |
205 | void removeEvent( const Event& ); | 206 | void removeEvent( const Event& ); |
@@ -225,12 +226,13 @@ private: | |||
225 | DateBookDayHeader *header; | 226 | DateBookDayHeader *header; |
226 | DatebookdayAllday *m_allDays; | 227 | DatebookdayAllday *m_allDays; |
227 | DateBookDB *db; | 228 | DateBookDB *db; |
228 | WidgetListClass widgetList;//reimplemented QList for sorting widgets by height | 229 | WidgetListClass widgetList; //reimplemented QList for sorting widgets by height |
229 | int startTime; | 230 | int startTime; |
230 | bool jumpToCurTime;//should we jump to current time in dayview? | 231 | bool jumpToCurTime; //should we jump to current time in dayview? |
231 | int rowStyle; | 232 | int rowStyle; |
232 | DateBookDayWidget *selectedWidget; //actual selected widget (obviously) | 233 | DateBookDayWidget *selectedWidget; //actual selected widget (obviously) |
233 | DateBookDayTimeMarker *timeMarker;//marker for current time | 234 | DateBookDayTimeMarker *timeMarker; //marker for current time |
235 | DateBookHoliday*_holiday_db; | ||
234 | }; | 236 | }; |
235 | 237 | ||
236 | #endif | 238 | #endif |