Diffstat (limited to 'core/pim/datebook/datebookdayallday.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookdayallday.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/pim/datebook/datebookdayallday.cpp b/core/pim/datebook/datebookdayallday.cpp index 2294f3c..1244fd3 100644 --- a/core/pim/datebook/datebookdayallday.cpp +++ b/core/pim/datebook/datebookdayallday.cpp | |||
@@ -147,55 +147,56 @@ void DatebookAlldayDisp::beam_single_event() | |||
147 | int days = m_Ev.event().start().date().daysTo( m_Ev.event().end().date() ); | 147 | int days = m_Ev.event().start().date().daysTo( m_Ev.event().end().date() ); |
148 | end.setDate( start.date().addDays( days ) ); | 148 | end.setDate( start.date().addDays( days ) ); |
149 | } | 149 | } |
150 | Event m_Event( m_Ev.event() ); | 150 | Event m_Event( m_Ev.event() ); |
151 | m_Event.setStart( start ); | 151 | m_Event.setStart( start ); |
152 | m_Event.setEnd ( end ); | 152 | m_Event.setEnd ( end ); |
153 | emit beamMe( m_Event ); | 153 | emit beamMe( m_Event ); |
154 | } | 154 | } |
155 | } | 155 | } |
156 | 156 | ||
157 | void DatebookAlldayDisp::mousePressEvent(QMouseEvent*e) | 157 | void DatebookAlldayDisp::mousePressEvent(QMouseEvent*e) |
158 | { | 158 | { |
159 | Event ev = m_Ev.event(); | ||
159 | QColor b = backgroundColor(); | 160 | QColor b = backgroundColor(); |
160 | setBackgroundColor(green); | 161 | setBackgroundColor(green); |
161 | update(); | 162 | update(); |
162 | QPopupMenu m; | 163 | QPopupMenu m; |
163 | m.insertItem( DateBookDayWidget::tr( "Edit" ), 1 ); | 164 | m.insertItem( DateBookDayWidget::tr( "Edit" ), 1 ); |
164 | m.insertItem( DateBookDayWidget::tr( "Duplicate" ), 4 ); | 165 | m.insertItem( DateBookDayWidget::tr( "Duplicate" ), 4 ); |
165 | m.insertItem( DateBookDayWidget::tr( "Delete" ), 2 ); | 166 | m.insertItem( DateBookDayWidget::tr( "Delete" ), 2 ); |
166 | if(Ir::supported()) m.insertItem( DateBookDayWidget::tr( "Beam" ), 3 ); | 167 | if(Ir::supported()) m.insertItem( DateBookDayWidget::tr( "Beam" ), 3 ); |
167 | if(Ir::supported() && m_Ev.event().doRepeat() ) m.insertItem( DateBookDayWidget::tr( "Beam this occurence"), 5 ); | 168 | if(Ir::supported() && m_Ev.event().doRepeat() ) m.insertItem( DateBookDayWidget::tr( "Beam this occurence"), 5 ); |
168 | m.insertItem( tr( "Info"),6); | 169 | m.insertItem( tr( "Info"),6); |
169 | int r = m.exec( e->globalPos() ); | 170 | int r = m.exec( e->globalPos() ); |
170 | setBackgroundColor(b); | 171 | setBackgroundColor(b); |
171 | update(); | 172 | update(); |
172 | switch (r) { | 173 | switch (r) { |
173 | case 1: | 174 | case 1: |
174 | emit editMe( m_Ev.event() ); | 175 | emit editMe( ev ); |
175 | break; | 176 | break; |
176 | case 2: | 177 | case 2: |
177 | emit deleteMe( m_Ev.event() ); | 178 | emit deleteMe( ev ); |
178 | break; | 179 | break; |
179 | case 3: | 180 | case 3: |
180 | emit beamMe( m_Ev.event() ); | 181 | emit beamMe( ev ); |
181 | break; | 182 | break; |
182 | case 4: | 183 | case 4: |
183 | emit duplicateMe( m_Ev.event() ); | 184 | emit duplicateMe( ev ); |
184 | break; | 185 | break; |
185 | case 5: | 186 | case 5: |
186 | beam_single_event(); | 187 | beam_single_event(); |
187 | break; | 188 | break; |
188 | case 6: | 189 | case 6: |
189 | emit displayMe( m_Ev.event() ); | 190 | emit displayMe( ev ); |
190 | break; | 191 | break; |
191 | default: | 192 | default: |
192 | break; | 193 | break; |
193 | } | 194 | } |
194 | } | 195 | } |
195 | 196 | ||
196 | DatebookEventDesc::DatebookEventDesc(QWidget*parent,const char*name) | 197 | DatebookEventDesc::DatebookEventDesc(QWidget*parent,const char*name) |
197 | :QLabel(parent,name) | 198 | :QLabel(parent,name) |
198 | { | 199 | { |
199 | m_Timer=new QTimer(this); | 200 | m_Timer=new QTimer(this); |
200 | connect(m_Timer,SIGNAL(timeout()),this,SLOT(hide())); | 201 | connect(m_Timer,SIGNAL(timeout()),this,SLOT(hide())); |
201 | setFrameStyle(QFrame::Sunken|QFrame::Panel); | 202 | setFrameStyle(QFrame::Sunken|QFrame::Panel); |