Diffstat (limited to 'core/pim/datebook/dateentryimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index 1122f79..b2e3e3a 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp @@ -32,41 +32,44 @@ #include <qcheckbox.h> #include <qcombobox.h> #include <qlayout.h> #include <qlineedit.h> #include <qmultilineedit.h> #include <qpopupmenu.h> #include <qscrollview.h> #include <qspinbox.h> #include <qtoolbutton.h> #include <stdlib.h> +#include <stdiostream.h> + /* * Constructs a DateEntry which is a child of 'parent', with the * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, const QDateTime &end, bool whichClock, QWidget* parent, const char* name ) : DateEntryBase( parent, name ), ampm( whichClock ), startWeekOnMonday( startOnMonday ) { init(); setDates(start,end); + setFocusProxy(comboDescription); } static void addOrPick( QComboBox* combo, const QString& t ) { for (int i=0; i<combo->count(); i++) { if ( combo->text(i) == t ) { combo->setCurrentItem(i); return; } } combo->setEditText(t); } @@ -167,24 +170,25 @@ void DateEntry::init() m2->insertItem( endPicker ); buttonEnd->setPopup( m2 ); connect( endPicker, SIGNAL( dateClicked( int, int, int ) ), this, SLOT( endDateChanged( int, int, int ) ) ); } /* * Destroys the object and frees any allocated resources */ DateEntry::~DateEntry() { // no need to delete child widgets, Qt does it all for us + //cout << "Del: " << comboStart->currentText() << endl; } /* * public slot */ void DateEntry::endDateChanged( int y, int m, int d ) { endDate.setYMD( y, m, d ); if ( endDate < startDate ) { endDate = startDate; } @@ -261,24 +265,25 @@ void DateEntry::startDateChanged( int y, int m, int d ) // our pickers must be reset... startPicker->setDate( y, m, d ); endPicker->setDate( y, m, d ); } /* * public slot */ void DateEntry::startTimeChanged( int index ) { startTime = parseTime(comboStart->text(index),ampm); changeEndCombo( index ); + //cout << "Start: " << comboStart->currentText() << endl; } /* * public slot */ void DateEntry::typeChanged( const QString &s ) { bool b = s != "All Day"; buttonStart->setEnabled( b ); comboStart->setEnabled( b ); comboEnd->setEnabled( b ); } /* @@ -373,24 +378,27 @@ Event DateEntry::event() ev.setStart( TimeConversion::fromUTC( start_utc ) ); ev.setEnd( TimeConversion::fromUTC( end_utc ) ); // we only have one type of sound at the moment... LOUD!!! if ( comboSound->currentItem() != 0 ) 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() ); + + //cout << "Start: " << comboStart->currentText() << endl; + return ev; } void DateEntry::setRepeatLabel() { switch( rp.type ) { case Event::Daily: cmdRepeat->setText( tr("Daily...") ); break; case Event::Weekly: cmdRepeat->setText( tr("Weekly...") ); |