summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookday.h
Unidiff
Diffstat (limited to 'core/pim/datebook/datebookday.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookday.h60
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
@@ -41,16 +41,16 @@ class QResizeEvent;
41class DateBookDayViewQuickLineEdit : public QLineEdit 41class DateBookDayViewQuickLineEdit : public QLineEdit
42{ 42{
43 Q_OBJECT 43 Q_OBJECT
44public: 44public:
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);
46protected: 46protected:
47 Event quickEvent; 47 Event quickEvent;
48 int active; 48 int active;
49 void focusOutEvent( QFocusEvent *e ); 49 void focusOutEvent( QFocusEvent *e );
50protected slots: 50protected slots:
51 void slotReturnPressed(void); 51 void slotReturnPressed(void);
52 void finallyCallClose(); 52 void finallyCallClose();
53signals: 53signals:
54 void insertEvent(const Event &e); 54 void insertEvent(const Event &e);
55}; 55};
56 56
@@ -68,5 +68,5 @@ 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
72signals: 72signals:
@@ -74,5 +74,5 @@ signals:
74 void sigCapturedKey( const QString &txt ); 74 void sigCapturedKey( const QString &txt );
75protected slots: 75protected slots:
76 void slotChangeClock( bool ); 76 void slotChangeClock( bool );
77protected: 77protected:
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 );
@@ -85,6 +85,6 @@ protected:
85private: 85private:
86 bool ampm; 86 bool ampm;
87 QDate currDate; 87 QDate currDate;
88 DateBookDayViewQuickLineEdit *quickLineEdit; 88 DateBookDayViewQuickLineEdit *quickLineEdit;
89}; 89};
90 90
@@ -158,17 +158,17 @@ private:
158class WidgetListClass : public QList<DateBookDayWidget> 158class 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
@@ -181,7 +181,8 @@ class DateBookDay : public QVBox
181 friend class DateBookDayWidget; // for beam this occurence and access to DateBookDB 181 friend class DateBookDayWidget; // for beam this occurence and access to DateBookDB
182public: 182public:
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; }
@@ -200,5 +201,5 @@ public slots:
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
204signals: 205signals:
@@ -226,10 +227,11 @@ private:
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