summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweek.h
Unidiff
Diffstat (limited to 'core/pim/datebook/datebookweek.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookweek.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/pim/datebook/datebookweek.h b/core/pim/datebook/datebookweek.h
index c273e30..ddf54ed 100644
--- a/core/pim/datebook/datebookweek.h
+++ b/core/pim/datebook/datebookweek.h
@@ -19,24 +19,25 @@
19**********************************************************************/ 19**********************************************************************/
20#ifndef DATEBOOKWEEK 20#ifndef DATEBOOKWEEK
21#define DATEBOOKWEEK 21#define DATEBOOKWEEK
22 22
23#include <qpe/event.h> 23#include <qpe/event.h>
24 24
25#include <qlist.h> 25#include <qlist.h>
26#include <qscrollview.h> 26#include <qscrollview.h>
27#include <qstring.h> 27#include <qstring.h>
28#include <qvaluelist.h> 28#include <qvaluelist.h>
29 29
30class DateBookDB; 30class DateBookDB;
31class DateBookDBHoliday;
31class DateBookWeekHeader; 32class DateBookWeekHeader;
32class QDate; 33class QDate;
33class QLabel; 34class QLabel;
34class QResizeEvent; 35class QResizeEvent;
35class QSpinBox; 36class QSpinBox;
36class QTimer; 37class QTimer;
37class QHeader; 38class QHeader;
38 39
39class DateBookWeekItem 40class DateBookWeekItem
40{ 41{
41public: 42public:
42 DateBookWeekItem( const EffectiveEvent e ); 43 DateBookWeekItem( const EffectiveEvent e );
@@ -49,25 +50,25 @@ public:
49 50
50private: 51private:
51 const EffectiveEvent ev; 52 const EffectiveEvent ev;
52 QRect r; 53 QRect r;
53 QColor c; 54 QColor c;
54}; 55};
55 56
56class DateBookWeekView : public QScrollView 57class DateBookWeekView : public QScrollView
57{ 58{
58 Q_OBJECT 59 Q_OBJECT
59public: 60public:
60 DateBookWeekView( bool ampm, bool weekOnMonday, QWidget *parent = 0, 61 DateBookWeekView( bool ampm, bool weekOnMonday, QWidget *parent = 0,
61 const char *name = 0 ); 62 const char *name = 0 );
62 63
63 bool whichClock() const; 64 bool whichClock() const;
64 void showEvents( QValueList<EffectiveEvent> &ev ); 65 void showEvents( QValueList<EffectiveEvent> &ev );
65 void moveToHour( int h ); 66 void moveToHour( int h );
66 void setStartOfWeek( bool bOnMonday ); 67 void setStartOfWeek( bool bOnMonday );
67 68
68signals: 69signals:
69 void showDay( int d ); 70 void showDay( int d );
70 void signalShowEvent( const EffectiveEvent & ); 71 void signalShowEvent( const EffectiveEvent & );
71 void signalHideEvent(); 72 void signalHideEvent();
72 73
73protected slots: 74protected slots:
@@ -91,26 +92,26 @@ private:
91 bool bOnMonday; 92 bool bOnMonday;
92 QHeader *header; 93 QHeader *header;
93 QList<DateBookWeekItem> items; 94 QList<DateBookWeekItem> items;
94 int rowHeight; 95 int rowHeight;
95 bool showingEvent; 96 bool showingEvent;
96}; 97};
97 98
98class DateBookWeek : public QWidget 99class DateBookWeek : public QWidget
99{ 100{
100 Q_OBJECT 101 Q_OBJECT
101 102
102public: 103public:
103 DateBookWeek( bool ampm, bool weekOnMonday, DateBookDB *newDB, 104 DateBookWeek( bool ampm, bool weekOnMonday, DateBookDBHoliday *newDB,
104 QWidget *parent = 0, const char *name = 0 ); 105 QWidget *parent = 0, const char *name = 0 );
105 void setDate( int y, int m, int d ); 106 void setDate( int y, int m, int d );
106 void setDate( QDate d ); 107 void setDate( QDate d );
107 QDate date() const; 108 QDate date() const;
108 DateBookWeekView *weekView() const { return view; } 109 DateBookWeekView *weekView() const { return view; }
109 void setStartViewTime( int startHere ); 110 void setStartViewTime( int startHere );
110 int startViewTime() const; 111 int startViewTime() const;
111 int week() const { return _week; }; 112 int week() const { return _week; };
112 QDate weekDate() const; 113 QDate weekDate() const;
113 114
114public slots: 115public slots:
115 void redraw(); 116 void redraw();
116 void slotWeekChanged( bool bStartOnMonday ); 117 void slotWeekChanged( bool bStartOnMonday );
@@ -144,23 +145,23 @@ private:
144 /** 145 /**
145 * This will add the times to the text 146 * This will add the times to the text
146 * It will be shown in the Tooltip bubble 147 * It will be shown in the Tooltip bubble
147 */ 148 */
148 void generateNormalTooltext( QString& text, 149 void generateNormalTooltext( QString& text,
149 const EffectiveEvent &ev); 150 const EffectiveEvent &ev);
150 int year; 151 int year;
151 int _week; 152 int _week;
152 int dow; 153 int dow;
153 QDate bdate; 154 QDate bdate;
154 DateBookWeekHeader *header; 155 DateBookWeekHeader *header;
155 DateBookWeekView *view; 156 DateBookWeekView *view;
156 DateBookDB *db; 157 DateBookDBHoliday *db;
157 QLabel *lblDesc; 158 QLabel *lblDesc;
158 QTimer *tHide; 159 QTimer *tHide;
159 int startTime; 160 int startTime;
160 bool ampm; 161 bool ampm;
161 bool bStartOnMonday; 162 bool bStartOnMonday;
162}; 163};
163 164
164 165
165bool calcWeek( const QDate &d, int &week, int &year, bool startOnMonday = false ); 166bool calcWeek( const QDate &d, int &week, int &year, bool startOnMonday = false );
166#endif 167#endif