author | hakan <hakan> | 2002-05-07 15:27:34 (UTC) |
---|---|---|
committer | hakan <hakan> | 2002-05-07 15:27:34 (UTC) |
commit | ad2c6f2e1b5504989ceed297d9ee8c49129ad1fb (patch) (unidiff) | |
tree | 60d75877abb05a322b265d8b50621f3f7f75c9d1 /core/pim/datebook/dateentryimpl.cpp | |
parent | 8ba0398d93f0e70ea2de254a4090d8bd02f593cd (diff) | |
download | opie-ad2c6f2e1b5504989ceed297d9ee8c49129ad1fb.zip opie-ad2c6f2e1b5504989ceed297d9ee8c49129ad1fb.tar.gz opie-ad2c6f2e1b5504989ceed297d9ee8c49129ad1fb.tar.bz2 |
Added separate note editor dialog (currently only a QMultiLineEdit)
Diffstat (limited to 'core/pim/datebook/dateentryimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 26 |
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 | |||
@@ -129,6 +129,6 @@ DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, | |||
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 ) |
@@ -211,4 +211,7 @@ void DateEntry::init() | |||
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 ); |
@@ -221,5 +224,4 @@ void DateEntry::init() | |||
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 ); |
@@ -239,4 +241,20 @@ DateEntry::~DateEntry() | |||
239 | * public slot | 241 | * public slot |
240 | */ | 242 | */ |
243 | |||
244 | void 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 | |||
241 | void DateEntry::endDateChanged( int y, int m, int d ) | 259 | void DateEntry::endDateChanged( int y, int m, int d ) |
242 | { | 260 | { |
@@ -456,5 +474,5 @@ Event DateEntry::event() | |||
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; |