Diffstat (limited to 'core/pim/datebook/dateentryimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index 403378e..f2f17c6 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp @@ -31,2 +31,3 @@ +#include <qevent.h> #include <qcheckbox.h> @@ -65,2 +66,16 @@ DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, +bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) +{ + if( ev->type() == QEvent::FocusIn ){ + if( obj == comboStart ){ + TextLabel3_2->setText( tr("Start Time" ) ); + m_showStart= true; + }else if( obj == comboEnd ){ + TextLabel3_2->setText( tr("End Time") ); + m_showStart = false; + } + } + return false; +} + static void addOrPick( QComboBox* combo, const QString& t ) @@ -188,2 +203,5 @@ void DateEntry::init() editNote->setFixedVisibleLines(3); + // install eventFilters + comboEnd->installEventFilter( this ); + comboStart->installEventFilter( this ); } @@ -306,4 +324,10 @@ void DateEntry::startTimeChanged( const QTime &t ) void DateEntry::startTimePicked( const QTime &t ) { + if(m_showStart ){ startTimeChanged(t); updateTimeEdit(true,true); + }else{ + endTime = t; + updateTimeEdit(false, true ); + + } } |