Diffstat (limited to 'core/pim/datebook/datebookweeklst.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index fe2ab51..771aa00 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp | |||
@@ -8,4 +8,5 @@ | |||
8 | #include <qpe/datebookmonth.h> | 8 | #include <qpe/datebookmonth.h> |
9 | #include <qpe/config.h> | 9 | #include <qpe/config.h> |
10 | #include <qpe/ir.h> | ||
10 | #include <qpe/resource.h> | 11 | #include <qpe/resource.h> |
11 | 12 | ||
@@ -193,5 +194,5 @@ DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev, | |||
193 | } | 194 | } |
194 | setText(QString(s) + " " + ev.description()); | 195 | setText(QString(s) + " " + ev.description()); |
195 | connect(this, SIGNAL(clicked()), this, SLOT(editMe())); | 196 | //connect(this, SIGNAL(clicked()), this, SLOT(editMe())); |
196 | setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); | 197 | setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); |
197 | } | 198 | } |
@@ -199,5 +200,27 @@ void DateBookWeekLstEvent::editMe() { | |||
199 | emit editEvent(event.event()); | 200 | emit editEvent(event.event()); |
200 | } | 201 | } |
201 | 202 | void DateBookWeekLstEvent::duplicateMe() | |
203 | { | ||
204 | emit duplicateEvent(event.event()); | ||
205 | } | ||
206 | void DateBookWeekLstEvent::deleteMe() | ||
207 | { | ||
208 | emit removeEvent(event.event()); | ||
209 | emit redraw(); | ||
210 | } | ||
211 | void DateBookWeekLstEvent::beamMe() | ||
212 | { | ||
213 | emit beamEvent( event.event() ); | ||
214 | } | ||
215 | void DateBookWeekLstEvent::mousePressEvent( QMouseEvent *e ) | ||
216 | { | ||
217 | popmenue = new QPopupMenu; | ||
218 | popmenue->insertItem( tr( "Edit" ), this, SLOT(editMe())); | ||
219 | popmenue->insertItem( tr( "Duplicate" ), this, SLOT(duplicateMe())); | ||
220 | popmenue->insertItem( tr( "Delete" ), this, SLOT(deleteMe())); | ||
221 | if(Ir::supported()) | ||
222 | popmenue->insertItem( tr( "Beam" ), this, SLOT(beamMe())); | ||
223 | popmenue->popup( mapToGlobal( e->pos() )); | ||
224 | } | ||
202 | 225 | ||
203 | DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, | 226 | DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, |
@@ -249,4 +272,8 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, | |||
249 | layout->addWidget(l); | 272 | layout->addWidget(l); |
250 | connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | 273 | connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); |
274 | connect (l, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | ||
275 | connect (l, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | ||
276 | connect (l, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | ||
277 | connect (l, SIGNAL(redraw()), this, SIGNAL(redraw())); | ||
251 | } | 278 | } |
252 | it++; | 279 | it++; |
@@ -270,4 +297,8 @@ DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, | |||
270 | layout->addWidget(w); | 297 | layout->addWidget(w); |
271 | connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | 298 | connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); |
299 | connect (w, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | ||
300 | connect (w, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | ||
301 | connect (w, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | ||
302 | connect (w, SIGNAL(redraw()), this, SIGNAL(redraw())); | ||
272 | connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | 303 | connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); |
273 | connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), | 304 | connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), |
@@ -278,4 +309,8 @@ DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, | |||
278 | layout->addWidget(w); | 309 | layout->addWidget(w); |
279 | connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | 310 | connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); |
311 | connect (w, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | ||
312 | connect (w, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | ||
313 | connect (w, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | ||
314 | connect (w, SIGNAL(redraw()), this, SIGNAL(redraw())); | ||
280 | connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | 315 | connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); |
281 | connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), | 316 | connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), |
@@ -363,4 +398,8 @@ void DateBookWeekLst::getEvents() { | |||
363 | 398 | ||
364 | connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | 399 | connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); |
400 | connect (view, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | ||
401 | connect (view, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | ||
402 | connect (view, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | ||
403 | connect (view, SIGNAL(redraw()), this, SLOT(redraw())); | ||
365 | connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | 404 | connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); |
366 | connect (view, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), | 405 | connect (view, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), |