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.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/datebook/datebookday.h b/core/pim/datebook/datebookday.h
index 3898cbc..c8cb26b 100644
--- a/core/pim/datebook/datebookday.h
+++ b/core/pim/datebook/datebookday.h
@@ -79,97 +79,97 @@ protected:
79 virtual void paintFocus( QPainter *p, const QRect &cr ); 79 virtual void paintFocus( QPainter *p, const QRect &cr );
80 80
81 virtual void resizeEvent( QResizeEvent *e ); 81 virtual void resizeEvent( QResizeEvent *e );
82 void keyPressEvent( QKeyEvent *e ); 82 void keyPressEvent( QKeyEvent *e );
83 void contentsMouseReleaseEvent( QMouseEvent *e ); 83 void contentsMouseReleaseEvent( QMouseEvent *e );
84 void initHeader(); 84 void initHeader();
85private: 85private:
86 bool ampm; 86 bool ampm;
87 QDate currDate; 87 QDate currDate;
88 DateBookDayViewQuickLineEdit *quickLineEdit; 88 DateBookDayViewQuickLineEdit *quickLineEdit;
89}; 89};
90 90
91class DateBookDay; 91class DateBookDay;
92class DateBookDayWidget : public QWidget 92class DateBookDayWidget : public QWidget
93{ 93{
94 Q_OBJECT 94 Q_OBJECT
95 95
96public: 96public:
97 DateBookDayWidget( const EffectiveEvent &e, DateBookDay *db ); 97 DateBookDayWidget( const EffectiveEvent &e, DateBookDay *db );
98 ~DateBookDayWidget(); 98 ~DateBookDayWidget();
99 99
100 const QRect &geometry() { return geom; } 100 const QRect &geometry() { return geom; }
101 void setGeometry( const QRect &r ); 101 void setGeometry( const QRect &r );
102 102
103 const EffectiveEvent &event() const { return ev; } 103 const EffectiveEvent &event() const { return ev; }
104 104
105signals: 105signals:
106 void deleteMe( const Event &e ); 106 void deleteMe( const Event &e );
107 void duplicateMe( const Event &e ); 107 void duplicateMe( const Event &e );
108 void editMe( const Event &e ); 108 void editMe( const Event &e );
109 void beamMe( const Event &e ); 109 void beamMe( const Event &e );
110 110
111protected: 111protected:
112 void paintEvent( QPaintEvent *e ); 112 void paintEvent( QPaintEvent *e );
113 void mousePressEvent( QMouseEvent *e ); 113 void mousePressEvent( QMouseEvent *e );
114 114
115private: 115private:
116 /** 116 /**
117 * Sets the text for an all day Event 117 * Sets the text for an all day Event
118 * All day events have no time associated 118 * All day events have no time associated
119 */ 119 */
120 void setAllDayText( QString& text ); 120 void setAllDayText( QString& text );
121 121
122 /** 122 /**
123 * Sets the EventText 123 * Sets the EventText
124 * it got a start and an end Time 124 * it got a start and an end Time
125 */ 125 */
126 void setEventText( QString& text ); 126 void setEventText( QString& text );
127 const EffectiveEvent ev; 127 EffectiveEvent ev;
128 DateBookDay *dateBook; 128 DateBookDay *dateBook;
129 QString text; 129 QString text;
130 QRect geom; 130 QRect geom;
131}; 131};
132 132
133//Marker for current time in the dayview 133//Marker for current time in the dayview
134class DateBookDayTimeMarker : public QWidget 134class DateBookDayTimeMarker : public QWidget
135{ 135{
136 Q_OBJECT 136 Q_OBJECT
137 137
138public: 138public:
139 DateBookDayTimeMarker( DateBookDay *db ); 139 DateBookDayTimeMarker( DateBookDay *db );
140 ~DateBookDayTimeMarker(); 140 ~DateBookDayTimeMarker();
141 141
142 const QRect &geometry() { return geom; } 142 const QRect &geometry() { return geom; }
143 void setGeometry( const QRect &r ); 143 void setGeometry( const QRect &r );
144 void setTime( const QTime &t ); 144 void setTime( const QTime &t );
145 145
146signals: 146signals:
147 147
148protected: 148protected:
149 void paintEvent( QPaintEvent *e ); 149 void paintEvent( QPaintEvent *e );
150 150
151private: 151private:
152 QRect geom; 152 QRect geom;
153 QTime time; 153 QTime time;
154 DateBookDay *dateBook; 154 DateBookDay *dateBook;
155}; 155};
156 156
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
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
175}; 175};