Diffstat (limited to 'core/pim/datebook/datebookday.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookday.cpp | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index 42f026a..5d472a6 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp @@ -312,8 +312,10 @@ void DateBookDay::getEvents() if(!(ev.end().hour()==ev.start().hour() && ev.end().minute()==ev.start().minute())) { // Skip effective events with no duration. (i.e ending at 00:00) DateBookDayWidget* w = new DateBookDayWidget( *it, this ); connect( w, SIGNAL( deleteMe( const Event & ) ), this, SIGNAL( removeEvent( const Event & ) ) ); + connect( w, SIGNAL( duplicateMe( const Event & ) ), + this, SIGNAL( duplicateEvent( const Event & ) ) ); connect( w, SIGNAL( editMe( const Event & ) ), this, SIGNAL( editEvent( const Event & ) ) ); connect( w, SIGNAL( beamMe( const Event & ) ), this, SIGNAL( beamEvent( const Event & ) ) ); @@ -719,20 +721,23 @@ void DateBookDayWidget::mousePressEvent( QMouseEvent *e ) dateBook->setSelectedWidget(this); update(); dateBook->repaint(); - QPopupMenu m; - m.insertItem( tr( "Edit" ), 1 ); - m.insertItem( tr( "Delete" ), 2 ); - if(Ir::supported()) m.insertItem( tr( "Beam" ), 3 ); - int r = m.exec( e->globalPos() ); - if ( r == 1 ) { - emit editMe( ev.event() ); - } else if ( r == 2 ) { - emit deleteMe( ev.event() ); - } else if ( r == 3 ) { - emit beamMe( ev.event() ); - } + QPopupMenu m; + m.insertItem( tr( "Edit" ), 1 ); + m.insertItem( tr( "Duplicate" ), 4 ); + m.insertItem( tr( "Delete" ), 2 ); + if(Ir::supported()) m.insertItem( tr( "Beam" ), 3 ); + int r = m.exec( e->globalPos() ); + if ( r == 1 ) { + emit editMe( ev.event() ); + } else if ( r == 2 ) { + emit deleteMe( ev.event() ); + } else if ( r == 3 ) { + emit beamMe( ev.event() ); + } else if ( r == 4 ) { + emit duplicateMe( ev.event() ); + } } void DateBookDayWidget::setGeometry( const QRect &r ) { |