summaryrefslogtreecommitdiff
path: root/core/pim/datebook/dateentryimpl.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/dateentryimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/dateentryimpl.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index c4f6c68..9cc5073 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -128,8 +128,8 @@ DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock,
128 addOrPick( comboLocation, event.location() ); 128 addOrPick( comboLocation, event.location() );
129 checkAlarm->setChecked( event.hasAlarm() ); 129 checkAlarm->setChecked( event.hasAlarm() );
130 checkAllDay->setChecked( event.type() == Event::AllDay ); 130 checkAllDay->setChecked( event.type() == Event::AllDay );
131 if(!event.notes().isEmpty()) 131 if(!event.notes().isEmpty()) noteStr=event.notes();
132 editNote->setText(event.notes()); 132 else noteStr="";
133 spinAlarm->setValue(event.alarmTime()); 133 spinAlarm->setValue(event.alarmTime());
134 if ( event.alarmSound() != Event::Silent ) 134 if ( event.alarmSound() != Event::Silent )
135 comboSound->setCurrentItem( 1 ); 135 comboSound->setCurrentItem( 1 );
@@ -210,6 +210,9 @@ void DateEntry::init()
210 this, SLOT( slotChangeClock( bool ) ) ); 210 this, SLOT( slotChangeClock( bool ) ) );
211 connect( qApp, SIGNAL(weekChanged(bool)), 211 connect( qApp, SIGNAL(weekChanged(bool)),
212 this, SLOT(slotChangeStartOfWeek(bool)) ); 212 this, SLOT(slotChangeStartOfWeek(bool)) );
213
214 connect( editNote, SIGNAL(clicked()),
215 this, SLOT(slotEditNote()) );
213 216
214 QPopupMenu *m2 = new QPopupMenu( this ); 217 QPopupMenu *m2 = new QPopupMenu( this );
215 endPicker = new DateBookMonth( m2, 0, TRUE ); 218 endPicker = new DateBookMonth( m2, 0, TRUE );
@@ -220,7 +223,6 @@ void DateEntry::init()
220 223
221 connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ), 224 connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ),
222 this, SLOT( startTimePicked(const QTime &) )); 225 this, SLOT( startTimePicked(const QTime &) ));
223 editNote->setFixedVisibleLines(3);
224 // install eventFilters 226 // install eventFilters
225 comboEnd->installEventFilter( this ); 227 comboEnd->installEventFilter( this );
226 comboStart->installEventFilter( this ); 228 comboStart->installEventFilter( this );
@@ -238,6 +240,22 @@ DateEntry::~DateEntry()
238/* 240/*
239 * public slot 241 * public slot
240 */ 242 */
243
244void DateEntry::slotEditNote() {
245 QString s;
246 s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month());
247 NoteEntry noteDlg(s+comboDescription->currentText(), noteStr,
248 this,0,TRUE);
249
250#if defined(Q_WS_QWS) || defined(_WS_QWS_)
251 noteDlg.showMaximized();
252#endif
253 if (noteDlg.exec() ) {
254 noteStr=noteDlg.note->text();
255 }
256
257}
258
241void DateEntry::endDateChanged( int y, int m, int d ) 259void DateEntry::endDateChanged( int y, int m, int d )
242{ 260{
243 endDate.setYMD( y, m, d ); 261 endDate.setYMD( y, m, d );
@@ -455,7 +473,7 @@ Event DateEntry::event()
455 ev.setAlarm( checkAlarm->isChecked(), spinAlarm->value(), st ); 473 ev.setAlarm( checkAlarm->isChecked(), spinAlarm->value(), st );
456 if ( rp.type != Event::NoRepeat ) 474 if ( rp.type != Event::NoRepeat )
457 ev.setRepeat( TRUE, rp ); 475 ev.setRepeat( TRUE, rp );
458 ev.setNotes( editNote->text() ); 476 ev.setNotes( noteStr );
459 477
460 //cout << "Start: " << comboStart->currentText() << endl; 478 //cout << "Start: " << comboStart->currentText() << endl;
461 479