summaryrefslogtreecommitdiff
path: root/core/pim/datebook/dateentryimpl.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/datebook/dateentryimpl.cpp') (more/less context) (show 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
@@ -125,14 +125,14 @@ DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock,
if(!event.description().isEmpty())
addOrPick( comboDescription, event.description() );
if(!event.location().isEmpty())
addOrPick( comboLocation, event.location() );
checkAlarm->setChecked( event.hasAlarm() );
checkAllDay->setChecked( event.type() == Event::AllDay );
- if(!event.notes().isEmpty())
- editNote->setText(event.notes());
+ if(!event.notes().isEmpty()) noteStr=event.notes();
+ else noteStr="";
spinAlarm->setValue(event.alarmTime());
if ( event.alarmSound() != Event::Silent )
comboSound->setCurrentItem( 1 );
if ( event.hasRepeat() ) {
rp = event.repeatPattern();
cmdRepeat->setText( tr("Repeat...") );
@@ -208,22 +208,24 @@ void DateEntry::init()
this, SLOT( endDateChanged( int, int, int ) ) );
connect( qApp, SIGNAL( clockChanged( bool ) ),
this, SLOT( slotChangeClock( bool ) ) );
connect( qApp, SIGNAL(weekChanged(bool)),
this, SLOT(slotChangeStartOfWeek(bool)) );
+ connect( editNote, SIGNAL(clicked()),
+ this, SLOT(slotEditNote()) );
+
QPopupMenu *m2 = new QPopupMenu( this );
endPicker = new DateBookMonth( m2, 0, TRUE );
m2->insertItem( endPicker );
buttonEnd->setPopup( m2 );
connect( endPicker, SIGNAL( dateClicked( int, int, int ) ),
this, SLOT( endDateChanged( int, int, int ) ) );
connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ),
this, SLOT( startTimePicked(const QTime &) ));
- editNote->setFixedVisibleLines(3);
// install eventFilters
comboEnd->installEventFilter( this );
comboStart->installEventFilter( this );
}
/*
@@ -235,12 +237,28 @@ DateEntry::~DateEntry()
//cout << "Del: " << comboStart->currentText() << endl;
}
/*
* public slot
*/
+
+void DateEntry::slotEditNote() {
+ QString s;
+ s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month());
+ NoteEntry noteDlg(s+comboDescription->currentText(), noteStr,
+ this,0,TRUE);
+
+#if defined(Q_WS_QWS) || defined(_WS_QWS_)
+ noteDlg.showMaximized();
+#endif
+ if (noteDlg.exec() ) {
+ noteStr=noteDlg.note->text();
+ }
+
+}
+
void DateEntry::endDateChanged( int y, int m, int d )
{
endDate.setYMD( y, m, d );
if ( endDate < startDate ) {
endDate = startDate;
}
@@ -452,13 +470,13 @@ Event DateEntry::event()
st = Event::Loud;
else
st = Event::Silent;
ev.setAlarm( checkAlarm->isChecked(), spinAlarm->value(), st );
if ( rp.type != Event::NoRepeat )
ev.setRepeat( TRUE, rp );
- ev.setNotes( editNote->text() );
+ ev.setNotes( noteStr );
//cout << "Start: " << comboStart->currentText() << endl;
return ev;
}