-rw-r--r-- | library/datebookmonth.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/datebookmonth.h b/library/datebookmonth.h index 6cd1ac5..a7647ae 100644 --- a/library/datebookmonth.h +++ b/library/datebookmonth.h | |||
@@ -23,96 +23,97 @@ | |||
23 | #include <qpe/event.h> | 23 | #include <qpe/event.h> |
24 | 24 | ||
25 | #include <qvbox.h> | 25 | #include <qvbox.h> |
26 | #include <qhbox.h> | 26 | #include <qhbox.h> |
27 | #include <qdatetime.h> | 27 | #include <qdatetime.h> |
28 | #include <qvaluelist.h> | 28 | #include <qvaluelist.h> |
29 | #include <qtable.h> | 29 | #include <qtable.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | 31 | ||
32 | #include "calendar.h" | 32 | #include "calendar.h" |
33 | #include "timestring.h" | 33 | #include "timestring.h" |
34 | 34 | ||
35 | class QToolButton; | 35 | class QToolButton; |
36 | class QComboBox; | 36 | class QComboBox; |
37 | class QSpinBox; | 37 | class QSpinBox; |
38 | class Event; | 38 | class Event; |
39 | class DateBookDB; | 39 | class DateBookDB; |
40 | 40 | ||
41 | class DateBookMonthHeaderPrivate; | 41 | class DateBookMonthHeaderPrivate; |
42 | class DateBookMonthHeader : public QHBox | 42 | class DateBookMonthHeader : public QHBox |
43 | { | 43 | { |
44 | Q_OBJECT | 44 | Q_OBJECT |
45 | 45 | ||
46 | public: | 46 | public: |
47 | DateBookMonthHeader( QWidget *parent = 0, const char *name = 0 ); | 47 | DateBookMonthHeader( QWidget *parent = 0, const char *name = 0 ); |
48 | ~DateBookMonthHeader(); | 48 | ~DateBookMonthHeader(); |
49 | void setDate( int year, int month ); | 49 | void setDate( int year, int month ); |
50 | 50 | ||
51 | signals: | 51 | signals: |
52 | void dateChanged( int year, int month ); | 52 | void dateChanged( int year, int month ); |
53 | 53 | ||
54 | protected slots: | 54 | protected slots: |
55 | void keyPressEvent(QKeyEvent *e ) { | 55 | void keyPressEvent(QKeyEvent *e ) { |
56 | e->ignore(); | 56 | e->ignore(); |
57 | } | 57 | } |
58 | 58 | ||
59 | private slots: | 59 | private slots: |
60 | void updateDate(); | 60 | void updateDate(); |
61 | void firstMonth(); | 61 | void firstMonth(); |
62 | void lastMonth(); | 62 | void lastMonth(); |
63 | void monthBack(); | 63 | void monthBack(); |
64 | void monthForward(); | 64 | void monthForward(); |
65 | 65 | ||
66 | private: | 66 | private: |
67 | QToolButton *begin, *back, *next, *end; | 67 | QToolButton *begin, *back, *next, *end; |
68 | QComboBox *month; | 68 | QComboBox *month; |
69 | QSpinBox *year; | 69 | QSpinBox *year; |
70 | DateBookMonthHeaderPrivate *d; | 70 | DateBookMonthHeaderPrivate *d; |
71 | int focus; | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | class DayItemMonthPrivate; | 74 | class DayItemMonthPrivate; |
74 | class DayItemMonth : public QTableItem | 75 | class DayItemMonth : public QTableItem |
75 | { | 76 | { |
76 | public: | 77 | public: |
77 | DayItemMonth( QTable *table, EditType et, const QString &t ); | 78 | DayItemMonth( QTable *table, EditType et, const QString &t ); |
78 | ~DayItemMonth(); | 79 | ~DayItemMonth(); |
79 | void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); | 80 | void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool selected ); |
80 | void setDay( int d ) { dy = d; } | 81 | void setDay( int d ) { dy = d; } |
81 | void setEvents( const QValueList<Event> &events ) { daysEvents = events; }; | 82 | void setEvents( const QValueList<Event> &events ) { daysEvents = events; }; |
82 | void setEvents( const QValueList<EffectiveEvent> &effEvents ); | 83 | void setEvents( const QValueList<EffectiveEvent> &effEvents ); |
83 | void clearEvents() { daysEvents.clear(); }; | 84 | void clearEvents() { daysEvents.clear(); }; |
84 | void clearEffEvents(); | 85 | void clearEffEvents(); |
85 | int day() const { return dy; } | 86 | int day() const { return dy; } |
86 | void setType( Calendar::Day::Type t ); | 87 | void setType( Calendar::Day::Type t ); |
87 | Calendar::Day::Type type() const { return typ; } | 88 | Calendar::Day::Type type() const { return typ; } |
88 | 89 | ||
89 | private: | 90 | private: |
90 | QBrush back; | 91 | QBrush back; |
91 | QColor forg; | 92 | QColor forg; |
92 | int dy; | 93 | int dy; |
93 | Calendar::Day::Type typ; | 94 | Calendar::Day::Type typ; |
94 | QValueList<Event> daysEvents; // not used anymore... | 95 | QValueList<Event> daysEvents; // not used anymore... |
95 | DayItemMonthPrivate *d; | 96 | DayItemMonthPrivate *d; |
96 | }; | 97 | }; |
97 | 98 | ||
98 | class DateBookMonthTablePrivate; | 99 | class DateBookMonthTablePrivate; |
99 | class DateBookMonthTable : public QTable | 100 | class DateBookMonthTable : public QTable |
100 | { | 101 | { |
101 | Q_OBJECT | 102 | Q_OBJECT |
102 | 103 | ||
103 | public: | 104 | public: |
104 | DateBookMonthTable( QWidget *parent = 0, const char *name = 0, | 105 | DateBookMonthTable( QWidget *parent = 0, const char *name = 0, |
105 | DateBookDB *newDb = 0 ); | 106 | DateBookDB *newDb = 0 ); |
106 | ~DateBookMonthTable(); | 107 | ~DateBookMonthTable(); |
107 | void setDate( int y, int m, int d ); | 108 | void setDate( int y, int m, int d ); |
108 | void redraw(); | 109 | void redraw(); |
109 | 110 | ||
110 | QSize minimumSizeHint() const { return sizeHint(); } | 111 | QSize minimumSizeHint() const { return sizeHint(); } |
111 | QSize minimumSize() const { return sizeHint(); } | 112 | QSize minimumSize() const { return sizeHint(); } |
112 | void getDate( int& y, int &m, int &d ) const {y=selYear;m=selMonth;d=selDay;} | 113 | void getDate( int& y, int &m, int &d ) const {y=selYear;m=selMonth;d=selDay;} |
113 | void setWeekStart( bool onMonday ); | 114 | void setWeekStart( bool onMonday ); |
114 | signals: | 115 | signals: |
115 | void dateClicked( int year, int month, int day ); | 116 | void dateClicked( int year, int month, int day ); |
116 | 117 | ||
117 | protected: | 118 | protected: |
118 | void viewportMouseReleaseEvent( QMouseEvent * ); | 119 | void viewportMouseReleaseEvent( QMouseEvent * ); |